[GHC] #8830: internal error: Misaligned section: 18206e5b on Windows

GHC ghc-devs at haskell.org
Mon Mar 30 19:03:04 UTC 2015


#8830: internal error: Misaligned section: 18206e5b on Windows
-------------------------------+-------------------------------------
        Reporter:  joeyhess    |                   Owner:
            Type:  bug         |                  Status:  infoneeded
        Priority:  lowest      |               Milestone:
       Component:  Compiler    |                 Version:  7.6.3
      Resolution:              |                Keywords:
Operating System:  Windows     |            Architecture:  x86
 Type of failure:  GHCi crash  |               Test Case:
      Blocked By:              |                Blocking:
 Related Tickets:              |  Differential Revisions:
-------------------------------+-------------------------------------

Comment (by mtolly):

 This appears to specifically happen when you link in static C libraries
 during TH on Windows. MinGW's linker will automatically prefer static
 libraries over dynamic ones if it finds them, so you can work around it by
 only using dynamic libraries. Here's what I did:

 I have an executable that uses libsndfile, and its Haskell binding
 hsndfile, and also uses TH. On Windows XP with MinGW/MSYS, I compiled and
 installed libsndfile and its dependencies, and installed hsndfile, but
 when it got to the module that needs TH, I got:

 {{{
 Loading package hsndfile-0.7.1 ... ghc.exe: internal error: Misaligned
 section .eh_frame: 0d035673
     (GHC version 7.8.3 for i386_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.
 }}}

 So, I went into the lib/ folder I had installed the C libraries into, and
 deleted all the static libraries (like libsndfile.a), leaving only e.g.
 libsndfile.dll.a and libsndfile.la, plus libsndfile-1.dll in my bin/
 folder. Then I recompiled all the Haskell packages that used C libs
 (hsndfile and everything on top of it). Tried to compile the executable
 again, and it complained of not being able to find "sndfile.dll". So I
 just copied libsndfile-1.dll to sndfile.dll, and then it compiled and ran
 fine.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8830#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list