[GHC] #11834: GHC master, not compiling on Archlinux

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | 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: -------------------------------------+------------------------------------- /usr/bin/ld: -r and -pie may not be used together http://lpaste.net/159726 It appears on Archlinux, with GCC version 5.3.0, there's an implicit -pie flag passed to `ld`. I looked into compiler/main/DriverPipeline.hs at joinObjectFiles, it is unconditionally doing "-Wl,-r", thus the error above. One suggested fix on IRC is to modify getCompilerInfo to know if it supports -no-pie, then add it to the flags that are used. I tried and got somewhere lost in compiler/main/DynFlags.hs. (Completely new to GHC) Hopefully someone can figure it out, it seems important for development and I really want to get involved :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Description changed by nitrix: @@ -10,3 +10,4 @@ - One suggested fix on IRC is to modify getCompilerInfo to know if it - supports -no-pie, then add it to the flags that are used. I tried and got - somewhere lost in compiler/main/DynFlags.hs. (Completely new to GHC) + One suggested fix on IRC is to modify getCompilerInfo to know if the + compiler supports -no-pie, then conditionally add that to flags that are + used. I tried and got somewhere lost in compiler/main/DynFlags.hs. + (Completely new to GHC) New description: /usr/bin/ld: -r and -pie may not be used together http://lpaste.net/159726 It appears on Archlinux, with GCC version 5.3.0, there's an implicit -pie flag passed to `ld`. I looked into compiler/main/DriverPipeline.hs at joinObjectFiles, it is unconditionally doing "-Wl,-r", thus the error above. One suggested fix on IRC is to modify getCompilerInfo to know if the compiler supports -no-pie, then conditionally add that to flags that are used. I tried and got somewhere lost in compiler/main/DynFlags.hs. (Completely new to GHC) Hopefully someone can figure it out, it seems important for development and I really want to get involved :) -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Description changed by nitrix: @@ -15,0 +15,3 @@ + This has bitten Go developers recently as well: + https://go-review.googlesource.com/#/c/18359/ + New description: /usr/bin/ld: -r and -pie may not be used together http://lpaste.net/159726 It appears on Archlinux, with GCC version 5.3.0, there's an implicit -pie flag passed to `ld`. I looked into compiler/main/DriverPipeline.hs at joinObjectFiles, it is unconditionally doing "-Wl,-r", thus the error above. One suggested fix on IRC is to modify getCompilerInfo to know if the compiler supports -no-pie, then conditionally add that to flags that are used. I tried and got somewhere lost in compiler/main/DynFlags.hs. (Completely new to GHC) This has bitten Go developers recently as well: https://go-review.googlesource.com/#/c/18359/ Hopefully someone can figure it out, it seems important for development and I really want to get involved :) -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by slyfox): Does it also mean your default is a -fPIC? What does the follwoing command shows for you? {{{ $ gcc -dM -E - < /dev/null | grep -E -i 'pic|pie' }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Changes (by slyfox): * cc: slyfox (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by nitrix): Sorry for the delay: $ gcc -dM -E - < /dev/null | grep -E -i 'pic|pie' #define __pie__ 2 #define __PIE__ 2 #define __pic__ 2 #define __PIC__ 2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Changes (by Remi): * cc: remi.turk@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by slyfox): #9007 has some hints on how to proceed with gcc and PIC by default detection. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by nomeata): This seems to affect users on Debian unstable (e.g. me) now as well. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Building GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: #12759 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by erikd): * related: => #12759 Comment: There's some more comments in #12759 . -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Building GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: #12759 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by akfp): Also Ubuntu 16.10 breaks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Building GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: #12759 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by msuchanek): It is also broken on openSUSE. I get the {{{ #define __pic__ 2 #define __PIC__ 2 }}} when I pass -fPIC to gcc but passing -pie or -no-pie to gcc-6 does not change any defines and {{{ #define __pie__ 2 #define __PIE__ 2 }}} are never defined. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11834: GHC master, not compiling on Archlinux -------------------------------------+------------------------------------- Reporter: nitrix | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: (Linking) | Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Building GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: #12759 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by slyfox): * status: new => closed * resolution: => duplicate Comment: Closing as duplicate of #12759 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11834#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC