Qt 5.5.1, libmysqlclient problem in embedded Debian device
-
Hi all,
I'm building Qt 5.5.1 on my BBB with the latest Debian image.
I installed on the board the required packages:apt-get install libmysqlclient-dev
Then on my PC I cross compiled asa always:
./configure -opensource -confirm-license -no-pch -prefix /opt/qt551-bbbhf -release -force-debug-info -device linux-bbbhf-g++ -make libs -nomake tests -nomake examples -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/bbbhf
I need Mysql plugin but I get:
SQL drivers: DB2 .................. no InterBase ............ no MySQL ................ no OCI .................. no ODBC ................. no PostgreSQL ........... no SQLite 2 ............. no SQLite ............... yes (plugin, using bundled copy) TDS .................. no
if I check the configure messages I can see:
InterBase disabled. MySQL (thread-safe) auto-detection... () /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/mnt/bbbhf -O2 -g -Wall -W -fPIC -I. -I/usr/include/mysql -I../../../mkspecs/devices/linux-bbbhf-g++ -o mysql.o ../mysql/mysql.cpp /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/bbbhf -o mysql_r mysql.o -lrt --sysroot=/mnt/bbbhf -L/usr/lib64 -lpthread -lz -lm -lssl -lcrypto -ldl -lmysqlclient_r /usr/lib64/librt.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status gmake: *** [mysql_r] Error 1 MySQL (thread-safe) disabled. MySQL (thread-unsafe) auto-detection... () /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/mnt/bbbhf -O2 -g -Wall -W -fPIC -I. -I/usr/include/mysql -I../../../mkspecs/devices/linux-bbbhf-g++ -o mysql.o mysql.cpp /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/bbbhf -o mysql mysql.o -lrt --sysroot=/mnt/bbbhf -L/usr/lib64 -lpthread -lz -lm -lssl -lcrypto -ldl -lmysqlclient /usr/lib64/librt.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status gmake: *** [mysql] Error 1 MySQL (thread-unsafe) disabled.
It seems that it try to find arm library on my PC :
-L/usr/lib64
but I think that's a configuration bug.
I remember that there wasn't that problem with previous Qt versions.What do you think about? How can I get Mysql plugin working on my BeagleBone Black?
Thanks!
Luca
-
Hi,
While that is pretty strange, one workaround to try is to build Qt like that, and then build the MySQL plugin by hand like shown in the documentation.
-
After configuring Qt I get a new Makefile in:
qt-everywhere-opensource-src-5.5.1/qtbase/config.tests/unix/mysql/
that contain the
-L/usr/lib64
that generate the problem.
On the top of the Makefile there is:# Command: /mnt/temporanea/qt-everywhere-opensource-src-5.5.1/qtbase/bin/qmake -nocache -spec /mnt/temporanea/qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/devices/linux-bbbhf-g++ 'CONFIG+= cross_compile force_debug_info compile_examples shared' CONFIG+=android_app 'CONFIG-=debug_and_release app_bundle lib_bundle' 'LIBS*=--sysroot=/mnt/bbbhf "-L/usr/lib64" "-lmysqlclient" "-lpthread" "-lz" "-lm" "-lssl" "-lcrypto" "-ldl"' LIBS+= 'INCLUDEPATH*= "/usr/include/mysql"' 'QMAKE_CXXFLAGS*=--sysroot=/mnt/bbbhf' QMAKE_CXXFLAGS+= -o Makefile mysql.pro
Where can I find in Qt source the point where that Makefile is generated so that I can eventually find the problem?
-
/qt5-root-folder/qtbase/config.tests
-
I just filled a bug report on: