isaac
isaac copied to clipboard
possible issue: make issac server
When building the current isaac dev as follows:
git clone -b dev https://github.com/ComputationalRadiationPhysics/isaac.git
cd ./isaac
mkdir .build
cd .build
cmake -DCMAKE_INSTALL_PREFIX=__some_other_path__/bin __above_path__/isaac/server
I ran into the following problem: executing
./__some_other_path__/isaac/server/issac
results in
./bin/isaac: error while loading shared libraries: libwebsockets.so.16: cannot open shared object file: No such file or directory
and also ldd shows that the library is not linked.
Ween I however execute the isaac server directly from the build directory:
__some_other_path__/isaac/.build/issac
it runs fine (and ldd shows that all links work). Also when I copy this executable to another location it still runs fine.
Hashing both executables shows a different hash. Thus the isaac server binary installed in the CMAKE_INSTALL_PREFIX is a different version than the one installed in the .build/ directory.
This confused me a lot, since I thought that the first is just a copy of the latter.
What is going wrong here (in the CMake files)?
cc'ing @psychocoderHPC
ping @psychocoderHPC
The error still persists. The executable in the build directory works. The one in the install path does not.
From ldd, libwebsockets.so.16 is not linked. The sha1sum between both executables differs, which is strange.
The binary differs between make and make install.
The error still persists. The executable in the build directory works. The one in the install path does not. From
ldd,libwebsockets.so.16is not linked. Thesha1sumbetween both executables differs, which is strange. The binary differs betweenmakeandmake install.
You need to set LD_LIBRARY_PATH ISAAC is not setting the RPATH.
@psychocoderHPC you are a genius. Setting the LD_LIBRARY_PATH solved the problem.
Could you explain to me, when than one executable works (the one in the build directory – regardless where it is located) and another (the one in the bin directory) doesn't. Are they linked differently? And if yes, why?
CMake is running an extra step during make install maybe the binary in .build contains rpath and those get removed during the install. I am not 100% sure but make install is not required to be a simple copy.