Cannot build cmake with local openssl build
Hello,
I'm trying to compile cmake
version 3.16.2
via bootstrap with a custom OpenSSL
(/path/to/openssl/lib
):
cd cmake-3.16.2 && \
./bootstrap \
--verbose \
--parallel=$(nproc) \
--prefix=/path/to/cmake \
-- \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_PREFIX_PATH="/path/to/openssl"
make -C cmake-3.16.2 -j $(nproc)
make -C cmake-3.16.2 -j $(nproc) install
But I have an issue during the installation step:
# ...
Install the project...
bin/cmake -P cmake_install.cmake
bin/cmake: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Makefile:76: recipe for target 'install' failed
make: *** [install] Error 127
Here is the output of ldd
of bin/cmake
:
ldd bin/cmake
linux-vdso.so.1 (0x00007ffc6e1dc000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f27de26a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f27de062000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f27dde45000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f27ddb3a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f27dd839000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f27dd623000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f27dd278000)
/lib64/ld-linux-x86-64.so.2 (0x00007f27de46e000)
After taking a look at the CMakeLists.txt
, I think that there is a missing check line 756 (OR CMAKE_USE_OPENSSL
) to activate proper BUILD RPATH handling when using OpenSSL
.
Do I miss or forget something ?
Thanks for your answer, Regards,