Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible issue: make issac server #170

Open
PrometheusPi opened this issue Nov 1, 2022 · 6 comments
Open

possible issue: make issac server #170

PrometheusPi opened this issue Nov 1, 2022 · 6 comments

Comments

@PrometheusPi
Copy link
Member

PrometheusPi commented Nov 1, 2022

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
Copy link
Member Author

cc'ing @psychocoderHPC

@PrometheusPi
Copy link
Member Author

ping @psychocoderHPC

@PrometheusPi
Copy link
Member Author

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
Copy link
Member

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
Copy link
Member Author

@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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants