Version 2.3.0.11 released.<br><br><div class="gmail_quote">On Mon, Feb 13, 2012 at 9:58 AM, Holger Reinhardt <span dir="ltr"><<a href="mailto:hreinhardt@gmail.com">hreinhardt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Did as requested and everything seems to work fine. Test suite also passes:</div><div><br></div><div> Test Cases Total </div><div> Passed 10 10 </div><div> Failed 0 0 </div><div>
Total 10 10 </div>
<div>Test suite simple: PASS</div><div class="HOEnZb"><div class="h5"><div><br></div><div><br></div><br><div class="gmail_quote">2012/2/13 Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've merged and pushed the changes to the "stable" branch on GitHub. If someone could verify that it works fine on Windows, I'll make another release.<div><br></div><div>In addition to running whatever program you're interested in, also run:</div>
<div><br></div><div>cabal clean</div><div>autoreconf</div><div>cabal configure --enable-tests</div><div>cabal build</div><div>cabal test</div><div><br></div><div>All tests should pass.</div><span><font color="#888888"><div>
<br></div><div>-- Johan</div></font></span><div><div>
<div><br></div><div><div><br><div class="gmail_quote">On Wed, Feb 8, 2012 at 11:04 AM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>I will merge this as soon as I get back from vacation.</p><div><div>
<div class="gmail_quote">On Feb 8, 2012 8:54 AM, "Holger Reinhardt" <<a href="mailto:hreinhardt@gmail.com" target="_blank">hreinhardt@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Having discussed the issue privately with Alberto, I've found another bug and updated my pull request [1]. Using that code it should be possible to build the network library on Windows using MSys on GHC 7.4.1.<div><br>
</div><div>[1] <a href="https://github.com/haskell/network/pull/25" target="_blank">https://github.com/haskell/network/pull/25</a><br><br><div class="gmail_quote">2012/2/8 Alberto G. Corona <span dir="ltr"><<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">yes i did it,.<br>
<br>
the error is as follows:<br>
<br>
shop.exe: NetworkSocket.hsc:(948,3)-(1007,23): Non-exhaustive patterns in case<br>
<br>
I will download network form hackage and will do it form the beginning. .<br>
<br>
<br>
<br>
2012/2/8 Holger Reinhardt <<a href="mailto:hreinhardt@gmail.com" target="_blank">hreinhardt@gmail.com</a>>:<br>
<div><div>> Did you run "cabal clean" before rebuilding with Git Bash? And can you post<br>
> the exact runtime error you get?<br>
><br>
> 2012/2/8 Alberto G. Corona <<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>><br>
><br>
>> I switched to Git bash and the runtime error produced by the library<br>
>> is the same.<br>
>> This error may be produced because the configuration it does not<br>
>> detect the netwiorkin related includes such is socket.h. This does not<br>
>> exist neither in the ghc installation neither in GIT/Mingw<br>
>><br>
>><br>
>> 2012/2/7 Holger Reinhardt <<a href="mailto:hreinhardt@gmail.com" target="_blank">hreinhardt@gmail.com</a>>:<br>
>> > I just use the version of MSys that is included with Git [1]. This puts<br>
>> > a<br>
>> > "Git bash" icon on your desktop which you can then use to build the<br>
>> > network<br>
>> > library.<br>
>> ><br>
>> > [1] <a href="http://code.google.com/p/msysgit/" target="_blank">http://code.google.com/p/msysgit/</a><br>
>> ><br>
>> ><br>
>> > 2012/2/7 Alberto G. Corona <<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>><br>
>> >><br>
>> >> Nothing bur a long history of failures. The problem is the<br>
>> >> configuration and versioning of MinGW and MSys. This is a nighmare.<br>
>> >><br>
>> >> 2012/2/7 Holger Reinhardt <<a href="mailto:hreinhardt@gmail.com" target="_blank">hreinhardt@gmail.com</a>>:<br>
>> >> > Oh you are using Cygwin. I'm using MSys so this is why I cannot<br>
>> >> > reproduce<br>
>> >> > your problem. Is there anything preventing you from using MSys?<br>
>> >> ><br>
>> >> ><br>
>> >> > 2012/2/7 Alberto G. Corona <<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>><br>
>> >> >><br>
>> >> >> The "problem" this time is in "Configure" :<br>
>> >> >><br>
>> >> >> case "$host" in<br>
>> >> >> *-mingw32)<br>
>> >> >> EXTRA_SRCS="cbits/initWinSock.c, cbits/winSockErr.c,<br>
>> >> >> cbits/asyncAccept.c"<br>
>> >> >> EXTRA_LIBS=ws2_32<br>
>> >> >> CALLCONV=stdcall ;;<br>
>> >> >> *-solaris2*)<br>
>> >> >> EXTRA_SRCS="cbits/ancilData.c"<br>
>> >> >> EXTRA_LIBS="nsl, socket"<br>
>> >> >> CALLCONV=ccall ;;<br>
>> >> >> *)<br>
>> >> >> EXTRA_SRCS="cbits/ancilData.c"<br>
>> >> >> EXTRA_LIBS=<br>
>> >> >> CALLCONV=ccall ;;<br>
>> >> >> esac<br>
>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >> Since IŽm cross-compiling with cygwin, the variable Host does not<br>
>> >> >> contain š*-muingw32" but "i686-pc-cygwin"<br>
>> >> >><br>
>> >> >> changing the case , the library incorporates the lost C coded files.<br>
>> >> >><br>
>> >> >> Now the library links fine win imported, but there is a runtime<br>
>> >> >> error:<br>
>> >> >><br>
>> >> >> NetworkSocket.hsc:(948,3)-(1007,23): Non-exhaustive patterns in case<br>
>> >> >><br>
>> >> >> maybe it is due to some other preprocessor directive mismatch<br>
>> >> >><br>
>> >> >><br>
>> >> >> 2012/2/7 Holger Reinhardt <<a href="mailto:hreinhardt@gmail.com" target="_blank">hreinhardt@gmail.com</a>>:<br>
>> >> >> > Did you also change the files in the /cbits/ folder? Because they<br>
>> >> >> > also<br>
>> >> >> > check<br>
>> >> >> > for HAVE_WINSOCK_H.<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > 2012/2/7 Alberto G. Corona <<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>><br>
>> >> >> >><br>
>> >> >> >> The code is evolving and none of the versions match exactily with<br>
>> >> >> >> the<br>
>> >> >> >> patch, but substituting HAVE_WINSOCK by HAVE WINSOCK2 in these<br>
>> >> >> >> files<br>
>> >> >> >> solves the compilation problem at least in the network 2.3.0.10<br>
>> >> >> >> version from hackage.<br>
>> >> >> >><br>
>> >> >> >> However it produces the same undefined references when this<br>
>> >> >> >> library<br>
>> >> >> >> is<br>
>> >> >> >> imported in my application. It seems that some object code is not<br>
>> >> >> >> included in the final library. I verified that at least some of<br>
>> >> >> >> these<br>
>> >> >> >> undefined references correspond with C code in the source, but<br>
>> >> >> >> somehow this is not included in the object library....<br>
>> >> >> >><br>
>> >> >> >> 2012/2/7 Johan Tibell <<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>>:<br>
>> >> >> >> > Note that there are two branches on github, master and stable.<br>
>> >> >> >> > You<br>
>> >> >> >> > want<br>
>> >> >> >> > the<br>
>> >> >> >> > latter.<br>
>> >> >> >> ><br>
>> >> >> >> > On Feb 7, 2012 8:23 AM, "Alberto G. Corona"<br>
>> >> >> >> > <<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>><br>
>> >> >> >> > wrote:<br>
>> >> >> >> >><br>
>> >> >> >> >> This is quite different.<br>
>> >> >> >> >> I donŽt know how but I was looking at some other older patch<br>
>> >> >> >> >> around<br>
>> >> >> >> >> the same issue and I supposed that it was the one refered by<br>
>> >> >> >> >> Yohan<br>
>> >> >> >> >> Tibell.<br>
>> >> >> >> >><br>
>> >> >> >> >> IŽll try your patch.<br>
>> >> >> >> >><br>
>> >> >> >> >> Thanks!.<br>
>> >> >> >> >><br>
>> >> >> >> >> 2012/2/7 Holger Reinhardt <<a href="mailto:hreinhardt@gmail.com" target="_blank">hreinhardt@gmail.com</a>>:<br>
>> >> >> >> >> > Hi,<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > (I submitted the patch that Johan linked to)<br>
>> >> >> >> >> > Network/Socket/Internal.hsc has the following code:<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > #if defined(WITH_WINSOCK) || defined(cygwin32_HOST_OS)<br>
>> >> >> >> >> > type CSaFamily = (#type unsigned short)<br>
>> >> >> >> >> > #elif defined(darwin_HOST_OS)<br>
>> >> >> >> >> > type CSaFamily = (#type u_char)<br>
>> >> >> >> >> > #else<br>
>> >> >> >> >> > type CSaFamily = (#type sa_family_t)<br>
>> >> >> >> >> > #endif<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > You have patched this part to always use 'unsigned short'.<br>
>> >> >> >> >> > But<br>
>> >> >> >> >> > the<br>
>> >> >> >> >> > real<br>
>> >> >> >> >> > issue is that WITH_WINSOCK is not defined, even though it<br>
>> >> >> >> >> > should<br>
>> >> >> >> >> > be. The<br>
>> >> >> >> >> > reason for this lies in include/HsNet.h:<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > #if defined(HAVE_WINSOCK_H) && !defined(cygwin32_HOST_OS)<br>
>> >> >> >> >> > # define WITH_WINSOCK 1<br>
>> >> >> >> >> > #endif<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > The problem here is that it checks for HAVE_WINSOCK_H, but<br>
>> >> >> >> >> > the<br>
>> >> >> >> >> > configure<br>
>> >> >> >> >> > script never defines this variable. Instead it<br>
>> >> >> >> >> > defines HAVE_WINSOCK2_H.<br>
>> >> >> >> >> > It<br>
>> >> >> >> >> > seems that the network library used Winsock1 in the past and<br>
>> >> >> >> >> > in<br>
>> >> >> >> >> > the<br>
>> >> >> >> >> > transition to Winsock2 someone forgot to change a few of the<br>
>> >> >> >> >> > #ifdefs.<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > My patch just changes all occurences of HAVE_WINSOCK_H<br>
>> >> >> >> >> > to HAVE_WINSOCK2_H.<br>
>> >> >> >> >> > You might want to try that and report back if it works for<br>
>> >> >> >> >> > you.<br>
>> >> >> >> >> ><br>
>> >> >> >> >> > 2012/2/7 Alberto G. Corona <<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >> Hi Johan,<br>
>> >> >> >> >> >> The patch is not for the current version of network and the<br>
>> >> >> >> >> >> code<br>
>> >> >> >> >> >> is<br>
>> >> >> >> >> >> quite different. Basically it is necesary to define this<br>
>> >> >> >> >> >> variable<br>
>> >> >> >> >> >> as<br>
>> >> >> >> >> >> "unsigned short" that is the thing intended in the patch.<br>
>> >> >> >> >> >> however<br>
>> >> >> >> >> >> I<br>
>> >> >> >> >> >> put it by brute force, without regard of the prerpocessor<br>
>> >> >> >> >> >> directives.<br>
>> >> >> >> >> >> With this change the code compiles well with:<br>
>> >> >> >> >> >><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >> <a href="http://neilmitchell.blogspot.com/2010/12/installing-haskell-network-library-on.html" target="_blank">http://neilmitchell.blogspot.com/2010/12/installing-haskell-network-library-on.html</a><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >> However my compiled library lack the methods defined as<br>
>> >> >> >> >> >> foreign.<br>
>> >> >> >> >> >> IŽll<br>
>> >> >> >> >> >> keep trying.<br>
>> >> >> >> >> >><br>
>> >> >> >> >> >> 2012/2/6 Johan Tibell <<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>>:<br>
>> >> >> >> >> >> > Hi,<br>
>> >> >> >> >> >> ><br>
>> >> >> >> >> >> > Someone recently contributed a fix that should make<br>
>> >> >> >> >> >> > network<br>
>> >> >> >> >> >> > build<br>
>> >> >> >> >> >> > with<br>
>> >> >> >> >> >> > 7.4: <a href="https://github.com/haskell/network/pull/25" target="_blank">https://github.com/haskell/network/pull/25</a><br>
>> >> >> >> >> >> ><br>
>> >> >> >> >> >> > Can you see if that works for you? I haven't yet had time<br>
>> >> >> >> >> >> > to<br>
>> >> >> >> >> >> > merge<br>
>> >> >> >> >> >> > and<br>
>> >> >> >> >> >> > release that fix (I'm on vacation.)<br>
>> >> >> >> >> >> ><br>
>> >> >> >> >> >> > -- Johan<br>
>> >> >> >> >> >> ><br>
>> >> >> >> >> >><br>
>> >> >> >> >> >> _______________________________________________<br>
>> >> >> >> >> >> Haskell-Cafe mailing list<br>
>> >> >> >> >> >> <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
>> >> >> >> >> >> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
>> >> >> >> >> ><br>
>> >> >> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div>
</div></div></blockquote></div><br></div></div>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>