[C2hs] c2hs on CygWin

Rich Fought whatever at fsrz.net
Mon May 1 11:34:48 EDT 2006


Sorry, went on holiday and dropped the ball ...
 
Attached are two bz2 files, the first one (GnuTLS.i.bz2) captures the
__attribute__ error.
The second (GnuTLS2.i.bz2) captures the signal.h error that follows after
getting around the attribute error as described previously in this thread.
If there is anything else I can provide please let me know.

Also, c2hs generally does not play nice in Cygwin.  The post-install script
does not
run correctly, and must be run by hand.  Even then, there are problems with
paths (/ vs \) so the script must be edited by hand for it to run correctly.
When installing other packages (such as hsgnutls) using Cabal, Cabal looks
for c2hs.exe installed on the system, not the script in /usr/local/bin.  So
you have to add c2hs.exe to the path to get configured, but then the build
fails because it is missing the flags in the script.  So you have to call
c2hs by hand.  I only had 3 files to process, but for many files this could
quicky become a pain.

Hope this helps!

Regards,
Rich

> -----Original Message-----
> From: Manuel M T Chakravarty [mailto:chak at cse.unsw.edu.au] 
> Sent: Friday, April 28, 2006 7:26 PM
> To: Duncan Coutts
> Cc: Rich Fought; c2hs at haskell.org
> Subject: Re: [C2hs] c2hs on CygWin
> 
> Duncan Coutts:
> > On Wed, 2006-04-12 at 16:40 -0500, Rich Fought wrote:
> > > Hello,
> > > 
> > > I'm trying to use c2hs on Cygwin to build hsgnutls and am running 
> > > into some problems.
> > >  
> > > I get the following error:
> > >  
> > > c2hs.exe: Error in C header file.
> > > 
> > > /usr/include/sys/reent.h:182: (column 12) [FATAL]
> > >   >>> Syntax error!
> > >   The symbol '__attribute__' does not fit here.
> > >  
> > > I see nothing like this in reent.h
> > >  
> > > Any ideas/tips?
> > 
> > Re-run your c2hs command and add this flag "--keep". Then 
> send in the 
> > .i file that this command produces.
> > 
> > By looking at this .i file it should be possible for a c2hs 
> expert to 
> > identify the problem.
> > 
> > (The file may well be quite large so it'd be helpful to 
> compress it.)
> 
> As Duncan wrote it would be very helpful if you could provide 
> that information.  Then, we can reproduce the problem much 
> more easily.
> 
> Cheers,
> Manuel
> 
> 
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GnuTLS2.i.bz2
Type: application/octet-stream
Size: 7947 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/c2hs/attachments/20060501/5ece82e5/GnuTLS2.i-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GnuTLS.i.bz2
Type: application/octet-stream
Size: 8072 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/c2hs/attachments/20060501/5ece82e5/GnuTLS.i-0001.obj


More information about the C2hs mailing list