Yocto-编译和安装mariadb-connector-c



我在yocto(BSP-yocto-I.MX6-PD20.1.0(中编译mariadb-connector-c时遇到问题。以下是我的食谱:

SUMMARY = "MariadbConnector"
SECTION = "base"
DESCRIPTION = "This recipe is for installing MariadbConnector"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c 
file://win/packaging/license.rtf;md5=d84792abbbf7478e48e648c9caf8107b 
file://cmake/COPYING-CMAKE-SCRIPTS;md5=54c7042be62e169199200bc6477f04d1"
SRC_URI = https://dlm.mariadb.com/2319728/Connectors/c/connector-c-3.3.1/mariadb-connector-c-3.3.1-src.tar.gz;name=source
SRC_URI[source.md5sum] = "bd8090528becf9a788f78ed14bb90764"
SRC_URI[source.sha256sum] = "29993f4ae4c975662724978792d1a503b9ee760fbb194d321a754253cbe60aad"
S = "${WORKDIR}/mariadb-connector-c-3.3.1-src"
DEPENDS = "zlib openssl gnutls krb5 curl zstd"
inherit cmake
do_configure() {
cd ${WORKDIR}/build/
cmake ../mariadb-connector-c-3.3.1-src -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
}
do_compile() {
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake --build .
}

以下是日志文件的链接:https://pastebin.com/qK20ZJsK

我是yocto的新手,所以如果我必须提供更多细节,请告诉我!此外,我成功地在主机Ubuntu 18.04.6 LTS系统上编译并安装了mariadb-connector-c。

提前感谢!

感谢Martin提供的解决方案!以下mariadb-connector-c的bitbake配方有效:

SUMMARY = "mariadb-connector-c"
SECTION = "base"
DESCRIPTION = "This recipe is for installing mariadb-connector-c"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c 
file://win/packaging/license.rtf;md5=d84792abbbf7478e48e648c9caf8107b 
file://cmake/COPYING-CMAKE-SCRIPTS;md5=54c7042be62e169199200bc6477f04d1"
SRC_URI = https://dlm.mariadb.com/2319728/Connectors/c/connector-c-3.3.1/mariadb-connector-c-3.3.1-src.tar.gz;name=source
SRC_URI[source.md5sum] = "bd8090528becf9a788f78ed14bb90764"
SRC_URI[source.sha256sum] = "29993f4ae4c975662724978792d1a503b9ee760fbb194d321a754253cbe60aad"
S = "${WORKDIR}/mariadb-connector-c-3.3.1-src"
DEPENDS = "zlib openssl gnutls krb5 curl zstd"
inherit cmake
PACKAGES =+"${PN}-include"
FILES_${PN}+="${libdir}/mariadb/libmariadb.so.3 
${libdir}/mariadb/plugin/dialog.so 
${libdir}/mariadb/plugin/mysql_clear_password.so 
${libdir}/mariadb/plugin/remote_io.so 
${libdir}/mariadb/plugin/auth_gssapi_client.so 
${bindir}/mariadb_config 
${libdir}/mariadb/plugin/caching_sha2_password.so 
${libdir}/mariadb/plugin/sha256_password.so 
${libdir}/mariadb/plugin/zstd.so 
${libdir}/mariadb/plugin/client_ed25519.so"
FILES_${PN}-dev+="${libdir}/mariadb/libmariadb.so"
FILES_${PN}-staticdev+="${libdir}/mariadb/libmariadb.a 
${libdir}/mariadb/libmariadbclient.a"
FILES_${PN}-include+="${includedir}/mariadb/mariadb_com.h 
${includedir}/mariadb/mysql.h 
${includedir}/mariadb/mariadb_stmt.h 
${includedir}/mariadb/ma_pvio.h 
${includedir}/mariadb/ma_tls.h 
${includedir}/mariadb/mariadb_version.h 
${includedir}/mariadb/ma_list.h 
${includedir}/mariadb/errmsg.h 
${includedir}/mariadb/mariadb_dyncol.h 
${includedir}/mariadb/mariadb_ctype.h 
${includedir}/mariadb/mysqld_error.h 
${includedir}/mariadb/mysql/client_plugin.h 
${includedir}/mariadb/mysql/plugin_auth_common.h 
${includedir}/mariadb/mysql/plugin_auth.h 
${includedir}/mariadb/mariadb/ma_io.h "
RDEPENDS_${PN}+="${PN}-include"
do_install_append() {
rm -rf ${D}/usr/man/*
rmdir ${D}/usr/man
}

相关内容

  • 没有找到相关文章

最新更新