我正在尝试编译我找到的这个GitHub项目,并将结果库添加到我的SDK中。
该项目使用CMake。我的食谱可以下载,并建立这个项目。生成的二进制文件如预期的那样工作,给定的.so
文件包含我所需的内容。当试图将.so
文件添加到我的映像中时,我会得到以下错误
ERROR: dbcppp-1.0+gitrAUTOINC+917c925638-r0 do_package_qa: QA Issue: -dev package dbcppp-dev contains non-symlink .so '/usr/lib/libdbcppp.so'
-dev package dbcppp-dev contains non-symlink .so '/usr/lib/libxmlmm.so' [dev-elf]
ERROR: dbcppp-1.0+gitrAUTOINC+917c925638-r0 do_package_qa: QA Issue: dbcppp rdepends on dbcppp-dev [dev-deps]
ERROR: dbcppp-1.0+gitrAUTOINC+917c925638-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: Logfile of failure stored in: /home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/dbcppp/1.0+gitrAUTOINC+917c925638-r0/temp/log.do_package_qa.10943
ERROR: Task (/home/michael/Documents/MAIN_Application/MAIN_layers/meta-MAINapplication/recipes-core/dbcppp/dbcppp_0.0.bb:do_package_qa) failed with exit code '1'
我的食谱如下:
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "gitsm://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master"
PV = "1.0+gitr${SRCPV}"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
inherit pkgconfig cmake
INSANE_SKIP:${PN} = "ldflags"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
do_install() {
install -d ${D}${bindir}
install -m 0755 ${B}/bin/dbcppp ${D}${bindir}
install -d ${D}${libdir}
install -m 0755 ${B}/src/libdbcppp/libdbcppp.so ${D}${libdir}
install -m 0755 ${B}/libxmlmm.so ${D}${libdir}
install -m 0755 ${B}/third-party/libxml2/libxml2.so.2.9.10 ${D}${libdir}
}
FILES_${PN} += "${libdir}/*"
FILES_${PN}-dev = "${libdir}/* ${includedir}"
我已经找了一段时间了,但我找不到解决办法。我需要做些什么才能让这件事奏效?
编辑1:我更新了bb文件如下。这是可行的,但它并没有将必要的头文件放入我的SDK中。
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "gitsm://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master"
PV = "1.0+gitr${SRCPV}"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
inherit cmake
INSANE_SKIP:${PN} = "ldflags"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
do_install() {
install -d ${D}${bindir}
install -m 0755 ${B}/bin/dbcppp ${D}${bindir}
install -d ${D}${libdir}
install -m 0755 ${B}/src/libdbcppp/libdbcppp.so ${D}${libdir}
install -m 0755 ${B}/libxmlmm.so ${D}${libdir}
install -m 0755 ${B}/third-party/libxml2/libxml2.so ${D}${libdir}
}
FILES_${PN} += "${libdir}/*.so"
FILES_${PN}-dev = "${includedir}"
发布于 2022-06-22 15:51:56
dbcppp
Cmake文件已经有了一个自动安装所有东西的install
目标,因此您不需要do_install
。
试一试以下配方:
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "gitsm://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master"
PV = "1.0+gitr${SRCPV}"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
inherit cmake
FILES_${PN} += "/usr/lib/xml2Conf.sh /usr/lib/lib*.so.*"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} += "dev-so"
在Yocto中,非版本共享库.so
主题很难实现,这就是为什么如果您无法控制源项目的文件/库,那么跳过QA共享库问题是可行的。
上面的菜谱分成多个包:
dbcppp
(如果您只想要dbcppp
二进制文件(二进制文件是为二进制文件发送到run)dbcppp-dev
的话)(如果您想要头文件和共享的libraries)dbcppp-doc
(如果您需要man和html页面))
https://stackoverflow.com/questions/72717982
复制相似问题