-
Notifications
You must be signed in to change notification settings - Fork 42
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
doesn't load specified .so files #14
Comments
How do you invoke ghci to use your .so file? |
Bit Connor wrote:
I derive this ghc command line via a script[1] from the gcc command cabal uses /usr/bin/ghc --interactive -o dist/build/git-annex/git-annex -fbuilding-cabal-package -package-conf dist/package.conf.inplace -i -idist/build/git-annex/git-annex-tmp -i. -idist/build/autogen -Idist/build/autogen -Idist/build/git-annex/git-annex-tmp -IUtility -optP-DWITH_TESTSUITE -optP-DWITH_S3 -optP-DWITH_WEBDAV -optP-DWITH_ASSISTANT -optP-DWITH_INOTIFY -optP-DWITH_DBUS -optP-DWITH_WEBAPP -optP-DWITH_PAIRING -optP-DWITH_XMPP -optP-DWITH_CLIBS -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build/git-annex/git-annex-tmp -hidir dist/build/git-annex/git-annex-tmp -stubdir dist/build/git-annex/git-annex-tmp -Wall -XHaskell98 dist/build/git-annex/git-annex-tmp/Utility/libdiskfree.o dist/build/git-annex/git-annex-tmp/Utility/libmounts.o Ugly, but that works great with cabal. I manually tweaked that for hdevtools, yielding this: hdevtools check git-annex.hs -g -cpp -g -i -g -idist/build/git-annex/git-annex-tmp -g -i. -g -idist/build/autogen -g -Idist/build/autogen -g -Idist/build/git-annex/git-annex-tmp -g -IUtility -g -DWITH_TESTSUITE -g -DWITH_S3 -g -DWITH_ASSISTANT -g -DWITH_INOTIFY -g -DWITH_DBUS -g -DWITH_PAIRING -g -DWITH_XMPP -g -optP-include -g -optPdist/build/autogen/cabal_macros.h -g -odir -g dist/build/git-annex/git-annex-tmp -g -hidir -g dist/build/git-annex/git-annex-tmp -g -stubdir -g dist/build/git-annex/git-annex-tmp -g -threaded -g -Wall -g -XHaskell98 -g dist/build/git-annex/git-annex-tmp/Utility/libdiskfree.o -g dist/build/git-annex/git-annex-tmp/Utility/libmounts.o That works, except for the libraries not loading, and the CPP inclusion see shy jo [1] script, FYI: #!/bin/sh |
My project has some .so files as part of its FFI bindings. I cannot seem to get hdevtools to use them.
I tried including the filenames with -g mylib.so , which is what cabal passes to ghc, and which also works with ghci to load the modules using this, but it seems hdevtools doesn't do anything with them, since I get a failure like this:
During interactive linking, GHCi couldn't find the following symbol:
diskfree
The only workaround I have found is to pass -DNO_LIBS and then #ifdef out all imports of modules using them..
The text was updated successfully, but these errors were encountered: