[Haskell-cafe] GHC compilation issue: Working around bug #4374?

Sanket Agrawal sanket.agrawal at gmail.com
Wed Jan 4 00:30:33 CET 2012


My apologies for posting it here. Glasgow-haskell-users mailing list seems
more relevant for this question. So, I am going to send it there instead,
with a note about this cross-posting.

On Tue, Jan 3, 2012 at 4:26 PM, Sanket Agrawal <sanket.agrawal at gmail.com>wrote:

>
>
> I am getting the compilation error below when building GHC 7.0.4 on RHEL5
> (x86_64) – I configured make to point to ncurses and libgmp. I will
> appreciated pointers on how to work around the issue below. I don’t have
> root privileges. 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
>
> $ ll /home/saagrawa/scripts/misc/libgmp/lib|awk '{print $9,$10,$11}' ###
> 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/haskell-cafe/attachments/20120103/d8060e05/attachment.htm>


More information about the Haskell-Cafe mailing list