Giter Site home page Giter Site logo

Comments (12)

hvr avatar hvr commented on July 17, 2024

Which GHC version?

from haskeline.

thoughtpolice avatar thoughtpolice commented on July 17, 2024

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.

from haskeline.

judah avatar judah commented on July 17, 2024

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.

from haskeline.

hvr avatar hvr commented on July 17, 2024

@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)

from haskeline.

eccstartup avatar eccstartup commented on July 17, 2024

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.

from haskeline.

hvr avatar hvr commented on July 17, 2024

@eccstartup I suspect this is a case of http://stackoverflow.com/questions/26899948/ghc-anything-results-in-ld-library-not-found-for-lgmp

from haskeline.

cartazio avatar cartazio commented on July 17, 2024

@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

from haskeline.

eccstartup avatar eccstartup commented on July 17, 2024

OK, I removed the ghc from homebrew. The ghc recommended works fine.

from haskeline.

FranklinChen avatar FranklinChen commented on July 17, 2024

As mentioned, xcode-select --install solves the problem with the Homebrew GHC 7.8.4.

from haskeline.

eccstartup avatar eccstartup commented on July 17, 2024

@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.

from haskeline.

FranklinChen avatar FranklinChen commented on July 17, 2024

@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

from haskeline.

eccstartup avatar eccstartup commented on July 17, 2024

@FranklinChen Thanks. Here is N/A.

from haskeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.