Bug#712228: Hardening flag -pie breaks compilation with GHC
Erik de Castro Lopo
erikd at mega-nerd.com
Mon Oct 24 09:22:27 UTC 2016
Package: ghc
Version: 7.10.3-10
Followup-For: Bug #712228
Dear Maintainer,
I've been using 7.10.3-10 for a couple of weeks now and it was fine,
but today after an upgrade this problem came back.
Its seems that "gcc (Debian 6.2.0-9) 6.2.0 20161019" break everything
again.
> mkdir /tmp/test ; cd /tmp/test
> cabal sandbox init
> cabal install clock
Resolving dependencies...
Notice: installing into a sandbox located at /tmp/test/.cabal-sandbox
Configuring clock-0.7.2...
Building clock-0.7.2...
Failed to install clock-0.7.2
Build log ( /tmp/test/.cabal-sandbox/logs/clock-0.7.2.log ):
cabal: Entering directory '/tmp/cabal-tmp-28442/clock-0.7.2'
Configuring clock-0.7.2...
Building clock-0.7.2...
Preprocessing library clock-0.7.2...
/usr/bin/ld: dist/dist-sandbox-e0f3b3c1/build/System/Clock_hsc_make.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
linking dist/dist-sandbox-e0f3b3c1/build/System/Clock_hsc_make.o failed (exit code 1)
command was: /usr/bin/gcc dist/dist-sandbox-e0f3b3c1/build/System/Clock_hsc_make.o dist/dist-sandbox-e0f3b3c1/build/System/Clock_hsc_utils.o -o dist/dist-sandbox-e0f3b3c1/build/System/Clock_hsc_make -fno-PIE -fno-stack-protector -L/usr/lib/ghc/base_HQfYBxpPvuw8OunzQu6JGM -Wl,-R,/usr/lib/ghc/base_HQfYBxpPvuw8OunzQu6JGM -L/usr/lib/ghc/integ_2aU3IZNMF9a7mQ0OzsZ0dS -Wl,-R,/usr/lib/ghc/integ_2aU3IZNMF9a7mQ0OzsZ0dS -lgmp -L/usr/lib/ghc/ghcpr_8TmvWUcS1U1IKHT0levwg3 -Wl,-R,/usr/lib/ghc/ghcpr_8TmvWUcS1U1IKHT0levwg3 -L/usr/lib/ghc/rts -Wl,-R,/usr/lib/ghc/rts -lm -lrt -ldl -lffi
cabal: Leaving directory '/tmp/cabal-tmp-28442/clock-0.7.2'
cabal: Error: some packages failed to install:
clock-0.7.2 failed during the building phase. The exception was:
ExitFailure 1
On another machine I have "gcc (Debian 6.2.0-6) 6.2.0 20161010" and ghc-7.10.3-10
works fine there.
I suspect the problem is this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835148
Erik
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (900, 'testing'), (800, 'unstable'), (500, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64, armhf, i386
Kernel: Linux 4.7.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_AU.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages ghc depends on:
ii dpkg 1.18.10
ii gcc 4:6.1.1-1
ii libbsd-dev 0.8.3-1
ii libc6 2.24-5
ii libc6-dev 2.24-5
ii libffi-dev 3.2.1-6
ii libffi6 3.2.1-6
ii libgmp-dev 2:6.1.1+dfsg-1
ii libgmp10 2:6.1.1+dfsg-1
ii libncurses5-dev 6.0+20160917-1
ii libtinfo5 6.0+20160917-1
ghc recommends no packages.
Versions of packages ghc suggests:
pn ghc-doc <none>
pn ghc-prof <none>
pn haskell-doc <none>
ii llvm-3.5 1:3.5.2-5
ii perl 5.24.1~rc3-3
-- no debconf information
More information about the Pkg-haskell-maintainers
mailing list