[Haskell-cafe] Re: Building network package on Windows
iavor.diatchki at gmail.com
Sun Jun 7 20:04:19 EDT 2009
Here is an update, in case anyone else runs into the same problem.
My understanding, is that the problem was caused by a mistake in the
"configure" script for the "network" package, which after (correctly)
detecting that IPv6 functionality was not available on my platform, it
(incorrectly) tried to "gain" this functionality by redefining the
version of my platform. Concretely, apparently I have "Windows Vista
Basic Home Edition", which seems to identify itself as version 0x400,
while the missing functions are only available on versions of windows
My workaround was to:
1. checkout the network package from the repository on code.haskell.com
2. modify configure.ac to comment out the section where it sets the
windows version to 0x501
4. build using the usual cabal way
Another thing to watch out for: if you already have packages that
were built against the old version of network, they will continue to
use that. So, I had to:
1. remove all of these packages,
2. remove the old version of network (to avoid confusion), and
3. then resintall the packages.
It would be nice if we had a more automatic way to do that (perhaps we
do, but I don't know it?). It seems that if this is not done GHC
could panic, which is what happened to me. I am not sure why that
happened but I am guessing that it was related to the fact that
interface to the package changed without its version changing.
In general, it seems a bad idea that the same version of the network
package exhibits different APIs, depending on the configuration of the
On Sat, Jun 6, 2009 at 9:43 PM, Iavor Diatchki<iavor.diatchki at gmail.com> wrote:
> I have been trying to build the package "network" from hackage
> (version 220.127.116.11) on Windows Vista, and I could really use some help.
> Building on the command line, or under cygwin completely failed
> (command line due to cabal not being able to execute
> something---possibly configure---although it would not say; cygwin
> first due to lack of gcc, which is tested but, apparently, the outcome
> ignored, and after gcc was installed some incompatibility with the
> header files which were detected but reported unusable).
> I managed to build the library under MinGW with msys without serious
> obstacles. I can also build my package against the result and all is
> well. Unfortunately, if I try to use my package to build an
> executable application I get a linker error, reporting a missing
> symbol during linking:
> undefined reference to `getnameinfo'
> collect2: ld returned 1 exit status
> Now, "getnameinfo" is present in the header files, and it is also
> defined in the library ws2_32.a which is being passed to GHC so I am
> not sure what is going on. Any ideas? Searching the web suggests
> that the problem may be somehow related to the standard calling
> conventions but I don't really understand. Also, if I understand
> correctly, this functionality is related to IPv6 support, which I do
> not need at the moment, so it would be great if it could be easily
> disabled in some way.
> Any ideas, suggestion, workarounds, etc. would be greatly appreciated,
> PS: I am using GHC 6.10.3
More information about the Haskell-Cafe