[GHC] #12595: Linker failure: multiple definition of

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: | Owner: MikolajKonarski | Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: GHC rejects (amd64) | valid program Test Case: | Blocked By: Blocking: | Related Tickets: #10531 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Linker fails on a normal project built with cabal (-O1), both on my home machine (GNU gold (GNU Binutils for Ubuntu 2.22) 1.11) and on travis with GHC 8.0.1: https://travis-ci.org/LambdaHack/LambdaHack/jobs/159457149#L589 and with head: https://travis-ci.org/LambdaHack/LambdaHack/jobs/159457156#L602 It compiles fine with -O0 (but if fails with -O2): https://travis-ci.org/LambdaHack/LambdaHack/jobs/159457144 with older GHCs: https://travis-ci.org/LambdaHack/LambdaHack/jobs/159457155 and after the symbol the linker complains about is removed: https://travis-ci.org/LambdaHack/LambdaHack/jobs/159506870 As seen on travis, the way to reproduce it is just cabal install of https://github.com/LambdaHack/LambdaHack/commit/0d2bbd6eadca7a10292ab67ab1fa... which also shows the offending line. I took the liberty of adding it to 8.0.2 milestone, because if it affects all x86_64 machines, it's pretty serious. Please feel free to downgrade. If the bug is confirmed, I can attempt creating a small reproducing case, but it would require gtk, so it would compile forever anyway. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: GHC rejects | (amd64) valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Hmm, oddly enough I encounter a completely unrelated segfault(!) while building `functor-infix` when trying to reproduce this. GHC appears to crash right after linking. It seems your project is cursed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: GHC rejects | (amd64) valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): I managed to reproduce this. It has something to do with BangPatterns apparently. Here is a reproducer with just two modules: {{{ -- U.hs module U where u :: Int u = 1 -- Main.hs {-# LANGUAGE BangPatterns #-} import U main = print $ let !x = u in x }}} `ghc-8.0.1 -O Main` fails with the same sort of linker error. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: GHC rejects | (amd64) valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Great test case thank you Reid. It's something to do with desugaring of bang patterns. Stay tuned. I'm on a plane tomorrow... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: GHC rejects | (amd64) valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by MikolajKonarski): * cc: mikolaj.konarski@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12595: Linker failure: multiple definition of
-------------------------------------+-------------------------------------
Reporter: MikolajKonarski | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: GHC rejects | (amd64)
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: #10531 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: GHC rejects | Test Case: valid program | deSugar/should_run/T12595 Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => merge * testcase: => deSugar/should_run/T12595 Comment: Thanks for such a nice small test case! Ben: worth merging this if it's trouble-free -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: GHC rejects | Test Case: valid program | deSugar/should_run/T12595 Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: comment:5 merged to `ghc-8.0` as d2695b842dc8ba94fbfb8527f13c7fd14611facb. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12595#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC