Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error while installing with bundled fltkhs #169

Open
chenyulue opened this issue Jan 31, 2021 · 1 comment
Open

Syntax error while installing with bundled fltkhs #169

chenyulue opened this issue Jan 31, 2021 · 1 comment

Comments

@chenyulue
Copy link

chenyulue commented Jan 31, 2021

I got the following error:

fltkhs > make[1]: Leaving directory '/c/Users/chenyulue/AppData/Local/Temp/stack-bcc533c003cb80ea/fltkhs-0.8.0.3/.stack-work/dist/29cc6475/build/c-src'
fltkhs > Preprocessing library for fltkhs-0.8.0.3..
fltkhs > c2hs.exe: C header contains errors:
fltkhs >
fltkhs > C:/Users/chenyulue/AppData/Local/Programs/stack/x86_64-windows/ghc-8.8.4/mingw/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:836: (column 222) [ERROR] >>> Syntax error !
fltkhs > The symbol `)' does not fit here.
fltkhs >

Progress 1/2

-- While building package fltkhs-0.8.0.3 (scroll up to its section to see the error) using:
C:\Users\chenyulue\AppData\Local\Temp\stack-bcc533c003cb80ea\fltkhs-0.8.0.3.stack-work\dist\29cc6475\setup\setup > > --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1

What's wrong with it? The command to build it is stack install --flag fltkhs:bundled --flag fltkhs:opengl in the fltkhs-hello-world directory on windows os.

However, if I run the command stack install --flag fltkhs:bundled, the package is installed successfully. So what's wrong with opengl? What else should I do if I want to build it with the flag fltkhs:opengl?

@mtolly
Copy link
Contributor

mtolly commented May 21, 2021

This is a fix that needs to be made in language-c for c2hs, there's an odd construction in the MinGW header that only gets exposed if compiling with the OpenGL option.

Issue - visq/language-c#83
PR - visq/language-c#84

You can add my patch for now with the following in stack.yaml:

extra-deps:
- git: git://github.com/mtolly/language-c
  commit: 5e40d962fb71b7e1256ff607194c53544709e761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants