Deploying A Project
-
Hi
Qt 5.6.0
I'm trying to deploy a project an linux (currently fedora). I'm using QuickWidgets in my application. so I built qt static and made the project with that static kit and I ran it on a live fedora (with no qt installed) but it gave me the quick libs not installed error. I searched it and found out it's a bug and there is a problem with static linking and fedora. so I tried the shared libs and built the project with the default compiler and used this in the .pro file:QMAKE_LFLAGS += -Wl,-rpath,"'$$ORIGIN'"
and put the shared libs beside the executable but it also didn't run on a live fedora and it told me that it couldn't find or load the platform plugin xcb and the available plugins was xcb !!! (I but the xcb lib file in platforms path in the executable path).
I searched the internet and found out that this is a bug in Qt 5.6.0 and I had to build the project with -no-ulibs command and I did that and put the shared libs beside the exe and I ran it and it gave me the same xcb error.
the deploying part of qt seems impossible to me and it has driven me crazy. What should I do?
-
well you seem to use the RPATH way
maybe try with export script
https://lemirep.wordpress.com/2013/06/01/deploying-qt-applications-on-linux-and-windows-3/i never used fedora but this worked in old ubuntu and newer ones.
using EXPORT for ld. -
Hi, avoiding that infamous "... failed to start ... xcb" error in Linux I think is actually easier with 5.6 than it was in 5.5.1 or earlier.
You don't need to do any chrpath -r fiddling or create an extra lib directory, just put the 2 .so files that libqxcb.so needs next to it. So a minimal Hello World setup for Linux Qt 5.6 would look like this:YourApp libicudata.so.56 libicui18n.so.56 libicuuc.so.56 libQt5Core.so.5 libQt5Gui.so.5 libQtWidgets.so.5 platforms
and in the platforms subdirectory:
libqxcb.so libQt5DBus.so.5 libQt5XcbQpa.so.5
(To understand more, you can use the chrpath and ldd commands on the libqxcb.file)
-
Hi @hskoglund @mrjj
Both of your ways mixed together helped me do it. but there is a problem. I could reduce the size of the files to 20 mb and it runs on fedora 23 but in previous versions of fedora libicu is at the previous version and the program requires the latest one and the size of the icu libs are 30 mb !!!
is there a way to reduce the size and get it to work at the same time? -
Hi
Not sure u can get it smaller if u really need those libs
https://forum.qt.io/topic/37891/minimal-icudt51-dll-icudt52-dll-icudt53-dll-icudt54-dll-and-icudt55-dll/16I was under the impression that one could leave them out but
not in all cases it seems. -
@mrjj
I don't realy need the libs and these are dll files but I need the linux libs. I built qt with -no-icu and when I use ldd on my own fedora it doesn't show the icu libs but when I do the same thing on a same file in a live fedora it shows the icu libs. Am I doing something wrong? -
@shahriar25
It all sounds good.
Maybe the live fedora have other version of Qt that uses/build with icu?
Else it sounds really strange as ".exe" should have same dependencies
if same file.?? -
Hi
Thank you @mrjj and everyone who helped. I built qt staticand with -no-icu and there was no icu libs in ldd and I ran the app on pure fedora