I want to build MySQL
driver while cross-compiling Qt5
for Arm(Raspberry Pi)
.
- In order to check
MySQL
client libraries installation on target we run:
pi@raspberrypi:~ $ mysql_config --version
10.1.38
pi@raspberrypi:~ $ mysql_config --include
-I/usr/include/mysql
pi@raspberrypi:~ $ mysql_config --libs
-L/usr/lib/arm-linux-gnueabihf -lmariadbclient -lpthread -lz -lm -ldl
- And we configure
Qt
like this:
../configure -opengl es2 -device linux-rpi3-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -no-use-gold-linker -qt-xcb -xcb -sysroot $RPI_SYSROOT -opensource -confirm-license -nomake examples -nomake tests -release -make libs -prefix /usr/local/qt5pi -sql-mysql -recheck-all
- Configure will throw error:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed
Note:
- If we look at the
config.log
it seems Qt Configure looks for MySQL in host machine, not sysroot or target!
[...]
looking for library mysql
Trying source 0 (type mysqlConfig) of library mysql ...
mysql_config not found.
=> source produced no result.
Trying source 1 (type mysqlConfig) of library mysql ...
mysql_config not found.
=> source produced no result.
Trying source 2 (type mysqlConfig) of library mysql ...
mysql_config not found.
=> source produced no result.
Trying source 3 (type mysqlConfig) of library mysql ...
mysql_config not found.
=> source produced no result.
Trying source 4 (type inline) of library mysql ...
None of [libmysqlclient_r.so libmysqlclient_r.a] found in [] and global paths.
=> source produced no result.
Trying source 5 (type inline) of library mysql ...
=> source failed condition 'config.win32'.
Trying source 6 (type inline) of library mysql ...
None of [libmysqlclient.so libmysqlclient.a] found in [] and global paths.
=> source produced no result.
test config.qtbase_sqldrivers.libraries.mysql FAILED
[...]
What do you suggest?
Update Sep 4'19
Seems to be a reported bug:
But still didn't get fixed!, looking for a workaround...