Proposal: ByteString based datagram communication (Ticket #1238 )

Robert Marlow rob at mits.coop
Thu Apr 5 05:57:24 EDT 2007


Gah, I tried that a couple of times and it made no difference. I tried
it again after getting your email and it did something different. Your
email must have been the magic key it was waiting for. Computers can be
mysterious.

Anyway, the difference unfortunately isn't that it now works. Instead it
spits the same error it gave me when I tried running hsc2hs-hugs on
BSD.hsc directly:

$ runhugs -98 ./Setup.hs build
Preprocessing library network-2.0...
Network/BSD_hsc_make.c:1:49:
error: /usr/share/hsc2hs-0.67/template-hsc.h: No such file or directory
BSD.hsc: In function ‘main’:
BSD.hsc:578: warning: incompatible implicit declaration of built-in
function ‘printf’
BSD.hsc:571: error: ‘stdout’ undeclared (first use in this function)
BSD.hsc:571: error: (Each undeclared identifier is reported only once
BSD.hsc:571: error: for each function it appears in.)
BSD.hsc:150: error: expected expression before ‘struct’
BSD.hsc:151: error: expected expression before ‘struct’
BSD.hsc:154: error: expected expression before ‘struct’
BSD.hsc:155: error: expected expression before ‘struct’
BSD.hsc:254: error: expected expression before ‘struct’
BSD.hsc:255: error: expected expression before ‘struct’
BSD.hsc:265: error: expected expression before ‘struct’
BSD.hsc:348: error: expected expression before ‘struct’
BSD.hsc:349: error: expected expression before ‘struct’
BSD.hsc:352: error: expected expression before ‘struct’
BSD.hsc:354: error: expected expression before ‘struct’
BSD.hsc:453: error: expected expression before ‘struct’
BSD.hsc:454: error: expected expression before ‘struct’
BSD.hsc:457: error: expected expression before ‘struct’
BSD.hsc:458: error: expected expression before ‘struct’
compiling Network/BSD_hsc_make.c failed
command was: /usr/bin/gcc -c -I/usr/lib/hugs/include -Iinclude
Network/BSD_hsc_make.c -o Network/BSD_hsc_make.o
./Setup.hs: got error code while preprocessing: Network.BSD

Any ideas?


On Thu, 2007-04-05 at 10:26 +0100, Ross Paterson wrote:
> On Thu, Apr 05, 2007 at 06:14:25PM +0900, Robert Marlow wrote:
> > 4. me: It's not tested as well as I'd like
> >    I'm having trouble testing with hugs. runhugs -98 ./Setup.hs build 
> >    returns 'ERROR "dist/build/Network/BSD.hs" - Can't find imported
> > module "GHC.IOBase"'. Something screwy with hsc2hs or cpphs?
> 
> I think it's because the GHC version of hsc2hs uses ghc as its C compiler,
> which sets __GLASGOW_HASKELL__.  You should be able to work around this
> by adding --with-hsc2hs=/usr/local/bin/hsc2hs-hugs or similar to setup
> configure when building for Hugs.
> 
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries

-- 
Robert Marlow
MITS Co-operative Limited
http://www.mits.coop/




More information about the Libraries mailing list