dev-container openssl failures when running unit tests
With #785 and #786 applied I am able to successfully start a CLion dev container (using Jetbrains gateway) and connect via SSH to the started container (as celixdev user).
Within CLion I then can enable the automatically detected conan-debug CMake profile and build all packages succesfully.
However, when executing All CTest, most of the tests (almost all) fail with the following failure message:
12: Test command: /home/celixdev/workspace/build/libs/framework/gtest/test_frameworkd
12: Working Directory: /home/celixdev/workspace/build/libs/framework/gtest
12: Test timeout computed to be: 10000000
12: /home/celixdev/workspace/build/libs/framework/gtest/test_frameworkd: /lib/x86_64-linux-gnu/libssl.so.3: version `OPENSSL_3.2.0' not found (required by /home/celixdev/.conan2/p/b/libcuffeace8e7a3bc/p/lib/libcurl.so.4)
Failed
Is this something anyone has seen before or I am missing a (Conan) configuration option somewhere?
It seems that the wrong libssl is being used, even though the Conan installed libssl is also available:
celixdev@fedora:~/workspace$ find / -name "libssl*" 2> /dev/null
<snip>
/home/celixdev/.conan2/p/b/opensb0006bbd0e9a5/p/lib/libssl.so.3
/home/celixdev/.conan2/p/b/opensb0006bbd0e9a5/p/lib/libssl.so
/home/celixdev/.conan2/p/b/libcuffeace8e7a3bc/b/build-debug/conan/libssl.pc
/home/celixdev/.cache/JetBrains/RemoteDev/dist/4dee2d4064288_CLion-2024.1.6/plugins/remote-dev-server/selfcontained/lib/libssl.so.10
/home/celixdev/.cache/JetBrains/RemoteDev/dist/4dee2d4064288_CLion-2024.1.6/plugins/remote-dev-server/selfcontained/lib/libssl3.so
/usr/lib/x86_64-linux-gnu/libssl.so.3
<snip>
My work around is setting LD_LIBRARY_PATH=/home/celixdev/.conan2/p/b/opensb0006bbd0e9a5/p/lib/:$LD_LIBRARY_PATH as environment variable for the All CTests in CLion. Then some of the failing tests will succeed.
Yeah, it seems that LD_LIBRARY_PATH is not properly set.
Conan generates a script under the build directory to do it
cd build
source conanrun.sh
ctest --output-on-failure
source deactivate_conanrun.sh
Currently @xuzhenbao, who happens to be a CLion user, is investigating #783. When it is done, we can update our documentation to add a guide.
@rlenferink WDYT?
@PengZheng that sounds good to me. If @xuzhenbao has some instructions I am more than willing to test them. Otherwise I'll see if I can manage with your instructions. Thanks for providing the snippet!