[GHC] #15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie'

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' -------------------------------------+------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ % cat Nopie.hs module Nopie where main :: IO () main = putStrLn "hi" % ghc -fforce-recomp -c -fhpc Nopie.hs clang: warning: argument unused during compilation: '-nopie' [-Wunused- command-line-argument] clang: warning: argument unused during compilation: '-nopie' [-Wunused- command-line-argument] }}} This happens for every source file when -fhpc is given, but also happens on links even when -fhpc isn't given. With -v, I see a call to gcc with -no-pie. When I run the same compile with ghc 8.4.1, I see the same call to gcc, only without that -no-pie flag, so this is new. It seems to be a harmless warning, but really clutters up the output. Incidentally, it looks like the particular spelling of -no-pie was added to LLVM a year ago due to ghc: https://reviews.llvm.org/D35462 Not sure if that's relevant. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by elaforge): * os: Unknown/Multiple => MacOS X -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by elaforge): Actually I see this with 8.4.1 too. This is probably related to the latest OS X update, not ghc version. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by bgamari): Yes, it sounds like it. Does this occur with a fresh installation of GHC? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by elaforge): By "fresh" do you mean HEAD? I haven't tried that yet. I do still see this when I run 8.4.2 as downloaded from https://www.haskell.org/ghc/download_ghc_8_4_2.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by bgamari): Hmm, I'm a bit surprised that `configure` doesn't realize that `-nopie` isn't a valid flag. Do you have any insight into why this might be? `config.log` would be interesting to see. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by elaforge): I think it does, because I compiled from HEAD and I don't get the warning. Of course the existing 8.4.2 binary was compiled before the latest OS X version, so it won't have that. So maybe we just wait for this to go away in the next release? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by niteria): I couldn't build GHC HEAD with GHC 8.2.2 because of this error. Modifying `/usr/local/lib/ghc-8.2.2/settings` to: {{{ ... ("C compiler supports -no-pie", "NO"), ... }}} worked it around for me. Perhaps a reinstall works as well, I haven't tried. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by hvr): I investigated a bit, and for those wondering what is going on here, this is caused by a change in Apple's latest Xcode toolchain major version... as usual... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by mcandre): Same error on my machine. I am working around this by using ghc 8.2 instead of ghc HEAD: {{{ $ brew install ghc@8.2 $ brew link --force ghc@8.2 $ brew install cabal-install }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by goldfire): * priority: normal => highest * milestone: 8.8.1 => 8.6.1 Comment: I'm going to bump the priority here. I just downloaded the 8.4.3 (yes, I know, behind the times) binaries for my Mac and installed them with `./configure; make install`. Now, every time I link an executable, I get {{{ clang: warning: argument unused during compilation: '-nopie' [-Wunused- command-line-argument] }}} I downloaded straight from `downloads.haskell.org/~ghc/8.4.3`. As comment:7 suggests, if I adjust the `settings` file, all is well. It seems easy enough to fix this, and we're giving a bad user experience without this fix. If you disagree with my priority bump (either because, say, there's something unique about my setup which makes my experience atypical; or because this is actually hard to fix and shouldn't be a release blocker) feel free to reverse my actions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by George): I can't reproduce in ghc alpha 8.6.1. I used to see this but I think it is fixed by the latest GHC or by MacOS 13.6 Here are the version details {{{ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.6.0.20180714 bash-3.2$ gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include- dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by bgamari): goldfire, have you seen this with 8.6? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: infoneeded Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by George): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: infoneeded Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by George): I can confirm I don't see it with 8.6.1 final -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by bgamari): * status: infoneeded => closed * resolution: => fixed Comment: Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by bgamari): This was fixed by cbd73bbbb7df080d5204098aa02e5f5d0d48823c. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15112: ghc 8.4.2 on OS X: clang: warning: argument unused during compilation: '-nopie' ---------------------------------+---------------------------------------- Reporter: elaforge | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by bgamari): Unfortunately this fix didn't make it into 8.4.4. If you are experiencing this look at comment:7 for a workaround. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15112#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC