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

fix(CMake): wrong RPATH for executables after install #900

Closed
wants to merge 1 commit into from
Closed

Conversation

yo35
Copy link
Contributor

@yo35 yo35 commented Feb 27, 2024

When creating an executable with add_geode_binary, if this executable links a lib created in the same CMake project AND is configured to be installed to a custom directory, it does not work after install.

Example with the attached reproducer:

cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir -DCMAKE_PREFIX_PATH=/path/to/geode
make
./bin/reproducer    # OK
make install
/path/to/install/dir/bin/reproducer    # error while loading shared libraries...

Checking the RUNPATH header in the binaries explains this behavior:

objdump -x ./bin/reproducer | grep RUNPATH
# RUNPATH    $ORIGIN/../lib:
objdump -x /path/to/install/dir/bin/reproducer | grep RUNPATH
# RUNPATH    /../lib

-> the 2nd RUNPATH is invalid.

@yo35
Copy link
Contributor Author

yo35 commented Feb 27, 2024

@BotellaA BotellaA closed this Feb 27, 2024
@BotellaA
Copy link
Member

It will be included in the next release! Thanks for your feedback!!

@yo35
Copy link
Contributor Author

yo35 commented Feb 27, 2024

Thanks @BotellaA

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

Successfully merging this pull request may close these issues.

2 participants