fails to build with hardening flags enabled (relocation R_X86_64_32 against `stg_CHARLIKE_closure'...)
Building HEAD on Debian wheezy with the Debian packaging setup fails:
configure: Building in-tree ghc-pwd
/usr/bin/ld: utils/ghc-pwd/dist-boot/Main.o: relocation R_X86_64_32 against `stg_CHARLIKE_closure' can not be used when making a shared object; recompile with -fPIC
utils/ghc-pwd/dist-boot/Main.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
configure: error: Building ghc-pwd failed
http://deb.haskell.org/dailies/2014-04-16/ghc_7.9.20140416-0.daily_amd64.build
This is possibly related to the Hardening flags added by Debian:
~ $ dpkg-buildflags --get LDFLAGS
-Wl,-z,relro
~ $ dpkg-buildflags --get CFLAGS
-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
Other related bug might be #3668 (closed) and https://bugs.debian.org/712228
I’ll disable the hardening flags and see if it helps. The error first occurred 2014-03-27.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |
Edited by Joachim Breitner