Yocto Project无法正确安装文件

时间:2017-09-16 22:02:43

标签: mariadb yocto bitbake openembedded

我正在尝试为MariaDB的C / C ++连接器创建一个配方。

Bitbake没有错误或警告,但如果我检查了我的图像中的文件,则有两个丢失:

  • libmariadbclient.a
  • libmariadb.so

在不同的包中都存在(-dev和-staticdev),但无论出于何种原因,都没有发送到我的图像。

有人有解决方案吗?

这是食谱:

 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
                file://win/packaging     /license.rtf;md5=0b6c50a153e2fca0364c97805d74ba50 \
                file://cmake/COPYING-CMAKE-SCRIPTS;md5=54c7042be62e169199200bc6477f04d1"

SRC_URI = "http://mirror2.hs-esslingen.de/mariadb//connector-c-3.0.2/mariadb-connector-c-3.0.2-src.tar.gz;name=source"

SRC_URI[source.md5sum] = "2eb5ba004ac105eebb538ead352c0c78"
SRC_URI[source.md256sum] = "518d14b8d77838370767d73f9bf1674f46232e1a2a34d4195bd38f52a3033758"

S = "${WORKDIR}/mariadb-connector-c-3.0.2-src"

DEPENDS = "zlib openssl gnutls krb5 curl"

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"

FILES_${PN}-dev+="${libdir}/mariadb/libmariadb.so"

FILES_${PN}-staticdev+="${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"

inherit cmake

do_compile() {
    make
}

1 个答案:

答案 0 :(得分:2)

只需将特定包添加到图像即可。你的local.conf(或图像配方)中的IMAGE_INSTALL_append = " mariadb-dev"。听起来你想要在设备上编译一些东西,这样就不太可能做你想要的了(你仍然缺少所有的开发工具以及你需要的所有其他-dev包。)

我真的不建议在图像上进行开发(为什么不为你的应用程序编写一个配方并让Yocto处理编译和安装?)但是如果你想这样做,在local.conf中添加它应该工作:

EXTRA_IMAGE_FEATURES += "dev-pkgs tools-sdk"

这会为图像添加构建工具(gcc,make等)和所有-dev包。有关详细信息,请参阅the manual