GHC compilation issue: How to work around bug #4374?

Sanket Agrawal sanket.agrawal at
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 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: - it
doesn’t have description on how to work around the bug.****

** **

Compilation error:****


** **


===--- updating makefiles phase 0****

make -r --no-print-directory -f phase=0 just-makefiles****

===--- updating makefiles phase 1****

make -r --no-print-directory -f phase=1 just-makefiles****

===--- updating makefiles phase 2****

make -r --no-print-directory -f phase=2 just-makefiles****

===--- updating makefiles phase 3****

make -r --no-print-directory -f phase=3 just-makefiles****

===--- finished updating makefiles****

make -r --no-print-directory -f all****

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
"libraries/integer-gmp/dist-install/build/" | sed
"libraries/integer-gmp/dist-install/build/"` -no-auto-link-packages -package
ghc-prim- -o libraries/integer-gmp/dist-install/build/****

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

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/] 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**

** ******* ->***** ->**********

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list