ComputationalRadiationPhysics / isaac

In Situ Animation of Accelerated Computations :microscope:
http://ComputationalRadiationPhysics.github.io/isaac/
GNU Lesser General Public License v3.0
25 stars 15 forks source link

possible issue: make issac server #170

Open PrometheusPi opened 2 years ago

PrometheusPi commented 2 years ago

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 commented 2 years ago

cc'ing @psychocoderHPC

PrometheusPi commented 1 year ago

ping @psychocoderHPC

PrometheusPi commented 1 year ago

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.

psychocoderHPC commented 1 year ago

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.

PrometheusPi commented 1 year ago

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

psychocoderHPC commented 1 year ago

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.