HeinrichApfelmus / hyper-haskell

The strongly hyped Haskell interpreter.
Other
361 stars 24 forks source link

reference to 'acceptNewSock' undefined #26

Closed chenyulue closed 5 years ago

chenyulue commented 5 years ago

I installed the hyper-haskell-server with Haskell-platform-8.6.3 as follows: cabal unpack hyper-haskell-server ——> change the dependencies in the .cabal file ——> cabal build

However, I got the following errors:

Failed to install hyper-haskell-server-0.2.1.0 Build log ( D:\Program Files\Haskell Platform\cabal\logs\ghc-8.6.3\hyper-haskell-server-0.2.1.0-CozCChDfS9X97YEz3apKeV.log ): Preprocessing executable 'hyper-haskell-server' for hyper-haskell-server-0.2.1.0.. Building executable 'hyper-haskell-server' for hyper-haskell-server-0.2.1.0.. [1 of 1] Compiling Main ( Main.hs, dist\build\hyper-haskell-server\hyper-haskell-server-tmp\Main.o ) Linking dist\build\hyper-haskell-server\hyper-haskell-server.exe ... D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(Socket.o):fake:(.text+0x12ba1):对‘acceptNewSock’未定义的引用 (means undefined reference to 'acceptNewSock'. The following are the silimar error message.) D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(Socket.o):fake:(.text+0x12e7a):对‘newAcceptParams’未定义的引用 D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(Socket.o):fake:(.text+0x12e8e):对‘acceptDoProc’未定义的引用 D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(Internal.o):fake:(.text+0x18b):对‘initWinSock’未定义的引用 D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(Internal.o):fake:(.text+0x383):对‘getWSErrorDescr’未定义的引用 D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(HsNet.o):HsNet.c:(.text+0x13):对‘imp_getnameinfo’未定义的引用 D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(HsNet.o):HsNet.c:(.text+0x23):对‘imp_getaddrinfo’未定义的引用 D:\Program Files\Haskell Platform\cabal\x86_64-windows-ghc-8.6.3\network-2.8.0.0-2CyxvHbPvRZAIM6yl0QQaq/libHSnetwork-2.8.0.0-2CyxvHbPv RZAIM6yl0QQaq.a(HsNet.o):HsNet.c:(.text+0x33):对‘__imp_freeaddrinfo’未定义的引用 collect2.exe: error: ld returned 1 exit status gcc.exe' failed in phaseLinker'. (Exit code: 1) cabal: Leaving directory '.'

My cabal version is 2.4.1.0, ghc 8.6.3.

I think this is probably due to the newest haskell platform I used. But I don't know how to fix it.

Thanks for any help!

HeinrichApfelmus commented 5 years ago

I am afraid I cannot offer much help here. The error messages indicate that it's an issue with linking the network library. One possible reason is that the source code was compiled for one library, but then linked with another that happened to come earlier in the path.