[GHC] #13431: Linker error related to atan and ntdll on 32-bit Windows

GHC ghc-devs at haskell.org
Thu Mar 16 14:29:04 UTC 2017


#13431: Linker error related to atan and ntdll on 32-bit Windows
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:  x86
 Type of failure:  GHC rejects       |            Test Case:
  valid program                      |
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 The issue stems from the order in which `ntdll` and `msvcrt` are given to
 the linker when compiling the executable. If you compile with `-v3`,
 you'll discover this linker invocation:

 {{{
 "gcc.exe" ... "-lntdll" ... "-lmsvcrt" ...
 }}}

 If you swap the order in which `msvcrt` and `ntdll` are linked:

 {{{
 "gcc.exe" ... "-lmsvcrt" ... "-lntdll" ...
 }}}

 Then it works.

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


More information about the ghc-tickets mailing list