Skip to content

Commit

Permalink
pkgs/build-support/cabal: revert "the release version of GHC 7.8.x no…
Browse files Browse the repository at this point in the history
… longer requires"

This reverts commit a2a398f. The
issue *does* still exist in GHC 7.8.2. Compiled binaries have no -rpath
into their own install directory ("$out") and thus cannot find their own
shared libraries. To work around this issue, we pass an explicit -rpath
argument at configure time. We do that only on Linux, though, because
-rpath is known to cause trouble on Darwin, which was the reason I
originally reverted that patch.
  • Loading branch information
peti committed May 1, 2014
1 parent 8b67834 commit 5849a91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/build-support/cabal/default.nix
Expand Up @@ -195,6 +195,10 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
done
done
${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) ''
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
''}
echo "configure flags: $extraConfigureFlags $configureFlags"
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \
--libsubdir='$pkgid' $extraConfigureFlags $configureFlags 2>&1 \
Expand Down

0 comments on commit 5849a91

Please sign in to comment.