Qt 5 - Linux app deployment - can you dynamically link dependencies?
I have a Linux Qt 5 app I'm trying to deploy on other Linux systems. I'm using VirtualBox machines develop and test. My app runs with the dependencies on the devoper machine, but not on a non-developer test machine. I have a script which loads the dependencies identified by using the ldd command. Are there any dependencies not listed by the ldd command? I'm trying to dynamically link the dependencies. Is that possible? Or do I have to configure and build from the source code with the static option? Any help would be appreciated. Thanks.
Yes, dynamic libs should work. In Qt5, you need to copy platform plugin to <biniary dir>/platforms/ in addition to other dependencies.
Here's the dependencies I am using:
Here's the script I'm using:
getconf LONG_BIT= "64" ]
Run your app
The script works on the developer machine where Qt 5 is installed, but on the test machine where Qt 5 is not installed I click the script, choose run, and nothing happens. Both machines are 32 bit Linux Mint 14 in VirtualBox. The dependencies are contained in libs_32. I have the platforms folder in the Lottery_32 directory. Are there any dependencies I'm missing? I checked them against the ldd command on the app.
That is not the usual way of doing things, but it's your choice. I don't see anything missing, but it could be that the libraries depend on other stuff. Build in debug and see if you can attach gdb to the app.
What is the usual way of doing it? I'm new to Qt in Linux. I've developed in Windows before. This is my first Linux Qt app.
Dependencies are traditionally handled by package managers. That is why you can easily install apps with a simple .deb or .rpm file. All shared libraries are really shared this way, by all applications. Saves space and makes the OS faster.
You won't find Qt5 in repositories yet, though.