[Haskell-cafe] C2HS parse error on Windows ...

aditya siram aditya.siram at gmail.com
Sat Mar 7 15:29:30 UTC 2015


Hi all,
I could still use some help here.
Thanks!
-deech

On Mon, Mar 2, 2015 at 6:13 PM, aditya siram <aditya.siram at gmail.com> wrote:

> Hi all,
> c2hs runs into the following error on all of my .chs files, but only on
> Windows:
> c:\\program files\\haskell
> platform\\2014.2.0.0\\mingw\\bin\\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/include/stddef.h:20:
> (column 11)
>  [ERROR]  >>> Syntax error !
>   The symbol `__attribute__' does not fit here.
>
> My c2hs version is:
> C->Haskell Compiler, version 0.23.1 Snowbounder, 31 Oct 2014
>   build platform is "x86_64-mingw32" <1, True, True, 1>
>
> This is the command being run:
> "c:\Users\deech\AppData\Roaming\cabal\bin\c2hs.exe"
>    "--cpp=c:\Program Files\Haskell Platform\2014.2.0.0\mingw\bin\gcc.exe"
>    "--cppopts=-E" "--cppopts=-D__GLASGOW_HASKELL__=708"
>    "--cppopts=-Dmingw32_BUILD_OS=1"
>    "--cppopts=-Dx86_64_BUILD_ARCH=1"
>    "--cppopts=-Dmingw32_HOST_OS=1"
>    "--cppopts=-Dx86_64_HOST_ARCH=1"
>    "--cppopts=-I./c-src"
>    "--cppopts=-I./"
>    "--cppopts=-IC:/MinGW/include"
>    "--cppopts=-IC:\Users\deech\Downloads\fltkhs-0.1.0.1/c-src"
>    "--cppopts=-IC:\Users\deech\Downloads\fltkhs-0.1.0.1"
>    "--include=dist\build"
>    "--cppopts=-IC:\Program Files\Haskell
> Platform\2014.2.0.0\lib\process-1.2.0.0\include"
>    "--cppopts=-IC:\Program Files\Haskell
> Platform\2014.2.0.0\lib\directory-1.2.1.0\include"
>    "--cppopts=-IC:\Program Files\Haskell
> Platform\2014.2.0.0\lib\time-1.4.2\include"
>    "--cppopts=-IC:\ProgramFiles\Haskell
> Platform\2014.2.0.0\lib\Win32-2.3.0.2\include"
>    "--cppopts=-IC:\Program Files\Haskell
> Platform\2014.2.0.0\lib\bytestring-0.10.4.0\include"
>    "--cppopts=-IC:\Program Files\Haskell
> Platform\2014.2.0.0\lib\base-4.7.0.1\include"
>    "--cppopts=-IC:\Program Files\Haskell
> Platform\2014.2.0.0\lib\integer-gmp-0.5.1.0\include"
>    "--cppopts=-IC:\Program Files\Haskell Platform\2014.2.0.0\lib/include"
>    "--output-dir=dist\build"
> "--output=Graphics\UI\FLTK\LowLevel\HorValueSlider.hs"
>    "src\Graphics\UI\FLTK\LowLevel\HorValueSlider.chs"
>
> A little Googling turned up this thread:
> http://haskell.1045720.n5.nabble.com/BUG-string-h-FC4-x86-64-td3196369.html
> which suggested I pass -D__attribute__(A)= to c2hs's opts. I tried it and
> it led to other errors. I didn't pursue any further  because it's an old
> thread. I'm not sure what stddef.h is and I'm unfamiliar with Windows.
>
> Any help is appreciated.
> Thanks!
> -deech
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150307/6d73bdc1/attachment.html>


More information about the Haskell-Cafe mailing list