Error: libQtSql.so.4 on embedded system
-
Dear all,
I want to run an application which runs and connects with a database on embedded linux. (TI AM3358)
When I try to cross-compile the Qt-code I get the following error:error while loading shared libraries: libQtSql.so.4: cannot open shared object file: No such file or directory
I started to look online for this file. I found it here: http://www.rpmfind.net/linux/rpm2html/search.php?query=libQtSql.so.4
I downloaded the first file. After I extracted it and copied to /usr/lib/libQtSql.so.4.When I try to compile the code I get the following error:
error while loading shared libraries: libQtSql.so.4: internal error
Isn't this the correct file? Or should I first compile this somehow?
As you can see, I'm a beginner ;).Thanks in advance,
Kind regards -
Hi,
What Linux distribution is your target running ?
How did you cross-compile Qt ? -
Thanks for the reply.
So, Linux distribution of the target: Embedded Linux --> output of uname -a
Linux goembed 3.2.0 #1 Sat Oct 14 10:02:32 CST 2017 armv7l GNU/Linux
I'm using the image from from the vendor GOEMBED. I have builded the image it with buildroot. (all info of the image can be found here: http://www.goembed.com/index.php/Community/post/tpoId/127)
On the embedded system, when I navigate to /usr/lib I get the following libraries:
After I just added :
- libQtSql.so.4
- libQtSql.so.4.8
- libQtSql.so.4.8.7
So Qt was builded when building the image with buildroot. But I was missing this library.
Kind regards.
-
Talk to GoEmbed support, request the toolchain for this Linux you are using, download and configure.
Then sync the Qt4.8.6 repository:
$ git clone -b v4.8.6 https://code.qt.io/cgit/qt/qt.git qt4.8.6
Using the toolchain you downloaded, perform cross-compiling, when you finish copying the library libQt4Sql * to the card.
This would be a way if GoEmbed support does not have a version with libQt4Sql ready.
Here's the Readme of how to cross-compile in the SQL part:
https://code.qt.io/cgit/qt/qt.git/tree/src/sql/README.module?h=v4.8.6Run the
./configure
and see the options to enable SQL support:-qt-sql- <driver> ... Enable to SQL <driver> in the QtSql library, by default -plugin-sql- <driver> Enable SQL <driver> as a plugin to be linked to [db2 ibase mysql oci odbc psql sqlite sqlite2 sqlite_symbian symsql tds]
Cleiton Bueno
-
Just case: the latest version of Qt 4 is Qt 4.8.7.