JPMoresmau / scion-class-browser

Scion part for EclipseFP Class Browser
16 stars 6 forks source link

scion-browser + ghc7.8.2 issues with terminfo #10

Closed miguel-negrao closed 10 years ago

miguel-negrao commented 10 years ago

It seems ghc 7.8.2 uses the terminfo package internally but doesn't expose it, this can lead to problems when trying to install terminfo: https://ghc.haskell.org/trac/ghc/ticket/8919 . Some people even report breaking ghc when trying to install terminfo.

In my case I can't install terminfo (which is needed for scion-browser) via nix because it (smartly) doesn't let me replace the ghc library:

nix-env -iA nixpkgs.haskellPackages_ghc782.terminfo
installing `haskell-terminfo-ghc7.8.2-0.4.0.0-shared'
building path(s) `/nix/store/lg5i4padb8k1038mwy83axzmnv192ar0-user-environment'
collision between `/nix/store/rddla85zgryvw9jc0kx6v85anw28rfkr-ghc-7.8.2-wrapper/lib/ghc-7.8.2/terminfo-0.4.0.0/libHSterminfo-0.4.0.0-ghc7.8.2.so' and `/nix/store/ha6pwg59avwv4bp8yja6kqj8p52gwjwr-haskell-terminfo-ghc7.8.2-0.4.0.0-shared/lib/ghc-7.8.2/terminfo-0.4.0.0/libHSterminfo-0.4.0.0-ghc7.8.2.so'; use `nix-env --set-flag priority NUMBER PKGNAME' to change the priority of one of the conflicting packages
builder for `/nix/store/v4jpajgzvh5nn5alnqs8yha72blcbdj4-user-environment.drv' failed with exit code 255
error: build of `/nix/store/v4jpajgzvh5nn5alnqs8yha72blcbdj4-user-environment.drv' failed

A patch has been merged in ghc, so it should be fixed in ghc 7.8.3. Not sure this affects people that install terminfo locally, maybe not... just wanted to leave the warning.

When installing via cabal install from a clean ghc 7.8.2 installed from nix, I get:

    > nix-shell -p ncurses
    > cabal install
     ....
    Loading package terminfo-0.4.0.0 ... <command line>: can't load .so/.DLL for: libncursesw.so (libncursesw.so: cannot open shared object file: No such file or directory)
     ...

so same problem as mentioned in the faq.

miguel-negrao commented 10 years ago

Investigating further seems that, when installing via cabal sandbox the only relevant issue is the libncursesw.so issue which is already in the faq. Still, it's a pity that it doesn't work cleanly out of the box... one shouldn't be messing with installed libraries (ncurses)