[C2hs] Problems with c2hs, including `__attribute__' symbol in _mingw.h

Manuel M T Chakravarty chak at cse.unsw.edu.au
Tue Oct 10 16:31:43 EDT 2006


Hi Vivian,

> running GHC 6.5.20060831, mingw
>  
> 1) darcs repo error:
> Patch 107 can't be applied.  Some problem with case-sensitivity.
> Issue234 of darcs is a bugs report on case-sensitivity, and Heffalump
> on #darcs is examining this problem.
>  
> Heffalump has created a repo that fixes this problem:
> http://urchin.earth.li/darcs/ganesh/c2hs

Does that also happen if you get the repo with --partial?  If yes, maybe
we can get around it by adding another, more recent, checkpoint.
 
> 2) ./Setup.hs install error:
>  
> $ ./Setup.hs install 
> Installing: C:\Apps\MSYS\1.0\local\Haskell\c2hs-0.14.6
> \ghc-6.5.20060831 & C:\Apps\MSYS\1.0\local\Haskell\bin c2hs-0.14.6...
> '.' is not recognized as an internal or external command,
> operable program or batch file.
> 
> Some problem with backslashes and windows.
>  
> I got around this problem by installing by hand.

Yes, I am sorry, this is a known problem on windows, which is on the
list of things to be fixed.

> 3) syntax error
>  
> $ c2hs --cppopts=-I/c/Apps/MATLAB704/extern/include
> --include=c:/Apps/MATLAB704/extern/include matrix.h MxMatrix.chs 
> c2hs.exe: Generic fatal error.
>  
> C:/Apps/MSYS/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/float.h:125: (column 8) [FATAL] 
>   >>> Syntax error!
>   The symbol `__attribute__' does not fit here.

__attribute__ is a not very well documented extension of gcc.  c2hs can
handle many cases of __attribute__, but unfortunately some don't work
yet.  However, there is a work around.  Please see the following message
from the list archive:

  http://www.haskell.org/pipermail/c2hs/2006-May/000577.html

Manuel




More information about the C2hs mailing list