[GHC] #15894: Cannot find symbol during interactive linking using new-repl on Windows
#15894: Cannot find symbol during interactive linking using new-repl on Windows --------------------------------------+---------------------------- Reporter: YellPika | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Keywords: | Operating System: Windows Architecture: x86_64 (amd64) | Type of failure: Other Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------------+---------------------------- Originally from https://github.com/haskell/cabal/issues/5683. I get the following error on Windows 10: {{{
cabal new-repl --build-depends=ieee754
... GHCi loads ... Prelude> import Numeric.IEEE Prelude Numeric.IEEE> infinity ghc.exe: | C:\Users\Anthony\AppData\Roaming\cabal\store\ghc-8.6.2\ieee754-0.8.0-7eecc33cf22b0ebf4d3c4dda98cc9f039432a266\lib\libHSieee754-0.8.0-7eecc33cf22b0ebf4d3c4dda98cc9f039432a266.a: unknown symbol `copysign' ghc.exe: ^^ Could not load 'ieee754zm0zi8zi0zm7eecc33cf22b0ebf4d3c4dda98cc9f039432a266_NumericziIEEE_infinity_closure', dependency unresolved. See top entry above. ByteCodeLink.lookupCE During interactive linking, GHCi couldn't find the following symbol: ieee754zm0zi8zi0zm7eecc33cf22b0ebf4d3c4dda98cc9f039432a266_NumericziIEEE_infinity_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. If you suspect the latter, please send a bug report to: glasgow-haskell-bugs@haskell.org }}} This occurs with both cabal-install 2.4.0.0 and HEAD. This does not occur if I install ieee754 into a sandbox and use `cabal repl`. It also works correctly on Ubuntu 18.04 (on both WSL and a full installation), so it looks like a Windows-specific problem. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15894> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15894: Cannot find symbol during interactive linking using new-repl on Windows -----------------------------+---------------------------------------- Reporter: YellPika | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: Other | Test Case: T15894 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5353 Wiki Page: | -----------------------------+---------------------------------------- Changes (by Phyx-): * status: new => patch * testcase: => T15894 * differential: => Phab:D5353 * architecture: x86_64 (amd64) => Unknown/Multiple -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15894#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15894: Cannot find symbol during interactive linking using new-repl on Windows -----------------------------+---------------------------------------- Reporter: YellPika | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: Other | Test Case: T15894 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5353 Wiki Page: | -----------------------------+---------------------------------------- Comment (by Tamar Christina <tamar@…>): In [changeset:"a8b7cef4d45a5003bf7584e06912f0f632116c71/ghc" a8b7cef4/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="a8b7cef4d45a5003bf7584e06912f0f632116c71" linker: store entire link map and use it. Summary: This fixes a corner case in which we have seen the symbol multiple times in different static libraries, but due to a depencency we end up loading the symbol from a library other than the first one. Previously the runtime linker would only track symbols from the first library and did not store the full link map. In this case it was unable to find the address for the symbols in the second library during delay loading. This change stores the address of all symbols seen so a full link map is generated, such that when we make a different decision later than what was expected we're able to still correctly load the library. Test Plan: ./validate, new testcase T15894 Reviewers: angerman, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15894 Differential Revision: https://phabricator.haskell.org/D5353 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15894#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15894: Cannot find symbol during interactive linking using new-repl on Windows -----------------------------+---------------------------------------- Reporter: YellPika | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: Other | Test Case: T15894 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5353 Wiki Page: | -----------------------------+---------------------------------------- Changes (by Phyx-): * status: patch => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15894#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15894: Cannot find symbol during interactive linking using new-repl on Windows -----------------------------+---------------------------------------- Reporter: YellPika | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Resolution: fixed | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: Other | Test Case: T15894 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5353 Wiki Page: | -----------------------------+---------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15894#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC