Skip to content

linker fails to load package with binding to foreign library (win64)

GHCI is unable to load some packages on Win64, the examples are given for the ansi-terminal and network packages. The versions:

$ ghci --version
The Glorious Glasgow Haskell Compilation System, version 7.6.0.20120810
$ ghc-pkg.exe list ansi-terminal
c:/mnt/data1/ghc-7.6.0.20120810\lib\package.conf.d:
    ansi-terminal-0.5.5
$ ghc-pkg.exe list network
c:/mnt/data1/ghc-7.6.0.20120810\lib\package.conf.d:
    network-2.3.1.0

The failures:

$ ghci
GHCi, version 7.6.0.20120810: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> import System.Console.ANSI
Prelude System.Console.ANSI> Black
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.0 ... linking ... done.
Loading package Win32-2.3.0.0 ... linking ... done.
Loading package ansi-terminal-0.5.5 ... linking ... <interactive>: internal error: R_X86_64_PC32: High bits are set in 7fefbc8ebf2 for _get_osfhandle
    (GHC version 7.6.0.20120810 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.
$ ghci
GHCi, version 7.6.0.20120810: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Network
Prelude Network> listenOn (PortNumber 2222)
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.0 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package text-0.11.2.3 ... linking ... done.
Loading package parsec-3.1.3 ... linking ... done.
Loading package network-2.3.1.0 ... linking ... <interactive>: internal error:
_X86_64_PC32: High bits are set in 7fef7d8b47a for setsockopt
    (GHC version 7.6.0.20120810 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.
Trac metadata
Trac field Value
Version 7.6.1-rc1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related #7097 (closed), #7134 (closed)
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information