[GHC] #8666: integer-gmp fails to compile on Debian Squeeze
GHC
ghc-devs at haskell.org
Mon Jan 13 12:01:56 UTC 2014
#8666: integer-gmp fails to compile on Debian Squeeze
-----------------------------------+---------------------------------------
Reporter: jstolarek | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries | Version: 7.7
(other) | Operating System: Linux
Keywords: | Type of failure: Compile-time crash
Architecture: x86_64 (amd64) | Test Case:
Difficulty: Unknown | Blocking:
Blocked By: |
Related Tickets: |
-----------------------------------+---------------------------------------
I get an error when compiling recent HEAD on Debian Squeeze:
{{{
"inplace/bin/ghc-stage1" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC
-dynamic -H64m -O0 -fasm -package-name integer-gmp-0.5.1.0 -hide-all-
packages -i -ilibraries/integer-gmp/. -ilibraries/integer-gmp/dist-
install/build -ilibraries/integer-gmp/dist-install/build/autogen
-Ilibraries/integer-gmp/dist-install/build -Ilibraries/integer-gmp/dist-
install/build/autogen -Ilibraries/integer-gmp/. -optP-include
-optPlibraries/integer-gmp/dist-install/build/autogen/cabal_macros.h
-package ghc-prim-0.3.1.0 -Wall -package-name integer-gmp -XHaskell2010 -O
-fasm -no-user-package-db -rtsopts -Ilibraries/integer-
gmp/mkGmpDerivedConstants/dist -odir libraries/integer-gmp/dist-
install/build -hidir libraries/integer-gmp/dist-install/build -stubdir
libraries/integer-gmp/dist-install/build -fno-use-rpaths -optl-Wl,-rpath
-optl-Wl,'$ORIGIN/../ghc-prim-0.3.1.0' -optl-Wl,-rpath -optl-
Wl,'$ORIGIN/../rts-1.0' -optl-Wl,-zorigin 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/GMP/Prim.dyn_o libraries/integer-gmp/dist-
install/build/GHC/Integer/Logarithms.dyn_o libraries/integer-gmp/dist-
install/build/GHC/Integer/Logarithms/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
-shared -dynamic -dynload deploy -no-auto-link-packages -o libraries
/integer-gmp/dist-install/build/libHSinteger-
gmp-0.5.1.0-ghc7.7.20140113.so
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
Call hs_init_ghc() from your main() function to set these options.
/usr/bin/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.5.1.0-ghc7.7.20140113.so] Error 1
make: *** [all] Error 2
}}}
I can build in-tree `libgmp` by extracting it and running `./configure
make`. Following Austin's and Herbert's suggestions I tried adding `-fPIC`
to command line options but with no result - see attachements.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8666>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list