[GHC] #9614: ghc --print-(gcc|ld)-linker-flags broken

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- {{{ rwbarton@morphism:~/ghc$ ghc --print-gcc-linker-flags ghc: panic! (the 'impossible' happened) (GHC version 7.8.3 for x86_64-unknown-linux): Setting not found: "Gcc Linker flags" Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug rwbarton@morphism:~/ghc$ ghc --print-ld-linker-flags ghc: panic! (the 'impossible' happened) (GHC version 7.8.3 for x86_64-unknown-linux): Setting not found: "Ld Linker flags" Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} In 2d2650bf65da3aede4e1c1ca4da623092b869dbe and subsequent commits (between 7.6 and 7.8) these settings fields became "C compiler link flags" and "ld flags". (I think, more or less.) The real problem is that Cabal still looks for the settings fields "Gcc Linker flags" and "Ld Linker flags". I guess this should be updated on the Cabal side though. (They are empty on at least Linux x86_64, which I guess is why nobody noticed before.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by duncan): Or possibly the real problem is that ghc changed the name of these fields unintentionally. Is/was there any reason for the change? When the change was made, did anyone realise that tools like Cabal rely on the names of the keys in the ghc --info key/value mapping? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by MikolajKonarski): I think it was decided here: https://ghc.haskell.org/trac/ghc/ticket/4862#comment:12 and I think it wasn't completely finished, despite the closed ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: 9421 | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by rodlogic): Forgive my intrusion here, but this seems like another side effect of not having a true type-safe API between GHC and Cabal. We are bound to rely on test cases for things that, seems to me, could get a hand from a minimal set of types in a standalone package shared between Cabal and GHC. If kept to a minimum, this package should change as often as there is a real change in the API between GHC and Cabal and no more than that. If we had such API, this problem would either show up when trying to build GHC (if the above change was really a mistake) or show up when compiling Cabal since the API was changed to accommodate the changed flag. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: 9421 | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by nh2): * cc: nh2 (added) * milestone: => 7.10.1 Comment: I set milestone to 7.10 (I hope that makes sense). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: 9421 | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by codygman): Just wanted to say that I'm also affected by this bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: 9421 Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by fabiool): I've also faced this issue. Would be nice to have it fixed sooner. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: 9421 Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by bgamari): Indeed this is a bit unfortunate that this has stood for so long otherwise I would suggest we simply revert the change. As it stands though it seems we have a few compiler releases in the wild with this change so it is more-or-less here to stay. If understand the problem, it seems like the best solution here is to teach Cabal to use `--print-*-flags` ASAP. If this fails, then fall back to looking at `--info`, first with the new field names, and finally the old. It's unfortunate that querying these flags has to be so involved, but that seems to be how things have developed. The other option would be to expose the output as `--info` as a stable interface (which arguably it should be). If we are going to do this we should formally document the fields produced by `--info` so that issues like this don't arise unexpectedly in the future. This could either be as some text in the user guide or a proper type. Thoughts? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: 9421 Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * owner: => bgamari -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9614#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9614: ghc --print-(gcc|ld)-linker-flags broken
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: bgamari
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking: 9421
Related Tickets: | Differential Rev(s):
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC