GHC compilation issue: How to work around bug #4374?
Sanket Agrawal
sanket.agrawal at gmail.com
Wed Jan 4 00:36:13 CET 2012
I sent this question to Haskell Cafe list instead of this mailing list. So,
my apologies for cross-posting. I have emailed a note to Haskell Cafe about
this cross-posting. This mailing list seems more focused on GHC issues.
I am getting the compilation error below during linking when building GHC
7.0.4 on RHEL5 (x86_64) using GHC 6.12.3 as the building compiler – I
configured "make" to point to ncurses and libgmp installations. The issue
seems to happen at the last stage of make - so close to getting GHC to
build. I will appreciate pointers on how to work around the issue below. I
don’t have root privileges on Linux box (otherwise I would have used
justhub.org packages instead of going through this painful process). My
apologies if this has already been discussed in this forum. I searched for
the issue but could find only the GHC bug ticket below.****
** **
GHC bug ticket: http://hackage.haskell.org/trac/ghc/ticket/4374 - it
doesn’t have description on how to work around the bug.****
** **
Compilation error:****
-----------------------****
** **
$
C_INCLUDE_PATH=/efs/dist/fsf/ncurses/5.6/common/include/ncurses:/home/saagrawa/scripts/misc/libgmp/include
LIBRARY_PATH=/efs/dist/fsf/ncurses/5.6/exec/lib:/home/saagrawa/scripts/misc/libgmp/lib
make****
===--- updating makefiles phase 0****
make -r --no-print-directory -f ghc.mk phase=0 just-makefiles****
===--- updating makefiles phase 1****
make -r --no-print-directory -f ghc.mk phase=1 just-makefiles****
===--- updating makefiles phase 2****
make -r --no-print-directory -f ghc.mk phase=2 just-makefiles****
===--- updating makefiles phase 3****
make -r --no-print-directory -f ghc.mk phase=3 just-makefiles****
===--- finished updating makefiles****
make -r --no-print-directory -f ghc.mk all****
"inplace/bin/ghc-stage1"
libraries/integer-gmp/dist-install/build/GHC/Integer.dyn_o
libraries/integer-gmp/dist-install/build/GHC/Integer/GMP/Internals.dyn_o
libraries/integer-gmp/dist-install/build/GHC/Integer/Type.dyn_o
libraries/integer-gmp/dist-install/build/cbits/gmp-wrappers.dyn_o
libraries/integer-gmp/dist-install/build/cbits/cbits.dyn_o
libraries/integer-gmp/gmp/objs/*.o `/usr/bin/find
libraries/integer-gmp/dist-install/build -name "*_stub.dyn_o" -print`
-shared -dynamic -dynload deploy -dylib-install-name
/home/saagrawa/scripts/misc/ghc/7.0.4/lib/ghc-7.0.4/`basename
"libraries/integer-gmp/dist-install/build/
libHSinteger-gmp-0.2.0.3-ghc7.0.4.so" | sed
's/^libHS//;s/[-]ghc.*//'`/`basename
"libraries/integer-gmp/dist-install/build/
libHSinteger-gmp-0.2.0.3-ghc7.0.4.so"` -no-auto-link-packages -package
ghc-prim-0.2.0.0 -o libraries/integer-gmp/dist-install/build/
libHSinteger-gmp-0.2.0.3-ghc7.0.4.so****
/efs/dist/fsf/gcc/4.4.3-build004/.exec/x86-64.rhel.5/libexec/gcc/x86_64-unknown-linux-gnu/4.4.3/ld:
libraries/integer-gmp/gmp/objs/aors.o: relocation R_X86_64_32 against
`__gmpz_sub' can not be used when making a shared object; recompile with
-fPIC****
libraries/integer-gmp/gmp/objs/aors.o: could not read symbols: Bad value****
collect2: ld returned 1 exit status****
make[1]: *** [libraries/integer-gmp/dist-install/build/
libHSinteger-gmp-0.2.0.3-ghc7.0.4.so] Error 1****
make: *** [all] Error 2****
** **
** **
$ ls -ltr /home/saagrawa/scripts/misc/libgmp/lib|awk '{print $9,$10,$11}'
### verifying that the libgmp lib folder has dynamic libraries**
** **
libgmp.so.3.5.2*****
libgmp.so.3 -> libgmp.so.3.5.2*****
libgmp.so -> libgmp.so.3.5.2*****
libgmp.la*****
libgmp.a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20120103/21f09703/attachment-0001.htm>
More information about the Glasgow-haskell-users
mailing list