Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Qt Application Linux Deployment

$
0
0
Hi I know that this is an issue with numerous posts related to it. However in none of those posts I could find a proper “best practice” way to deploy an application on Linux. I’ve struggled for many hours with this, up to the point where the last remaining issues are only related to the required dependencies which needs to be distributed with the application. This is what I do: Build Qt 4.8.4 on the target 64 bit platforms (I’ve tried both Fedora 18, CentOs 6.5 and Ubuntu 10.04). Build the application against my custom built Qt version. I then have a script that does the following (based on the Qt deployment guidelines [qt-project.org]): It runs ldd on my application as well as all my plugins. The script copies all found dependencies into a /install_version/libs directory. It also runs ldd on the required Qt libs in order for all their dependencies to copied to the libs directory as well. The script then removes the RPATH from the Qt libs. The script creates a launch.sh file for the application which sets the LD_LIBRARY_PATH as described in the deployment guidelines [qt-project.org] in the Qt documentation. Finally, the script packages everything using makeself When I install my packages on the same machine it works as expected. However when I install the package on a newer version of the OS it does not work. For example, the package I built on Ubuntu 10.04 crashes with seg faults on Ubuntu 12.04. Interestingly enough, I found that if I remove everything from the /libs folder except the Qt libs and my own libs, the install works 100% on Ubuntu 12.04. I assume that this is a fluke because the Qt dependencies which are present on the 12.04 install is binary compatible with that of 10.04. However this package will break as soon as one of the dependencies are not binary compatible any more… Thus, my question is this: Which dependencies are required in the /libs folder? Or is there a better way to do this (apart from RPM and DEB packages)? I checked the Qt Creator installation for example, in there they also have the minimum number of libs in there (they don’t distribute libgc for example…) Any feedback on this topic would be much appreciated. Thanks Jaco

Viewing all articles
Browse latest Browse all 2113

Trending Articles