stack on Windows and C Preprocessor

Dear Cafe, not sure who the culprit is, thus trying on this list: My project builds fine with stack on Linux. I installed the latest (1.3.0 x86_64) stack on a Windows box and ran 'stack.exe setup' inside my project's directory. The build fails at the depencency HaXml-1.25.3 with a lexer error on line 34 of this file: http://hackage.haskell.org/package/HaXml-1.25.3/docs/src/Text-XML-HaXml-Wrap... lexical error in string/character literal at character '\r' It seems the line (VERSION) is processed by the C preprocessor which somehow messes it up. Unfortunately, stack deletes its temporary files after running into the error, which deprives me of handles to further debug this. Does anyone have an idea how to continue from here? Thanks, Olaf

One way to try debugging this further is by unpacking the package in
question and building inside that directory, e.g.:
stack unpack HaXml-1.25.3
cd HaXml-1.25.3
stack init
stack build
That should fail with the same error message, but at least you'll have the
files available to play with and try tweaking.
On Tue, Dec 20, 2016 at 12:44 PM, Olaf Klinke
Dear Cafe,
not sure who the culprit is, thus trying on this list:
My project builds fine with stack on Linux. I installed the latest (1.3.0 x86_64) stack on a Windows box and ran 'stack.exe setup' inside my project's directory. The build fails at the depencency HaXml-1.25.3 with a lexer error on line 34 of this file:
http://hackage.haskell.org/package/HaXml-1.25.3/docs/src/ Text-XML-HaXml-Wrappers.html
lexical error in string/character literal at character '\r'
It seems the line (VERSION) is processed by the C preprocessor which somehow messes it up. Unfortunately, stack deletes its temporary files after running into the error, which deprives me of handles to further debug this. Does anyone have an idea how to continue from here?
Thanks, Olaf _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

C preprocessor on Windows expects \n\r as line ending, so what you think is a line break is being treated as a single line by CPP. Run your file through a unix to dos file tool or configure your version control system to retrieve files in local format. Jeremy Sent from my iPhone
On 20 Dec 2016, at 10:44, Olaf Klinke
wrote: Dear Cafe,
not sure who the culprit is, thus trying on this list:
My project builds fine with stack on Linux. I installed the latest (1.3.0 x86_64) stack on a Windows box and ran 'stack.exe setup' inside my project's directory. The build fails at the depencency HaXml-1.25.3 with a lexer error on line 34 of this file:
http://hackage.haskell.org/package/HaXml-1.25.3/docs/src/Text-XML-HaXml-Wrap...
lexical error in string/character literal at character '\r'
It seems the line (VERSION) is processed by the C preprocessor which somehow messes it up. Unfortunately, stack deletes its temporary files after running into the error, which deprives me of handles to further debug this. Does anyone have an idea how to continue from here?
Thanks, Olaf _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (3)
-
Jeremy O'Donoghue
-
Michael Snoyman
-
Olaf Klinke