[Buildroot] BR2_PACKAGE_QT5BASE_MYSQL error
Peter Seiderer
ps.report at gmx.net
Thu Jul 22 17:59:11 UTC 2021
Hello Scott,
On Wed, 21 Jul 2021 21:21:47 +0000, Scott Bartolett <SBartolett at thorlabs.com> wrote:
> Hi all,
>
> I'm getting the following error when I enable the Qt5 MySQL Plugin - BR2_PACKAGE_QT5BASE_MYSQL.
>
> ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
> make[1]: *** [package/pkg-generic.mk:240: /home/vytran/buildroot-2021.05/output/build/qt5base-5.15.2/.stamp_configured] Error 3
> make: *** [Makefile:84: _all] Error 2
>
>
> I have the following:
>
> BR2_PACKAGE_MYSQL = y
> BR2_PACKAGE_HAS_MYSQL = y
> BR2_PACKAGE_PROVIDES_MYSQL = mariadb
> BR2_PACKAGE_QT5BASE_MYSQL = y
>
> When I disable BR2_PACKAGE_QT5BASE_MYSQL, it builds ok and MySQL works fine. But my Qt application cannot find and drivers. I assume I need the Qt5 MySQL Plugin for that.
From the qt5base configure step:
Trying source 0 (type mysqlConfig) of library mysql ...
+ .../host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/mysql_config --version
> .../host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/mysql_config: line 100: \
.../host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/mariadb_config: cannot execute binary file: Exec format error
And:
$ file host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/mariadb_config
host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/mariadb_config: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 5.10.0, with debug_info, not stripped
Seems the mariadb_config executable (used from the mysql_config script) is
cross-compiled for the target instead compiled nativ for the host...
Your can work-around/fix it by (after qt5base failure, adjust pathes for your need,
e.g. mariabdb-10.3.28, etc):
$ gcc -I ./build/mariadb-10.3.30/libmariadb/include -o host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/mariadb_config build/mariadb-10.3.30/libmariadb/mariadb_config/mariadb_config.c
$ rm -rf build/qt5base-5.15.2
And restart the build...
Regards,
Peter
>
> I'm using Buildroot 2021.05.
> Regards,
> Scott
More information about the buildroot
mailing list