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:
Rodrigo Arias 2023-06-28 11:18:35 +02:00
parent 932d273ec7
commit f2f024b82d

View File

@ -77,15 +77,15 @@ stdenv.mkDerivation rec {
"-DCMAKE_INSTALL_BINDIR=bin"
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-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
postInstall = ''
rm $out/lib/libgomp*