1

I have windows Vista 64 bit. I installed the latest Haskell Platform today (which ghc --version says 7.0.4). I installed the latest cygwin.

I ran cabal install plugins, it had minor issues (I didn't specify prefix path as I should have and there was a missing import in Env.hs), so I cabal expand'ed fixed... it installed.

I run a simple example (specifically this one and I get this error:

Main.exe: user error (loadShared: couldn't load `m' because addDLL: could not load DLL)

Any ideas on how to resolve it?

Oh, and the example works fine on Linux (Ubuntu) GHC 7.0.3, so it's either a Windows for 7.0.4 specific issue.

Community
  • 1
  • 1
mentics
  • 6,852
  • 5
  • 39
  • 93
  • This seems to be a known (but unfixed) problem. Ben Gamari posted a message about it to the libraries list yesterday. http://www.haskell.org/pipermail/libraries/2012-March/017675.html – stephen tetley Mar 20 '12 at 22:24

1 Answers1

0

When it's trying to load libraries, when it looks up the dlls for the integer-gmp package for it receives ["m", "wsock32"]. So the error is caused by it trying to load a dll "m", which apparently doesn't exist. I'm guessing this is a bug somewhere.

After bypassing that, I was able to get further. As Stephen Tetley mentioned, there is another bug about getting an HscEnv. Following that rabit trail, I was able to bypass that. Now, I'm at this error:

Main.exe: Plug.dll.a: Not x86 PEi386 Main.exe: user error (Could not load module `Plug.dll.a')

But I'll mark this question as answered since the specific error I mention in the question is because of what appears to be a bug somewhere in ghc or something.

mentics
  • 6,852
  • 5
  • 39
  • 93
  • Just to add a note that this has been fixed starting with `GHC 7.10.3`. `libm` now works fine on Windows. And import library support (Plug.dll.a) will be landing in either `8.0.2` or `8.2.1`. – Phyx Aug 06 '16 at 07:23