2

I have this simple code:

import Network
main = return ()

executing it with runhaskell fails:

>runhaskell test.hs
test.hs: C:\ghc\ghc-6.10.4\network-2.2.1.2\HSnetwork-2.2.1.2.o: unknown symbol `_getnameinfo'
test.hs: test.hs: unable to load package `network-2.2.1.2'

GHCi also gives simillar error message. What can I do about it?

I am using GHC 6.10.4 on Windows 2000.

2 Answers 2

2

Likely this means the binary distribution of GHC you installed was built against a different C library to the one on your system. Try reinstalling GHC using the Haskell Platform: http://hackage.haskell.org/platform/

Sign up to request clarification or add additional context in comments.

5 Comments

I've installed binary distribution from GHC website, previous one (6.8.1) worked fine. Should I consider this to be a bug in 6.10.4 distribution?
Please try the Haskell Platform windows installer, then report back if it is still a problem: hackage.haskell.org/platform
Haskell Platform 2009.2.0.2 has the same problem.
I think this is probably the reason that network-2.4.2.2 isn't working for me under the GHC 7.8 release candidate.
@DougMcClean, same issue here, w/ 7.6.3 though and network-2.4.1.2
0

You can use cabal to try and reinstall the package. I had similar behavior with the CGI library and forcing a reinstall fixed it.

5 Comments

But how to do this? When I do this: network-2.2.1.4>runghc Setup.hs configure I've got this: Configuring network-2.2.1.4... Setup.hs: sh: runGenProcess: does not exist (No such file or directory)
This will not help. There is no sh on Windows.
cabal comes with the Windows Haskell Platform installation. Just start->run->cmd and type the commands above.
1. Cabal that comes with Haskell Platform doesn't work on Win2000. 2. Sh is not part of Windows nor Haskell Platform (network package requires sh). 3. I've used sh from MSys and sucesfully built network package, but the problem persists. Network package simply can not work on Win2000 because it uses functions like: getaddrinfo, freeadrrinfo, getnameinfo. Those funcs don't exist on that OS. GHC and Haskell Platform teams didn't even bother to test their code on Win2k.
Ok. I'll take this as a bug report against the network package on Windows 2k. Thanks. I assume you reported this today (I saw a bug report). The more users report bugs on old systems (Win2k is a decade old!) the better we can hope to have good test coverage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.