[GHC] #15671: Link errors due to forcibly exporting findPtr

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: T10955dyn | Blocked By: T10955 | Blocking: | Related Tickets: Differential Rev(s): Phab:D5138 | Wiki Page: -------------------------------------+------------------------------------- The change in https://phabricator.haskell.org/rGHC900c47f88784b91517c00be3e1087322e62f698e is causing link errors due to the combination of `-Wl,-u` and `-Wl ,--export-all-symbols` {{{ Wrong exit code for T10955dyn()(expected 0 , actual 2 ) Stderr ( T10955dyn ): E:/ghc- dev/msys64/home/Tamar/ghc/rts/dist/build/libHSrts_thr.a(Printer.thr_o): In function `findPtr': E:\ghc-dev\msys64\home\Tamar\ghc/rts/Printer.c:880: multiple definition of `findPtr' ./bin_dyn/libA.dll.a(d020776.o):(.text+0x0): first defined here }}} I believe the correct solution is to just use a cabal flag to emulate the setup we had with make, instead of forcing this symbol always. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Strange how this doesn't appear to fail on Linux. Nevertheless, the proposed solution sounds reasonable to me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): @bgamari It's another thing DynamicWay hides. In that case the symbol is always just in the Rts Dynlib. But when not-rts way, the rts is always statically linked into any shared library. Such errors would be caught on Linux too if we decide to run the rts tests also in non-DynWay always. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: alpmestan Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | -------------------------------------+------------------------------------- Changes (by alpmestan): * owner: (none) => alpmestan Comment: I will implement the proposed solution this week. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: alpmestan Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): Thanks @alpmestan! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: alpmestan Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | -------------------------------------+------------------------------------- Comment (by alpmestan): I have a GHC patch [https://github.com/alpmestan/ghc/commit/f78e0ae443f48bb2c58819f04d781a3d27c2... here]. I also opened [https://github.com/snowleopard/hadrian/pull/701 an hadrian PR] to verify that this works as expected. When I get it to pass, I'll submit a differential. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: alpmestan Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | Phab:D5356 -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => patch * differential: Phab:D5138 => Phab:D5138 Phab:D5356 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15671: Link errors due to forcibly exporting findPtr
-------------------------------------+-------------------------------------
Reporter: Phyx- | Owner: alpmestan
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: T10955dyn
| T10955
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5138
Wiki Page: | Phab:D5356
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#15671: Link errors due to forcibly exporting findPtr -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: alpmestan Type: bug | Status: closed Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T10955dyn | T10955 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5138 Wiki Page: | Phab:D5356 -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: 8.6.1 => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15671#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC