Re: [Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-21 Thread Sigbjorn Finne

I don't really have the time, but here's some debugging
code that'll maybe help diagnosing why/if WinSock is failing
to start up:

- compile the attached initws.c via ghc,

foo$ ghc -c initws.c

- run some tests

foo$ ghc -package net IWS.hs initws.o -e "initWS 1 1 >>= print"
foo$ ghc -package net IWS.hs initws.o -e "initWS 2 2 >>= print"
foo$ ghc -package net IWS.hs initws.o -e "initWS 1 1 >> 
Network.BSD.getProtocolByName \"tcp\" >>= print"
foo$ ghc -package net IWS.hs initws.o -e "initWS 2 2 >> 
Network.BSD.getProtocolByName \"tcp\" >>= print"


initWS returns 0 on success.

The GHC networking support is ultra-conservative wrt WinSock versioning,
sticking with 1.1 for max portability. Perhaps that's working against us 
here?


Needless to say, this is working for me (on a pair of XP boxes.)

--sigbjorn

- Original Message - 
From: "Joel Reymont" <[EMAIL PROTECTED]>

To: "Simon Marlow" <[EMAIL PROTECTED]>
Cc: "Haskell Cafe" ; <[EMAIL PROTECTED]>
Sent: Friday, October 21, 2005 06:31
Subject: Re: [Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows


It stopped happening for me on WinXP but it's still happening for my 
customer on Win2K.


On Oct 21, 2005, at 1:45 PM, Simon Marlow wrote:



Nope, actually it also happens for me with the updated installer.

Sigbjorn - any ideas?  It doesn't happen with my local STABLE  build, but
I'm still using gcc 3.2.x.



initws.c
Description: Binary data


IWS.hs
Description: Binary data
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-21 Thread Joel Reymont
It stopped happening for me on WinXP but it's still happening for my  
customer on Win2K.


On Oct 21, 2005, at 1:45 PM, Simon Marlow wrote:



Nope, actually it also happens for me with the updated installer.

Sigbjorn - any ideas?  It doesn't happen with my local STABLE  
build, but

I'm still using gcc 3.2.x.



--
http://wagerlabs.com/






___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-21 Thread Simon Marlow
Nope, actually it also happens for me with the updated installer.

Sigbjorn - any ideas?  It doesn't happen with my local STABLE build, but
I'm still using gcc 3.2.x.

Cheers,
Simon

On 21 October 2005 13:33, Simon Marlow wrote:

> Please try the updated installer for 6.4.1.  I believe this is caused
> by the same bug in the dynamic linker that was fixed in the update. 
> At least, I can reproduce your bug with the 6.4.1 installation I
> have, but not with a fresh build.
> 
> Cheers,
>   Simon
> 
> On 21 October 2005 13:20, Joel Reymont wrote:
> 
>> Folks, ideas on this? It's a major showstopper for me since it
>> prevents me from deploying the Haskell app for my customer :(.
>> 
>>  Thanks, Joel
>> 
>> On Oct 19, 2005, at 5:06 PM, Joel Reymont wrote:
>> 
>>> This fails also but the C call to getprotobyname succeeds.
>>> 
>>> Prelude> Network.BSD.getProtocolByName "tcp"
>>> *** Exception: getServiceEntry: does not exist (no such service
>>> entry) 
>>> 
>>> On Oct 19, 2005, at 4:51 PM, Joel Reymont wrote:
>>> 
>>> 
 I checked my Windows protocol file in system32/drivers/etc and it
 has 
 
 tcp  6 TCP  # Transmission control protocol
 
 Still, I get the following:
 
 Prelude> Network.BSD.getProtocolNumber "tcp"
 *** Exception: getServiceEntry: does not exist (no such service
 entry) 
 
>>> 
>>> --
>>> http://wagerlabs.com/
> 
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-21 Thread Simon Marlow
Please try the updated installer for 6.4.1.  I believe this is caused by
the same bug in the dynamic linker that was fixed in the update.  At
least, I can reproduce your bug with the 6.4.1 installation I have, but
not with a fresh build.

Cheers,
Simon

On 21 October 2005 13:20, Joel Reymont wrote:

> Folks, ideas on this? It's a major showstopper for me since it
> prevents me from deploying the Haskell app for my customer :(.
> 
>  Thanks, Joel
> 
> On Oct 19, 2005, at 5:06 PM, Joel Reymont wrote:
> 
>> This fails also but the C call to getprotobyname succeeds.
>> 
>> Prelude> Network.BSD.getProtocolByName "tcp"
>> *** Exception: getServiceEntry: does not exist (no such service
>> entry) 
>> 
>> On Oct 19, 2005, at 4:51 PM, Joel Reymont wrote:
>> 
>> 
>>> I checked my Windows protocol file in system32/drivers/etc and it
>>> has 
>>> 
>>> tcp  6 TCP  # Transmission control protocol
>>> 
>>> Still, I get the following:
>>> 
>>> Prelude> Network.BSD.getProtocolNumber "tcp"
>>> *** Exception: getServiceEntry: does not exist (no such service
>>> entry) 
>>> 
>> 
>> --
>> http://wagerlabs.com/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-21 Thread Joel Reymont
Folks, ideas on this? It's a major showstopper for me since it  
prevents me from deploying the Haskell app for my customer :(.


Thanks, Joel

On Oct 19, 2005, at 5:06 PM, Joel Reymont wrote:


This fails also but the C call to getprotobyname succeeds.

Prelude> Network.BSD.getProtocolByName "tcp"
*** Exception: getServiceEntry: does not exist (no such service entry)

On Oct 19, 2005, at 4:51 PM, Joel Reymont wrote:



I checked my Windows protocol file in system32/drivers/etc and it has

tcp  6 TCP  # Transmission control protocol

Still, I get the following:

Prelude> Network.BSD.getProtocolNumber "tcp"
*** Exception: getServiceEntry: does not exist (no such service  
entry)




--
http://wagerlabs.com/








--
http://wagerlabs.com/





___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-19 Thread Joel Reymont

This fails also but the C call to getprotobyname succeeds.

Prelude> Network.BSD.getProtocolByName "tcp"
*** Exception: getServiceEntry: does not exist (no such service entry)

On Oct 19, 2005, at 4:51 PM, Joel Reymont wrote:


I checked my Windows protocol file in system32/drivers/etc and it has

tcp  6 TCP  # Transmission control protocol

Still, I get the following:

Prelude> Network.BSD.getProtocolNumber "tcp"
*** Exception: getServiceEntry: does not exist (no such service entry)


--
http://wagerlabs.com/





___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-19 Thread Joel Reymont

I checked my Windows protocol file in system32/drivers/etc and it has

tcp  6 TCP  # Transmission control protocol

Still, I get the following:

Prelude> Network.BSD.getProtocolNumber "tcp"
*** Exception: getServiceEntry: does not exist (no such service entry)

Any tips?

Thanks, Joel

On Oct 19, 2005, at 4:39 PM, Joel Reymont wrote:
*** Exception: getServiceEntry: does not exist (no such service  
entry)

[...]
connect :: HostName -> Int -> IO Handle
connect h p = connectTo h $ PortNumber $ fromIntegral p

main = withSocketsDo $ do
connect "10.0.0.1" 15667



--
http://wagerlabs.com/





___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: "getServiceEntry: does not exist" on Windows

2005-10-19 Thread Joel Reymont
I'm running this code at the ghci prompt by loading foo.hs and then  
running main. Don't know if this helps.


On Oct 19, 2005, at 4:35 PM, Joel Reymont wrote:


*** Exception: getServiceEntry: does not exist (no such service entry)
[...]
connect :: HostName -> Int -> IO Handle
connect h p = connectTo h $ PortNumber $ fromIntegral p

main = withSocketsDo $ do
connect "10.0.0.1" 15667


--
http://wagerlabs.com/





___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe