-
Notifications
You must be signed in to change notification settings - Fork 711
Cabal 1.22 breaks/changes -dynamic builds #2330
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
Comments
Can you try to call cabal with -v2 and -v3 and paste the difference (presumably we pass different flags to the compiler.) |
Hey Johan, yes, the output is different. The builds:
Some obviously different outputs in 1.20:
1.22:
Something that pops into the eye is that 1.22 passes the I'm not very familiar with the |
@christiaanb is this related to the support for relocatable packages that you added? |
Yes, this is due to the support for relocatable packages that I added. Specifically, that Cabal takes over the RPATH handling from GHC. What is happening is the following:
One option is to also add again the build directory of the library as an RPATH of the executable. But I think that is ugly and unwanted. |
Fixes running when build with cabal >= 1.22. See haskell/cabal#2330 (comment)
It's also worth noting that building shared libs like this is not actually supported by Cabal (though it's certainly useful). Ideally I'd like to add dedicated support, so that we don't need fragile hacks like people are using now (indeed I'm one of the people using such fragile hacks). |
Thanks @christiaanb for your explanation, it works. From my side, the issue is solved. It seems sensible to me to have to set If you think there's a way/place to better document this stuff, feel free to reopen the issue. Thanks for everybody's quick help, as usual! |
For
call-haskell-from-anything
I'm getting a broken TravisCI build on the same code when the only thing that changed is the version of cabal obtained withcabal install cabal-install
; before it was 1.20 which worked fine, now with 1.20 it breaks.The broken build is this one which worked before (see also this bug: nh2/call-haskell-from-anything#4), the error message being:
In my cabal file I'm building a
.so
shared library using:I'm configuring with
cabal configure --enable-tests --enable-shared
.Why would I get a "missing
libHScall-haskell-from-anything-0.1.0.1-ghc7.8.3.so
" error with 1.22 when with 1.20 I didn't? Did anything change in the way that shared library compilations are done?I woudl appreciate any information!
The text was updated successfully, but these errors were encountered: