Add zlib to the rpath
Instead of using LD_LIBRARY_PATH we provide the rpath from cmake, as otherwise the clang compiler is also missing the dependency.
This commit is contained in:
parent
932d273ec7
commit
f2f024b82d
@ -77,15 +77,15 @@ stdenv.mkDerivation rec {
|
|||||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||||
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
||||||
"-DLLVM_ENABLE_LIBXML2=OFF"
|
"-DLLVM_ENABLE_LIBXML2=OFF"
|
||||||
|
# Set the rpath to include external libraries (zlib) both on build and
|
||||||
|
# install
|
||||||
|
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
||||||
|
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
||||||
|
"-DCMAKE_INSTALL_RPATH=${zlib}/lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Workaround the problem with llvm-tblgen and missing zlib.so.1
|
|
||||||
preBuild = ''
|
|
||||||
export LD_LIBRARY_PATH=${zlib}/lib
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Remove support for GNU and Intel Openmp
|
# Remove support for GNU and Intel Openmp
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm $out/lib/libgomp*
|
rm $out/lib/libgomp*
|
||||||
|
Loading…
Reference in New Issue
Block a user