[GHC] #12759: Latest Debian GCC breaks GHC

GHC ghc-devs at haskell.org
Wed Nov 2 19:24:14 UTC 2016


#12759: Latest Debian GCC breaks GHC
-----------------------------+----------------------------------------
        Reporter:  erikd     |                Owner:
            Type:  bug       |               Status:  new
        Priority:  normal    |            Milestone:  8.0.2
       Component:  Compiler  |              Version:  8.0.1
      Resolution:            |             Keywords:
Operating System:  Linux     |         Architecture:  Unknown/Multiple
 Type of failure:  Other     |            Test Case:
      Blocked By:            |             Blocking:
 Related Tickets:            |  Differential Rev(s):
       Wiki Page:            |
-----------------------------+----------------------------------------

Comment (by erikd):

 I grabbed the source for "magic", unpacked them and tried to build them.
 `hsc2hs` failed so I added `-v` to the command line and this is what I
 got:
 {{{
 > /usr/lib/ghc-8.0/bin/hsc2hs -v '--cc=/usr/bin/gcc' '--ld=/usr/bin/gcc'
   '--cflag=-fno-PIE' '--cflag=-fno-stack-protector' '--lflag=-fno-PIE'
   '--lflag=-fno-stack-protector' '--cflag=-D__GLASGOW_HASKELL__=800'
   '--cflag=-Dlinux_BUILD_OS=1' '--cflag=-Dx86_64_BUILD_ARCH=1'
   '--cflag=-Dlinux_HOST_OS=1' '--cflag=-Dx86_64_HOST_ARCH=1'
   '--cflag=-Idist/build/autogen''--cflag=-include'
   '--cflag=dist/build/autogen/cabal_macros.h' '--lflag=-lmagic'
   '--cflag=-I/usr/lib/ghc-8.0/lib/base-4.9.0.0/include'
   '--cflag=-I/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1/include'
   '--cflag=-I/usr/lib/ghc-8.0/lib/include'
   '--lflag=-L/usr/lib/ghc-8.0/lib/base-4.9.0.0'
   '--lflag=-Wl,-R,/usr/lib/ghc-8.0/lib/base-4.9.0.0'
   '--lflag=-L/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1'
   '--lflag=-Wl,-R,/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1'
   '--lflag=-lgmp' '--lflag=-L/usr/lib/ghc-8.0/lib/ghc-prim-0.5.0.0'
   '--lflag=-Wl,-R,/usr/lib/ghc-8.0/lib/ghc-prim-0.5.0.0'
   '--lflag=-L/usr/lib/ghc-8.0/lib/rts'
   '--lflag=-Wl,-R,/usr/lib/ghc-8.0/lib/rts' '--lflag=-lm'
   '--lflag=-lrt' '--lflag=-ldl' '--lflag=-lffi'
   -o dist/build/Magic/Data.hs Magic/Data.hsc

 Executing: /usr/bin/gcc -c dist/build/Magic/Data_hsc_make.c -o
    dist/build/Magic/Data_hsc_make.o -fno-stack-protector -fno-PIE
   -fno-stack-protector -D__GLASGOW_HASKELL__=800 -Dlinux_BUILD_OS=1
   -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1
   -Idist/build/autogen -include dist/build/autogen/cabal_macros.h
   -I/usr/lib/ghc-8.0/lib/base-4.9.0.0/include
   -I/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1/include
   -I/usr/lib/ghc-8.0/lib/include -I/usr/lib/ghc-8.0/lib/include/

 Executing: /usr/bin/gcc -c dist/build/Magic/Data_hsc_utils.c -o
   dist/build/Magic/Data_hsc_utils.o -fno-stack-protector -fno-PIE
   -fno-stack-protector -D__GLASGOW_HASKELL__=800 -Dlinux_BUILD_OS=1
   -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1
   -Idist/build/autogen -include dist/build/autogen/cabal_macros.h
   -I/usr/lib/ghc-8.0/lib/base-4.9.0.0/include
   -I/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1/include
   -I/usr/lib/ghc-8.0/lib/include -I/usr/lib/ghc-8.0/lib/include/

 Executing: /usr/bin/gcc dist/build/Magic/Data_hsc_make.o
   dist/build/Magic/Data_hsc_utils.o -o dist/build/Magic/Data_hsc_make
   -fno-PIE -fno-stack-protector -lmagic
 -L/usr/lib/ghc-8.0/lib/base-4.9.0.0
   -Wl,-R,/usr/lib/ghc-8.0/lib/base-4.9.0.0
   -L/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1
   -Wl,-R,/usr/lib/ghc-8.0/lib/integer-gmp-1.0.0.1 -lgmp
   -L/usr/lib/ghc-8.0/lib/ghc-prim-0.5.0.0
   -Wl,-R,/usr/lib/ghc-8.0/lib/ghc-prim-0.5.0.0 -L/usr/lib/ghc-8.0/lib/rts
   -Wl,-R,/usr/lib/ghc-8.0/lib/rts -lm -lrt -ldl -lffi

 /usr/bin/ld: dist/build/Magic/Data_hsc_make.o: relocation R_X86_64_32
 against
   `.rodata' can not be used when making a shared object; recompile with
 -fPIC
 }}}

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


More information about the ghc-tickets mailing list