5

我想MySQL在交叉编译时构建驱动Qt5程序Arm(Raspberry Pi)

  • 为了检查MySQL目标上的客户端库安装,我们运行:
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
  • 我们这样配置Qt
../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
  • 配置会抛出错误:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed

笔记:

  • 如果我们看一下,config.logQt Configure 似乎在主机中寻找 MySQL,而不是 sysroot 或目标!
[...]
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
[...]

你有什么建议?

2019 年 9 月 4 日更新

似乎是一个报告的错误:

但是还是没有解决!,正在寻找解决方法...

4

0 回答 0