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

Support `stack setup` on Linux with libtinfo6 #2302

Closed
borsboom opened this Issue Jun 24, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@borsboom
Contributor

borsboom commented Jun 24, 2016

Most "bleeding edge" distros (e.g. Arch (#257) and Gentoo) have already upgraded to ncurses6, and now Fedora 24 (#2300) has been released that uses it as well. With these distros, you'll see an error like this when you run stack setup:

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

Unfortunately, there are no official GHC bindists for stack setup to use that support it. Provisional plan:

  • Build our own GHC bindists with libtinfo6, for 64bit and 32bit
  • Teach Stack to detect when it is on a system with libtinfo6 and select the appropriate bindist from setup-info (similarly to how we detect libgmp3 and chose a centos6 bindist).
@borsboom

This comment has been minimized.

Contributor

borsboom commented Jun 24, 2016

Question: which GHC versions should we build bindists for? At least ghc-8.0.1 and 7.10.3, obviously (for current LTS 6 and nightly snapshots). Probably 7.8.4 (for older LTS snapshots), and perhaps also 7.10.2 (used by LTS 3, although Stack can be easily configured to use GHC 7.10.3 in this case). We've never had an LTS snapshot use GHC 7.10.1, I don't think we need to support it.

@borsboom

This comment has been minimized.

Contributor

borsboom commented Jun 24, 2016

I've built a GHC 7.10.3 64-bit bindist to try out. For anyone running into this problem, please try putting this in your ~/.stack/config.yaml:

setup-info:
  ghc:
    linux64:
      7.10.3:
        url: "https://github.com/commercialhaskell/ghc/releases/download/ghc-7.10.3-release/ghc-7.10.3-x86_64-fedora24-linux.tar.bz2"
        content-length: 135082273
        sha1: cdd3ae99725218bb994936f5ab14fdb69307216e

And then re-run stack setup. I've tried it on Fedora 24, seems to work, but I'm interested in both positive and negative reports with other distributions. Let me know how it goes!

@borsboom

This comment has been minimized.

Contributor

borsboom commented Jun 24, 2016

Also tried it on Arch Linux, but unfortunately it didn't work out-of-the-box. See #257 (comment).

@crocket

This comment has been minimized.

crocket commented Jul 8, 2016

I think it's easier to statically link libtinfo with GHC. I don't know if it would make things more difficult in the future.

@borsboom

This comment has been minimized.

Contributor

borsboom commented Aug 23, 2016

With 05ba87e (to be included with stack-1.2.0), stack setup gains the ability to detect systems with libtinfo.so.6 and download an appropriate GHC bindist. I've built 64-bit bindists on Fedora 24 for GHC 8.0.1, 7.10.3, 7.10.2, and 7.8.4 (all versions that have Stackage LTS snapshots). Since I'm having trouble finding 32-bit Fedora 24 images, I haven't built any 32-bit bindists, but I'd be happy to accept them from contributors (see GHC build instructions).

Please re-open this issue if you run into any trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment