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

ldd not finding libqgtk2 platform theme. #350

Closed
azagaya opened this issue Feb 16, 2019 · 24 comments
Closed

ldd not finding libqgtk2 platform theme. #350

azagaya opened this issue Feb 16, 2019 · 24 comments

Comments

@azagaya
Copy link

azagaya commented Feb 16, 2019

Hi,
This may be related to #338.
I have an Ubuntu Trusty just for building Appimages, and i've installed Qt 5.12 there. However, when running linuxdeployqt, i have this:

ERROR: findDependencyInfo: "ldd: /opt/Qt/5.12.1/gcc_64/plugins/platformthemes/libqgtk2.so: No such file or directory\n"
ERROR: getBinaryRPaths: "objdump: '/opt/Qt/5.12.1/gcc_64/plugins/platformthemes/libqgtk2.so': No such file\n"
ERROR: file copy failed from "/opt/Qt/5.12.1/gcc_64/plugins/platformthemes/libqgtk2.so"
ERROR: to "/home/pablo/QtWorkspace/Appimages/NormalmapGenerator/usr/bin/..//plugins/platformthemes/libqgtk2.so"
ERROR: findDependencyInfo: "ldd: /opt/Qt/5.12.1/gcc_64/plugins/styles/libqgtk2style.so: No such file or directory\n"
ERROR: getBinaryRPaths: "objdump: '/opt/Qt/5.12.1/gcc_64/plugins/styles/libqgtk2style.so': No such file\n"
ERROR: file copy failed from "/opt/Qt/5.12.1/gcc_64/plugins/styles/libqgtk2style.so"
ERROR: to "/home/pablo/QtWorkspace/Appimages/NormalmapGenerator/usr/bin/..//plugins/styles/libqgtk2style.so"
ERROR: ldd outputLine: "libXrender.so.1 => not found"
ERROR: for binary: "/opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so"
ERROR: Please ensure that all libraries can be found by ldd. Aborting.

How can i fix this? should i use older Qt??

@probonopd
Copy link
Owner

Thanks for reporting. Where is your Qt 5.12.1 coming from? Where is your libqgtk2style.so coming from?

@azagaya
Copy link
Author

azagaya commented Feb 22, 2019

Hi,
I've installed everything with the online installer provided in Qt website. I think libqtgtk2style was not even installed that way.

@dxsooo
Copy link

dxsooo commented Feb 23, 2019

Hi, I had the same problem when I use linuxdeployqt 6. I built my Qt 5.9.7 in docker and it won't build libqtgtk2style.so. When I checked my downloaded Qt(5.9.2) that works well with older linuxdeployqt 5, it doesn't have libqtgtk2style.so neither.

I suppose the newest linuxdeployqt searching wrong *.so?

@probonopd
Copy link
Owner

How exactly are you invoking linuxdeployqt @azagaya? Are you using some command line options?

@azagaya
Copy link
Author

azagaya commented Feb 23, 2019

Hi,
I'm using -qmake and -appimage switches only.

@probonopd
Copy link
Owner

Does the file /opt/Qt/5.12.1/gcc_64/plugins/platformthemes/libqgtk2.so exist on your system? Or similar files?

@probonopd
Copy link
Owner

If it does not exist yet, what happens if you do

apt-get update
apt-get -y install libgtk2.0-dev
git clone http://code.qt.io/qt/qtstyleplugins.git
cd qtstyleplugins
qmake
make -j$(nproc)
sudo make install 
cd -

before invoking linuxdeployqt?

@azagaya
Copy link
Author

azagaya commented Feb 23, 2019

No, only gtk3 versions seems to be installed with newer Qt.. . Funny thing is that I did not have this problem last year

@probonopd
Copy link
Owner

probonopd commented Feb 23, 2019

Please see whether this version resolves it:
https://transfer.sh/HrUX/linuxdeployqt-continuous-x86_64.AppImage

@azagaya
Copy link
Author

azagaya commented Feb 23, 2019

Thanks! As soon as I get home after work I'll try!

@azagaya
Copy link
Author

azagaya commented Feb 24, 2019

With that version i get this warning:

The plugin "/opt/Qt5.12.1/5.12.1/gcc_64/plugins/platformthemes/libqgtk2.so" could not be found. Please check spelling and try again!

However, Appimage generated works in my pc.
I have not tryied compiling qt styles myself yet, should i try that also? or this version should resolve it by itself?

@probonopd
Copy link
Owner

Thanks for testing. If you want it to look properly, you still should do

#350 (comment)

@b00f
Copy link
Contributor

b00f commented Mar 7, 2019

I also have the same issue. Any way to resolve it?

== UPDATE ==
#350 (comment) fixed it. Thanks

@b00f
Copy link
Contributor

b00f commented Mar 10, 2019

Unfortunately I was wrong. I got Segmentation fault error. At fist place I thought it's my mistake but looks like it was not. Please let me if you can find a workaround.

@probonopd
Copy link
Owner

Please try #355 (comment). The segfault may be unrelated to the gtk warnings.

@ibXCM
Copy link

ibXCM commented Dec 24, 2020

git clone http://code.qt.io/qt/qtstyleplugins.git

Thanks bro,you solved my problem。

@bohning
Copy link

bohning commented Jan 15, 2021

Unfortunately, compilation of the qtstyleplugins with gtk2.0 fails and I get (Qt 5.15.2):

qgtkstyle_p.cpp:511:11: error: ‘setSystemPalette’ is not a member of ‘QApplicationPrivate’
           QApplicationPrivate::setSystemPalette(newPalette);
           ^
Makefile:1915: recipe for target '.obj/qgtkstyle_p.o' failed

where this seems to be the solution: https://forums.freebsd.org/threads/qt5-style-plugins-patch-to-install-with-qt-5-15-0.76084/

So obviously, setSystemPalette() moved from QApplicationPrivate:: to QApplication:: namespace.

Any ideas?

@probonopd
Copy link
Owner

@bohning which system are you compiling this on? And using which Qt version from where?

@bohning
Copy link

bohning commented Jan 15, 2021

@probonopd This was on Appveyor CI, Ubuntu 16.04, pre-installed Qt 5.15.2.

See the console output here.

Thanks for your response and taking the time.

@probonopd
Copy link
Owner

Are you using the 5.15.2 source code for qtstyleplugins?

@bohning
Copy link

bohning commented Jan 16, 2021

Ah, now I see the problem. I simply followed your proposed solution and this is probably wrong. How would I get the 5.15.2 source code of the qtstyleplugins on AppVeyor?

@probonopd
Copy link
Owner

Err, looking at https://code.qt.io/cgit/qt/qtstyleplugins.git/ there seem to have been no changes in years, so that's probably not the issue. Sorry! Maybe it doesn't compile on 5.15.2 anymore? Can you try with e.g., Qt 5.9, just to be sure?

@bohning
Copy link

bohning commented Jan 16, 2021

Yes, that’s where I just looked and came to the same conclusion. With Qt 5.9 it compiles just fine.

@probonopd
Copy link
Owner

Sounds like an issue with qtstyleplugins then? Maybe you'd like to open an issue at https://bugreports.qt.io/?

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

6 participants