[GHC] #12755: Build from source fails on Ubuntu 16.10: ld: -r and -pie may not be used together

GHC ghc-devs at haskell.org
Sun Oct 23 05:13:22 UTC 2016


#12755: Build from source fails on Ubuntu 16.10: ld: -r and -pie may not be used
together
-------------------------------------+-------------------------------------
           Reporter:  SamuelMarks    |             Owner:
               Type:  bug            |            Status:  new
           Priority:  high           |         Milestone:
          Component:  Build System   |           Version:  8.0.1
           Keywords:                 |  Operating System:  Linux
       Architecture:  x86_64         |   Type of failure:  Building GHC
  (amd64)                            |  failed
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{
 "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O
 -Wall      -this-unit-id ghc-prim-0.5.0.0 -hide-all-packages -i
 -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -ilibraries
 /ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-
 install/build -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries
 /ghc-prim/.    -optP-include -optPlibraries/ghc-prim/dist-
 install/build/autogen/cabal_macros.h -package-id rts -this-unit-id ghc-
 prim -XHaskell2010 -O2  -no-user-package-db -rtsopts -Wno-trustworthy-safe
 -Wno-deprecated-flags     -Wnoncanonical-monad-instances  -odir libraries
 /ghc-prim/dist-install/build -hidir libraries/ghc-prim/dist-install/build
 -stubdir libraries/ghc-prim/dist-install/build -split-objs  -dynamic-too
 -c libraries/ghc-prim/./GHC/Types.hs -o libraries/ghc-prim/dist-
 install/build/GHC/Types.o -dyno libraries/ghc-prim/dist-
 install/build/GHC/Types.dyn_o
 /usr/bin/ld: -r and -pie may not be used together
 collect2: error: ld returned 1 exit status
 `gcc' failed in phase `Linker'. (Exit code: 1)
 libraries/ghc-prim/ghc.mk:4: recipe for target 'libraries/ghc-prim/dist-
 install/build/GHC/Types.o' failed
 make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1
 Makefile:129: recipe for target 'all' failed
 make: *** [all] Error 2
 }}}

 Googling showed other builds with similar errors, for a bug report [which
 is now resolved]:
 - https://wiki.ubuntu.com/SteveBeattie/PIENotes
 - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1518483

 Running with `ld` GNU ld (GNU Binutils for Ubuntu) 2.27.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12755>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list