Closed FrigoEU closed 9 years ago
Which GHC version?
The problem is that Haskeline 0.7.2.0 expects Applicative
to be unconditionally exported from Prelude
, but this only is true in GHC 7.10. I think this patch may have been my fault and I slightly botched it.
The solution is shipping 0.7.2.1 with a patch like:
#if __GLASGOW_HASKELL__ <= 709
import Control.Applicative (Applicative)
#endif
in the import decls.
Thanks for the report; I've released 0.7.2.1 which should hopefully fix that issue. Sorry, I'm currently missing a good way to test on Windows. Can someone please confirm whether the library builds now on pre-ghc-7.10?
I ended up just using an unqualified, un-CPP'd import of Control.Applicative since that's what's still done in other parts of the library; we can work on making it warning-free in a later CL.
@judah I can confirm that 0.7.2.1 now compiles on GHC 7.8.3/MSYS2/Windows (whereas 0.7.2.0 didn't)
I find it doesn't compile on OS X. ghc 7.8.4
Notice: installing into a sandbox located at
/Users/eccstartup/programs/purescript/.cabal-sandbox
Configuring haskeline-0.7.2.0...
Building haskeline-0.7.2.0...
Failed to install haskeline-0.7.2.0
Build log ( /Users/eccstartup/programs/purescript/.cabal-sandbox/logs/haskeline-0.7.2.0.log ):
[1 of 1] Compiling Main ( /var/folders/tb/wpytxqpx111fsxk0tg1zsmgm0000gn/T/haskeline-0.7.2.0-3494/haskeline-0.7.2.0/dist/dist-sandbox-5e3334d0/setup/setup.hs, /var/folders/tb/wpytxqpx111fsxk0tg1zsmgm0000gn/T/haskeline-0.7.2.0-3494/haskeline-0.7.2.0/dist/dist-sandbox-5e3334d0/setup/Main.o )
Linking /var/folders/tb/wpytxqpx111fsxk0tg1zsmgm0000gn/T/haskeline-0.7.2.0-3494/haskeline-0.7.2.0/dist/dist-sandbox-5e3334d0/setup/setup ...
Configuring haskeline-0.7.2.0...
Building haskeline-0.7.2.0...
Preprocessing library haskeline-0.7.2.0...
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
linking dist/dist-sandbox-5e3334d0/build/System/Console/Haskeline/Directory_hsc_make.o failed (exit code 1)
command was: /usr/bin/gcc dist/dist-sandbox-5e3334d0/build/System/Console/Haskeline/Directory_hsc_make.o dist/dist-sandbox-5e3334d0/build/System/Console/Haskeline/Directory_hsc_utils.o -o dist/dist-sandbox-5e3334d0/build/System/Console/Haskeline/Directory_hsc_make -m64 -L/Users/eccstartup/programs/purescript/.cabal-sandbox/lib/x86_64-osx-ghc-7.8.4/transformers-0.4.3.0 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/terminfo-0.4.0.0 -lncurses -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/directory-1.2.1.0 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/unix-2.7.0.1 -ldl -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/time-1.4.2 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/old-locale-1.0.0.6 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/filepath-1.3.0.2 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/containers-0.5.5.1 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/bytestring-0.10.4.0 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/deepseq-1.3.0.2 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/array-0.5.0.0 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/base-4.7.0.2 -liconv -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/integer-gmp-0.5.1.0 -lgmp -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/ghc-prim-0.3.1.0 -L/usr/local/Cellar/ghc/7.8.4/lib/ghc-7.8.4/rts-1.0 -lm -ldl
cabal: Error: some packages failed to install:
haskeline-0.7.2.0 failed during the building phase. The exception was:
ExitFailure 1
I have gmp
installed with homebrew
.
@eccstartup I suspect this is a case of http://stackoverflow.com/questions/26899948/ghc-anything-results-in-ld-library-not-found-for-lgmp
@eccstartup @hvr could one of you do otool -L
on your ghc binary? (otool -L is for tracking down ) It sounds like you're using a brew built GHC, instead of an official build. Official builds for OS X use intree-gmp. Or just brew installing gmp might get you done
OK, I removed the ghc from homebrew
. The ghc recommended works fine.
As mentioned, xcode-select --install
solves the problem with the Homebrew GHC 7.8.4.
@FranklinChen I am happy to see your comment. But if I have installed Xcode, isn't command-line-tools bundled with Xcode? Or I have to install it again? Not sure.
@eccstartup Yes, for whatever reason, even if you already have Xcode, the xcode-select --install
command seems necessary in order to trigger the correct setting for Homebrew, namely,
$ brew --config
...
CLT: 6.2.0.0.1.1424975374
@FranklinChen Thanks. Here is N/A
.
Hey,
while trying to upgrade my version of purescript, which updated it's dependency on haskeline to 0.7.2.0, purescript fails to compile for me, with the following error:
Edit: After adapting purescript's dependency .cabal file so it would use haskeline 0.7.1.3, it does compile for me immediately. (Windows 8.1)