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

CLI doesn't work out of the box on Linux due to missing rpath in binaries #796

Closed
Calinou opened this issue Nov 7, 2023 · 2 comments · Fixed by #804
Closed

CLI doesn't work out of the box on Linux due to missing rpath in binaries #796

Calinou opened this issue Nov 7, 2023 · 2 comments · Fixed by #804

Comments

@Calinou
Copy link

Calinou commented Nov 7, 2023

OS: Fedora 38 x86_64
KTX Software version: 4.2.1 and 4.3.0-alpha3

On Linux, compiled KTX Software binaries should have their rpath set to ../lib, so that they detect libraries out of the box:

$ ./ktx
./ktx: error while loading shared libraries: libktx.so.4: cannot open shared object file: No such file or directory

You can work around this issue by using LD_LIBRARY_PATH=../lib ./ktx from the bin folder or LD_LIBRARY_PATH=lib bin/ktx from the root folder, but this isn't obvious.

If setting rpath isn't possible, a launcher script that sets LD_LIBRARY_PATH automatically (relative to the directory the binary is in) can be provided in the official distribution, but rpath is the preferred approach.

@MarkCallow
Copy link
Collaborator

Are you talking about running from within the build tree or running the installed software? If the latter, when did Linux remove/usr/local/lib from the search path for shared libraries?

@Calinou
Copy link
Author

Calinou commented Nov 8, 2023

Are you talking about running from within the build tree or running the installed software? If the latter, when did Linux remove/usr/local/lib from the search path for shared libraries?

I'm running the .tar.bz2 download from https://github.com/KhronosGroup/KTX-Software/releases/tag/v4.3.0-alpha3, extracted to a local folder (so I don't need sudo to install it). I'd prefer not using the distro packages as they require root to be installed and can complicate system upgrades.

MarkCallow added a commit that referenced this issue Nov 13, 2023
for Linux. This is so CTS framework can run tests
on legacy tools and is a necessary part of fixing #796.
MarkCallow added a commit that referenced this issue Nov 26, 2023
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 a pull request may close this issue.

2 participants