Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to ncurses 6 #1575

Closed
ghost opened this issue Dec 29, 2015 · 9 comments
Closed

Switch to ncurses 6 #1575

ghost opened this issue Dec 29, 2015 · 9 comments

Comments

@ghost
Copy link

ghost commented Dec 29, 2015

The new major version was released couple of month ago and Gentoo uses it already in unstable which cases problems with building GHC.

@borsboom
Copy link
Contributor

Stack itself doesn't use ncurses, but GHC does. We've hit problems with this in Arch (see #257 and #1012), so similar workarounds may be possible on Gentoo. Is it possible to install an older version of libtinfo/ncurses for compatibility on Gentoo? If not, we'd need an ncurses 6 compatible GHC bindist that stack setup can use (preferably created by the GHC release team, but we'll use bindists from third parties if necessary). Of course, using a system-installed GHC is always an option although that makes it impossible for Stack to manage multiple GHC versions for different snapshots.

@ghost
Copy link
Author

ghost commented Dec 30, 2015

I have tried to create symlink to ncurses 6's libtinfo shared library, but unfortunately I get following error.

error while loading shared libraries: /usr/lib64/libtinfo.so.5: invalid ELF header

Yes, it is possible, however that is not the long term solution. I am fine with building the GHC from source if that works automatically by typing stack setup ghc-version. I do have GHC 7.10.2 from official Gentoo repository, but they are sometimes slow to get new version and the overlay is far from perfect.

@borsboom
Copy link
Contributor

Unfortunately having stack setup build GHC from source is tricky, because GHC is written in Haskell and so you need to have GHC already installed in order to build it from source (not to mention many other system requirements and the fact that it takes a very long time to build). So we're really stuck with bindists.

@ghost
Copy link
Author

ghost commented Dec 31, 2015

I see, it would still be great if there was an option to build it from source too, from my experience the GHC is just faster if built from source. But still, the dependency should be updated to ncurses 6.

@borsboom
Copy link
Contributor

This is a matter of the GHC release team (or a third-party) releasing Gentoo compatible bindists first. We can then update stack setup to detect that it should use that bindist.

I agree it would be nice to support building GHC from source, but there are so many variables that making this work reliably would be very difficult. The best is to build a bindist yourself, and then use stack setup --ghc-bindist to have stack setup use it. And if you think the bindist will be useful for others, please contribute it so that we can have stack setup automatically use it when relevant.

Does Gentoo have support for installing GHC system-wide? By any chance does it also support installing multiple GHC versions side-by-side? If so, improving Stack's support for multiple system-installed GHC versions may be a possibility as well.

@ghost
Copy link
Author

ghost commented Jan 14, 2016

Gentoo has system-wide GHC but only 7.10.2 so I went back to the haskell overlay. I think we can close this, since I got the latest GHC 8.0.1 release candidate binary and it required ncurses 6.

@ghost ghost closed this as completed Jan 14, 2016
@pmiddend
Copy link

I'm on gentoo and am using ncurses-6. It's not possible for me to use stack because...

.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/bin/ghc-pkg: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

I tried using lts-6.7 in my yaml file and nightly-2016-07-09 (so ghc-7.10.3 and 8.0.1). Both didn't work. I cannot use a system wide ghc because intero is not compatible with it (fails because it requires transformers-0.4.3.0) and that's the piece of software I wanted to try out.

Is there a way to make this work with ncurses-6?

@borsboom
Copy link
Contributor

borsboom commented Aug 7, 2016

@pmiddend see #2302

@Javran
Copy link

Javran commented Dec 14, 2017

FYI gentoo / portage users: ncurses-5 and -6 can coexist by making use of sub-slots, just make a virtual ghc ebuild to keep sys-libs/ncurses:5/5 a dependency so it won't get removed when you run emerge -c. then you can use stack to keep all your binaries in your home directory as usual.

this ebuild has been working for me for quite a while, don't mind about the version, despite it's named ghc-dummy-7.10.3, I'm on ghc-8.0.2 and it works fine. and it will keep working untill ghc switches to ncurses 6.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants