SFML-haskell / SFML-control

Higher level abstractions on top of SFML
Other
11 stars 2 forks source link

ghc crash on Windows #8

Open jeannekamikaze opened 9 years ago

jeannekamikaze commented 9 years ago

Seems like running cabal install on windows crashes ghc. I don't know to what extent this is our issue or an issue with ghc.

$ cabal install
Resolving dependencies...
Configuring SFML-control-0.2.0.2...
Building SFML-control-0.2.0.2...
Failed to install SFML-control-0.2.0.2
Build log ( C:\Users\Marc\AppData\Roaming\cabal\logs\SFML-control-0.2.0.2.log ):
Building SFML-control-0.2.0.2...
Preprocessing library SFML-control-0.2.0.2...
[4 of 9] Compiling Control.Monad.SFML.Audio ( src\Control\Monad\SFML\Audio.hs, dist\build\Contro
l\Monad\SFML\Audio.o )
ghc.exe: internal error: checkProddableBlock: invalid fixup in runtime linker: 00000000113a00e8
    (GHC version 7.10.2 for x86_64_unknown_mingw32)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cabal: Error: some packages failed to install:
SFML-control-0.2.0.2 failed during the building phase. The exception was:
ExitFailure 3

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.2
adinapoli commented 9 years ago

From my experience (and from the error message we are getting) this is almost always a GHC bug. I would suggest:

  1. Try an older GHC to see if there was a compiler regression
  2. Open a GHC ticket on the issue tracker.

In the past SFML-control triggered another GHC problem, but SPJ was unable to reproduce this on his machine as he needed SFML installed, so it's worth thinking how we could easily smooth the bug reporting process (like shipping the whole lib with hsSFML so that we are dep-free). This is similar to what hipmunk does.

jeannekamikaze commented 9 years ago

As far as I see Hipmunk is a C library. Shipping SFML with HSSFML has multiple problems, the main problem being figuring out where to put DLLs / shared libs so that applications and ghci can pick them up.

jeannekamikaze commented 9 years ago

Funnily enough, I stumbled upon the exact same issue in another project. The funny thing is that if I compile it manually (ghc -o foo foo.hs) it works, but as soon as I roll a cabal file and issue a cabal build, ghc fails with the invalid fixup thing. Seems like there's something royally flawed with ghc on Windows.