#5620: Dynamic linking and threading does not work on Windows
-------------------------------+--------------------------------------------
Reporter: Lennart | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.4.1
Component: Runtime System | Version: 7.2.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Windows | Blocking:
Architecture: x86 | Failure: Runtime crash
-------------------------------+--------------------------------------------
Changes (by simonmar):
* priority: normal => high
* milestone: => 7.4.1
Comment:
Ok, we understand what's going on here. It relates to our previous
discussion about which libraries are linked to the RTS, and naming issues
for DLLs (and SOs on Unix).
Basically the base package is linked against the vanilla RTS DLL, and the
`-threaded` flag has caused the main program to be linked against the
threaded DLL, with the result that the program is linked against two RTS
DLLs, each with their own state. Obviously this goes wrong.
There's a quick workaround, incidentally. Instead of saying `-threaded`,
do something like this:
{{{
$ cp c:/ghc/ghc-7.2.2/lib/libHSrts_thr-ghc7.2.2.dll libHSrts-ghc7.2.2.dll
}}}
this copies the threaded RTS into the current dir, and renames it to be
the same as the vanilla RTS. So when you run the program, Windows will
look for the RTS DLL and pick up this one first, and the program will
magically be linked against the threaded RTS.
We're looking into how to resolve this mess.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5620#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs