isaac icon indicating copy to clipboard operation
isaac copied to clipboard

possible issue: make issac server

Open PrometheusPi opened this issue 3 years ago • 6 comments

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)?

PrometheusPi avatar Nov 01 '22 09:11 PrometheusPi

cc'ing @psychocoderHPC

PrometheusPi avatar Nov 01 '22 09:11 PrometheusPi

ping @psychocoderHPC

PrometheusPi avatar Apr 25 '23 13:04 PrometheusPi

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.

PrometheusPi avatar Apr 25 '23 13:04 PrometheusPi

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.

You need to set LD_LIBRARY_PATH ISAAC is not setting the RPATH.

psychocoderHPC avatar Apr 28 '23 08:04 psychocoderHPC

@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?

PrometheusPi avatar May 02 '23 11:05 PrometheusPi

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.

psychocoderHPC avatar May 03 '23 07:05 psychocoderHPC