[GHC] #10726: Upgrade MingW-w64 distributions for windows

GHC ghc-devs at haskell.org
Tue Nov 24 21:19:49 UTC 2015


#10726: Upgrade MingW-w64 distributions for windows
-------------------------------------+-------------------------------------
        Reporter:  Phyx-             |                Owner:
            Type:  task              |               Status:  patch
        Priority:  high              |            Milestone:  7.10.3
       Component:  Build System      |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #9218 #9014       |  Differential Rev(s):  Phab:D1123
  #10435                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 I'm joining the conversation pretty late here, but how exactly did you
 know which symbols to export in `Linker.c`? I ask since I'm getting some
 pretty similar errors to what you've been reporting with different
 packages.

 For example, when loading `logfloat` in GHCi HEAD:

 {{{
 $ ghc-stage2 --interactive
 GHCi, version 7.11.20151123: http://www.haskell.org/ghc/  :? for help
 > import Data.Number.LogFloat
 > log1p 1.0
 <interactive>: C:\Users\ryanscot\AppData\Roaming\cabal\x86_64-windows-
 ghc-7.11.20151123\logfloat-0.13.3.3-4JZYNCXKwghOD60rvMUAcn\HSlogfloat-0.13.3.3-4JZYNCXKwghOD60rvMUAcn.o:
 unknown symbol `log1p'
 ghc-stage2.exe: unable to load package `logfloat-0.13.3.3'
 }}}

 And when loading `sdl2` in GHCi HEAD:

 {{{
 $ ghc-stage2 --interactive
 GHCi, version 7.11.20151123: http://www.haskell.org/ghc/  :? for help
 > import SDL
 > ticks
 GHC runtime linker: fatal error: I found a duplicate definition for symbol
    wmain
 whilst processing object file
 C:/Users/ryanscot/Documents/Software/ghc/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a
 This could be caused by:
    * Loading two different object files which export the same symbol
    * Specifying the same object file twice on the GHCi command line
    * An incorrect `package.conf' entry, causing some object to be
      loaded twice.
 ghc-stage2.exe: panic! (the 'impossible' happened)
   (GHC version 7.11.20151123 for x86_64-unknown-mingw32):
         loadArchive
 "C:/Users/ryanscot/Documents/Software/ghc/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a":
 failed

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 Is this because `libmingw32`/`libmingwex` aren't being linked against when
 building GHC? Also, how can I figure out which symbols to reexport as a
 temporary fix?

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


More information about the ghc-tickets mailing list