Unable to deploy Qt app under Linux
-
Then yours is working. If you don't get the driver issue your build worked correctly. It can't connect because you don't have the database it is looking for.
-
@ambershark said in Unable to deploy Qt app under Linux:
Then yours is working.
I gathered that. I don't build (and execute) code without taking a peek at what I'm building first. ;)
My bestest of guesses is some problem with the mysql plugin loading. As to why ... I have no idea.Although ... why is
libqsqlmysql.so
inlib/plugins
? I think it only needs to go intolib/plugins/sqldrivers
and there's no reason to have a secondlibQt5Sql.so
inside the plugins folder. These:./libqsqlmysql.so: /usr/lib/x86_64-linux-gnu/libQt5Sql.so.5: version `Qt_5_PRIVATE_API' not found (required by ./libqsqlmysql.so) ./libqsqlmysql.so: /usr/lib/x86_64-linux-gnu/libQt5Sql.so.5: version `Qt_5' not found (required by ./libqsqlmysql.so)
are also concerning.
On a related note, if you're deploying on debian why the hell do you want do distribute Qt too??
-
@kshegunov said in Unable to deploy Qt app under Linux:
@ambershark said in Unable to deploy Qt app under Linux:
Then yours is working.
I gathered that. I don't build (and execute) code without taking a peek at what I'm building first. ;)
My bestest of guesses is some problem with the mysql plugin loading. As to why ... I have no idea.Although ... why is
libqsqlmysql.so
inlib/plugins
? I think it only needs to go intolib/plugins/sqldrivers
and there's no reason to have a secondlibQt5Sql.so
inside the plugins folder. These:./libqsqlmysql.so: /usr/lib/x86_64-linux-gnu/libQt5Sql.so.5: version `Qt_5_PRIVATE_API' not found (required by ./libqsqlmysql.so) ./libqsqlmysql.so: /usr/lib/x86_64-linux-gnu/libQt5Sql.so.5: version `Qt_5' not found (required by ./libqsqlmysql.so)
are also concerning.
On a related note, if you're deploying on debian why the hell do you want do distribute Qt too??
Yea I originally told him to put them in plugins/sqldrivers and when that didn't work told him to try just in plugins (the old style). Neither changed anything and I'm guessing he just left them in plugins. He should definitely move them back for a real release.
Those messages he gets are my big concern too. I think he has a bad install of something, be it mysql or qt or something on his target system where it isn't working. I was expecting
ldd
to show the problems but for some reason it's not. The problems are still there but ldd isn't shedding light on it. -
@ambershark said in Unable to deploy Qt app under Linux:
I think he has a bad install of something, be it mysql or qt or something on his target system where it isn't working. I
First
ldd
should be run with the proper path (for the qsqlmysql plugin). From the commands he posted he ran it with the default linker locations so it will find the distro's Qt and you he'd get version mismatches. See the lines that follow the command:mbnoimivm@ubuntu:~/files/libs/plugins/sqldrivers$ ldd libqsqlmysql.so ... libQt5Sql.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Sql.so.5 (0x00007faa38f34000) libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007faa3888d000)
-
@kshegunov Yea I warned him about that and told him to run it with LD_LIBRARY_PATH before the ldd. That was like 20 posts ago though. He had similar results that didn't tell me what I needed to know though.
-
Thank you very much @kshegunov & @ambershark
I formatted my PC and the virtual machine I use for testing deployments. I don't use any PPA so I'm using the official packages of GCC and MySQL in Linux Mint 18 x64 xfce repositories.
I get same exact errors I read all your posts twice to be sure everything is fine but I still unable to deploy my app. I pushed the source code to github and the deb file too.
Please guide me how can I fix this issue.
I'm very frustrated because I wasted hours for preparing the deployment even before writing my code. I googled a lot and read all Qt deployment guidance but nothing help me practically.
-
If you want to send any files, I can add you to my github project.
@ambershark I added you to my project but @kshegunov I couldn't find you on Github
-
@mbnoimi said in Unable to deploy Qt app under Linux:
I formatted my PC and the virtual machine I use for testing deployments
I tried to run the app on Mint VM and it works fine! so the problem in my Ubuntu VM. I'm using Ubuntu 14.04 while I build the app under LM 18 (built from Ubuntu 16.04) so I've to investigate in Ubuntu libraries.
As I told you before deb package calls the following dependencies
Depends: libmysqlclient20 (>=5.7.11), libstdc++6 (>=4.8.4), libgcc1 (>=1:3.0), libc6 (>=2.14)
Do you think I've to change them for previous Ubuntu versions?
-
Oh yeah... Problem SOLVED at last
The problem occurs because of different versions of
libstdc++6
I fixed it by modifying the dependency from4.8.4
to5.4.0
Ubuntu 14.04 and earlier users need to add the following PPA then Qt 5.7 apps will run smoothly:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update
-
@mbnoimi Great news! Sorry I haven't had time for forums in the last few days or I would have continued helping. Sounds like you finally found the culprit. I knew that mysql wasn't loading, but for some reason ldd wasn't showing us why. Glad you finally found it.
And like I said, welcome to the nightmare that is deploying binaries for linux, lol. I hate it!