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

[BLOCKER] rpath is not (always?) set for plugins #80

Closed
probonopd opened this issue Feb 20, 2017 · 4 comments
Closed

[BLOCKER] rpath is not (always?) set for plugins #80

probonopd opened this issue Feb 20, 2017 · 4 comments
Labels

Comments

@probonopd
Copy link
Owner

As pointed out here, for LibrePCB compiled with the distro-provided Ubuntu trusty Qt 5.2 you need to run

patchelf --set-rpath '$ORIGIN/../../lib:$ORIGIN' ./opt/plugins/platforms/libqxcb.so
patchelf --set-rpath '$ORIGIN/../../lib:$ORIGIN' ./opt/plugins/bearer/libqnmbearer.so 
patchelf --set-rpath '$ORIGIN/../../lib:$ORIGIN' ./opt/plugins/bearer/libqconnmanbearer.so 
patchelf --set-rpath '$ORIGIN/../../lib:$ORIGIN' ./opt/plugins/sqldrivers/libqsqlite.so

Why is linuxdeployqt not doing this?

@probonopd
Copy link
Owner Author

probonopd commented Feb 27, 2017

I can confirm this with https://transfer.sh/12Wbzk/cuterest-git.95de920-x86-64.appimage

This does not run on Antergos Linux rolling 2014.07-ISO.

find . -executable -type f -exec ldd {} \; | grep " => /usr" | grep libQt && echo "WARNING! Still trying to load Qt from the system! This will not work or crash. Need to change rpaths"

# Fix it
find usr/plugins/ -type f -exec patchelf --set-rpath '$ORIGIN/../../lib'  {} \;

@probonopd
Copy link
Owner Author

Whenever these two numbers don't match it indicates that we haven't properly deployed (set rpath and copied dependencies) all .so files, which is a linuxdeployqt problem.

me@host:~$ find usr/ -name '*.so*' -exec grep '$ORIGIN' {} \; | wc -l
58
me@host:~$ find usr/ -name '*.so*' | wc -l
69

@probonopd probonopd changed the title rpath is not (always?) set for plugins [BLOCKER] rpath is not (always?) set for plugins Apr 2, 2017
@probonopd
Copy link
Owner Author

May be fixed in linuxdeployqt trunk with b71bd4d and bace185, more testing needed.

@probonopd
Copy link
Owner Author

me@host:~$ /home/me/Downloads/CuteRest-git.b2271de-x86_64.AppImage --appimage-extract
me@host:~$ cd squashfs-root/
me@host:~/squashfs-root$ find usr/ -name '*.so*' -exec grep '$ORIGIN' {} \; | wc -l
77
me@host:~/squashfs-root$ find usr/ -name '*.so*' | wc -l
77

So, seems to be working now thanks to b71bd4d and bace185.

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

No branches or pull requests

1 participant