Snow Leopard GHC
Barney Stratford
barney_stratford at fastmail.fm
Fri Sep 25 05:56:54 EDT 2009
OK, I'm trying to get a more-recent GHC working that has that #ifdef
that you mentioned. Specifically, 6.10.4.
I've said:
./configure --build=x86_64-apple-darwin --host=x86_64-apple-darwin --
target=x86_64-apple-darwin --with-gmp-includes='/sw/include' --with-
gmp-libraries='/sw/lib'
make
and it fails, saying it can't find libgmp, even though I've just told
it where gmp is. I've copied my mk/build.mk straight from my 6.8.3
build, and it says
ReadlineIncludePath=/sw/include
SRC_CC_OPTS += -I/sw/include -L/sw/lib
SRC_HC_OPTS += -I/sw/include -L/sw/lib
EXTRA_HSC2HS_OPTS += -I/sw/include
EXTRA_LD_OPTS += -L/sw/lib
The resulting error message is:
[51 of 51] Compiling Distribution.Simple ( Distribution/Simple.hs,
dist-bootstrapping/build/Distribution/Simple.o )
ar: creating archive dist-bootstrapping/build/libHSCabal-1.6.0.3.a
cd Cabal && /Users/bjs/Desktop/GHC_Build/ghc-6.10.4/libraries/cabal-
bin /Users/bjs/Desktop/GHC_Build/install/bin/ghc /Users/bjs/Desktop/
GHC_Build/ghc-6.10.4/libraries/bootstrapping.conf 1.6.0.3 install --
distpref=dist-bootstrapping --inplace
Installing library in
/Users/bjs/Desktop/GHC_Build/ghc-6.10.4/libraries/Cabal/dist-
bootstrapping/install/usr/local/lib/Cabal-1.6.0.3/ghc-6.8.3
Registering Cabal-1.6.0.3...
Reading package info from "dist-bootstrapping/inplace-pkg-config" ...
done.
Saving old package config file... done.
Writing new package config file... done.
cd hpc && /Users/bjs/Desktop/GHC_Build/ghc-6.10.4/libraries/cabal-
bin /Users/bjs/Desktop/GHC_Build/install/bin/ghc /Users/bjs/Desktop/
GHC_Build/ghc-6.10.4/libraries/bootstrapping.conf 1.6.0.3 clean --
distpref=dist-bootstrapping
cleaning...
cd hpc && /Users/bjs/Desktop/GHC_Build/ghc-6.10.4/libraries/cabal-
bin /Users/bjs/Desktop/GHC_Build/install/bin/ghc /Users/bjs/Desktop/
GHC_Build/ghc-6.10.4/libraries/bootstrapping.conf 1.6.0.3 configure --
distpref=dist-bootstrapping --with-compiler=/Users/bjs/Desktop/
GHC_Build/install/bin/ghc --with-hc-pkg=/Users/bjs/Desktop/GHC_Build/
install/bin/ghc-pkg --package-db=/Users/bjs/Desktop/GHC_Build/
ghc-6.10.4/libraries/bootstrapping.conf.tmp
Configuring hpc-0.5.0.3...
<command-line>: warning: "__PIC__" redefined
<built-in>: warning: this is the location of the previous definition
cd hpc && /Users/bjs/Desktop/GHC_Build/ghc-6.10.4/libraries/cabal-
bin /Users/bjs/Desktop/GHC_Build/install/bin/ghc /Users/bjs/Desktop/
GHC_Build/ghc-6.10.4/libraries/bootstrapping.conf 1.6.0.3 build --
distpref=dist-bootstrapping
Preprocessing library hpc-0.5.0.3...
ld: library not found for -lgmp
collect2: ld returned 1 exit status
linking dist-bootstrapping/build/Trace/Hpc/Reflect_hsc_make.o failed
command was: /usr/bin/gcc -L/Users/bjs/Desktop/GHC_Build/install/lib/
ghc-6.8.3/lib/directory-1.0.0.1 -L/Users/bjs/Desktop/GHC_Build/install/
lib/ghc-6.8.3/lib/filepath-1.1.0.0 -L/Users/bjs/Desktop/GHC_Build/
install/lib/ghc-6.8.3/lib/old-time-1.0.0.0 -L/Users/bjs/Desktop/
GHC_Build/install/lib/ghc-6.8.3/lib/old-locale-1.0.0.0 -L/Users/bjs/
Desktop/GHC_Build/install/lib/ghc-6.8.3/lib/containers-0.1.0.2 -L/
Users/bjs/Desktop/GHC_Build/install/lib/ghc-6.8.3/lib/array-0.1.0.0 -L/
Users/bjs/Desktop/GHC_Build/install/lib/ghc-6.8.3/lib/base-3.0.2.0 -L/
Users/bjs/Desktop/GHC_Build/install/lib/ghc-6.8.3 -lm -lgmp -ldl dist-
bootstrapping/build/Trace/Hpc/Reflect_hsc_make.o -o dist-bootstrapping/
build/Trace/Hpc/Reflect_hsc_make
make[1]: *** [bootstrapping.conf] Error 1
make: *** [stage1] Error 2
[~/Desktop/GHC_Build/ghc-6.10.4] bjs$
As you can see, it doesn't even attempt to tell gcc where to find
libgmp.
This has the feeling of an RTM question, and if it is then I
apologise. I've not seen anything about this in the M, though.
Cheers,
Barney.
More information about the Glasgow-haskell-users
mailing list