[Haskell-cafe] Possible to use Cabal-1.18 with ghc-6.12.3?
Simon Peter Nicholls
simon at mintsource.org
Mon Jan 23 06:25:57 UTC 2017
Can I improve my setup, so that Cabal-1.18 will work better with ghc-6.12.3?
I have an old project that I’m updating, which is currently compilable with 6.12.3. I’ve managed to get Cabal-22.214.171.124 and cabal-install-126.96.36.199 to build it, which gives me some handy extra tooling, but only if I pre-install all the project dependencies before updating Cabal.
If I try to use a sandbox instead, the build will fail at the point where template-haskell is used:
> Loading package utf8-string-0.3.7 ... <command line>: can't load .so/.DLL for: HSutf8-string-0.3.7 (libHSutf8-string-0.3.7.so: cannot open shared object file: No such file or directory)
That’s a dependency in my sandbox, but this also fails if it’s installed to the default `~/.cabal`.
I see a similar error if I try `runhaskell Setup.hs` instead of cabal:
> Setup.hs: <command line>: can't load .so/.DLL for: HSCabal-188.8.131.52 (libHSCabal-184.108.40.206.so: cannot open shared object file: No such file or directory)
So I figure Cabal-1.18 and my default 6.12.3 are not co-operating as well as they could.
If I use —enable-shared in my dependency builds, I still get this error, and I also see it if I try to build statically. The template-haskell “Loading” steps always seems to fail by not finding a shared library, as if it’s stepping outside of Cabal (and my!) control.
I note that installation locations are different in Cabal-1.18 (vs 1.16), but figure the GHC registration process takes care of something like `.cabal/lib/x86_64-linux-ghc-6.12.3/utf8-string-0.3.7/libHSutf8-string-0.3.7-ghc6.12.3.so`. A pre-installed parsec dependency looks like `ghc-6.12.3/lib/parsec-3.1.1/ghc-6.12.3/libHSparsec-3.1.1-ghc6.12.3.so`. Neither has the name format reported by the error.
Is there something in my Cabal or my GHC setup that I can change, to get these working together? A clean fix would be great, but a bodge is fine, since this transition work is isolated in a docker container.
More information about the Haskell-Cafe