[GHC] #10955: GHC on windows does not resolve DLL dependencies

#10955: GHC on windows does not resolve DLL dependencies -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Runtime | Version: 7.10.2 System (Linker) | Keywords: | Operating System: Windows Architecture: | Type of failure: Runtime crash Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- GHC does not correctly tell the Windows Loader how to handle dependencies to dll's that are not on the standard windows load path: 1. The directory from which the application loaded. 2. The current directory. 3. The system directory. Use the `GetSystemDirectory` function to get the path of this directory. 4. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched. 5. The Windows directory. Use the `GetWindowsDirectory` function to get the path of this directory. 6. The directories that are listed in the `PATH` environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path. So what this means is given two DLLs `A` and `B` and `B` depending on `A`. If we put both DLLs into a new folder `bin` and then call GHC with: `ghc -L$(PWD)/bin -lB` the loading will fail as the Windows loader will try to load the dependency of `B` and fail since it cannot find `A`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10955 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10955: GHC on windows does not resolve DLL dependencies -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): There are new APIs introduced in Windows vista+ that allow us to modify the loader load path reliably. However this means dropping XP support. If XP Support is required we can resort to modifying the `PATH` variables. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10955#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10955: GHC on windows does not resolve DLL dependencies -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thoughtpolice): I proposed quite a while back to actually drop XP support: https://mail.haskell.org/pipermail/ghc-devs/2014-November/007199.html Personally, I say we go for it. Of course, some people might not like this, but I think dropping XP for 8.0 is pretty reasonable. Even Windows Server 2k3 is EOL now, and we won't be releasing for a few months still. And it's not like 7.10 or whatever will stop existing. At the very least, if you can cook up a patch and people rally against it, we can apply it to HEAD and just say 8.2 will definitively remove it and that's that. But I imagine it would be fine for 8.0 as well. In short, you have my permission to use the launch codes, and nuke it from orbit. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10955#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10955: GHC on windows does not resolve DLL dependencies -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1340 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => patch * differential: => Phab:D1340 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10955#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10955: GHC on windows does not resolve DLL dependencies
-------------------------------------+-------------------------------------
Reporter: Phyx- | Owner: Phyx-
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.1
Component: Runtime System | Version: 7.10.2
(Linker) |
Resolution: | Keywords:
Operating System: Windows | Architecture:
| Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1340
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Tamar Christina

#10955: GHC on windows does not resolve DLL dependencies -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1340 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10955#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC