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

prim_toggleCrashRecovery #7

Closed
develhevel opened this issue May 13, 2011 · 2 comments
Closed

prim_toggleCrashRecovery #7

develhevel opened this issue May 13, 2011 · 2 comments

Comments

@develhevel
Copy link

i want to compile the following test program:
import Clang
main = do
putStrLn "hi"

now i compile with: ghc --make test.hs

then i get teh following error:
Linking test ...
/home/foo/.cabal/lib/LibClang-0.0.9/ghc-7.0.3/libHSLibClang-0.0.9.a(FFI_stub_ffi.o): In function prim_toggleCrashRecovery': FFI_stub_ffi.c:(.text+0x1577): undefined reference toclang_toggleCrashRecovery'
collect2: ld returned 1 exit status

EDIT: perhaps here a interesting output at the end of cabal install libClang

[13 of 13] Compiling Clang ( src/Clang.hs, dist/build/Clang.o )
In file included from ./src/Clang/FFI_stub_ffi.h:6,

             from src/Clang/FFI_stub_ffi.c:4:0: 

/usr/local/lib/ghc-7.0.3/include/HsFFI.h:29:0:
warning: "__STDC_LIMIT_MACROS" redefined

:0:0:
note: this is the location of the previous definition
src/Clang/FFI_stub_ffi.c: In function ‘prim_getCString’:

src/Clang/FFI_stub_ffi.c:33:0:
warning: assignment discards qualifiers from pointer target type
src/Clang/FFI_stub_ffi.c: In function ‘prim_toggleCrashRecovery’:

src/Clang/FFI_stub_ffi.c:2181:0:
warning: implicit declaration of function ‘clang_toggleCrashRecovery’
Registering LibClang-0.0.9...
Installing library in /home/bart/.cabal/lib/LibClang-0.0.9/ghc-7.0.3
Registering LibClang-0.0.9...

@chetant
Copy link
Owner

chetant commented May 14, 2011

This is because this is not present in llvm/clang 2.9.
Here's a good discussion with the patched package:
http://stackoverflow.com/questions/5992202/missing-symbol-in-haskell-libclang-binding-clang-togglecrashrecovery/5995576#5995576

I will update the code and upload to hackage once i've fixed this issue.

@chetant
Copy link
Owner

chetant commented May 14, 2011

Ok, fixed in master branch and on hackage (v 0.1.0)

@chetant chetant closed this as completed May 14, 2011
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