-
Notifications
You must be signed in to change notification settings - Fork 20
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
pure-gen compilation troubles #30
Comments
I should add that this is using the headers from gsl-2.5 on Arch. |
The empty output warnings seem harmless, and can be made to go away by adding The "symbol `__value' does not fit here" errors are caused by 128 bit floating point types ( The |
Yes, some of the headers clearly aren't self-contained, so a better procedure is to collect all the headers in a big header file and run pure-gen on that: DEFS=-DGSL_DISABLE_DEPRECATED
(for x in /usr/include/gsl/*.h; do echo "#include \"$x\""; done) > mygsl.h
pure-gen $DEFS -w0 -fc-auto -s '/usr/include/gsl/*::' mygsl.h This eliminates the issue with the undefined types. I also found that I had to add a couple of libraries in compilation to make the module load properly: # Compile the resulting C module.
gcc $DEFS -shared -o mygsl.so mygsl.c -lgsl -lgslcblas -lcblas The resulting module now loads fine and seems to work (running a few basic examples). There still are a few symbols which seem to be in the GSL headers but aren't actually in the library, but these can just be deleted from mygsl.pure. Just pushed the necessary changes to pure-gen and language-c. Next I'll be looking into the long double issue. |
Actually, only the |
As discussed on the mailing list, this example from the pure-gen manual has stopped working:
dump-ast generates a bunch of
empty output
warnings, and errors like:It's always the same kind of error message, followed by a Haskell exception. Having the parser crash with a Haskell exception is not a good thing. ;-) That might also explain why so many empty output files are created.
The resulting code is also partially broken, apparently pure-gen mistakes
long double*
fordouble *
:Always the same error again.
The text was updated successfully, but these errors were encountered: