我正在尝试将 cmocka 放入嵌入式 Linux 目标板。
我使用 Yocto 创建了 rootfs,并为 cmocka-1.1.5 添加了自定义配方。cmocka 共享库是使用我的自定义 bitbake 配方生成的,但是当我尝试使用bitbake core-image-sato
它构建完整图像时失败并出现以下错误:
ERROR: cmocka-1.1.5-1.0+AUTOINC+546bd50924-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package contains symlink .so: cmocka-1.1.5 path '/work/aarch64-poky-linux/cmocka-1.1.5/1.0+AUTOINC+546bd50924-r0/packages-split/cmocka-1.1.5/usr/lib/libcmocka.so' [dev-so]
ERROR: cmocka-1.1.5-1.0+AUTOINC+546bd50924-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: cmocka-1.1.5-1.0+AUTOINC+546bd50924-r0 do_package_qa:
ERROR: cmocka-1.1.5-1.0+AUTOINC+546bd50924-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /mnt/Drive_2/odroid-yocto/build/tmp/work/aarch64-poky-linux/cmocka-1.1.5/1.0+AUTOINC+546bd50924-r0/temp/log.do_package_qa.22650
ERROR: Task (/mnt/Drive_2/odroid-yocto/meta-xeb360/recipes-cmocka/cmocka-1.1.5/cmocka-1.1.5.bb:do_package_qa) failed with exit code '1'
我的自定义 bitbake 配方cmocka-1.1.5.bb
如下所示:
DESCRIPTION = "An elegant unit testing framework for C with support for mock objects"
SECTION = "Unit Testing"
LICENSE = "GPLv3"
PR = "r0"
LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "${AUTOREV}"
PVBASE := "${PV}"
PV = "${PVBASE}+${SRCPV}"
SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git"
S = "${WORKDIR}/git"
inherit pkgconfig cmake
EXTRA_OECMAKE = ""
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-staticdev"
RDEPENDS_${PN}-staticdev = ""
RDEPENDS_${PN}-dev = ""
RDEPENDS_${PN}-dbg = ""
do_configure() {
cd ${S}/../build/
cmake -DCMAKE_INSTALL_PREFIX=${exec_prefix} ../git/
}
do_compile() {
cd ${S}/../build/
oe_runmake
}
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
SOLIBS = ".so*"
SOLIBSDEV += ".so"
FILES_SOLIBSDEV = ""
FILES_${PN}-dev = "\
${libdir}/lib*${SOLIBS} \
${includedir} \
${libdir}/pkgconfig \
${libdir}/cmake \
${libdir}/cmake/cmocka \
${libdir}/cmake/cmocka/cmocka-config.cmake \
${libdir}/cmake/cmocka/cmocka-config-version.cmake \
"
谁能让我知道我错过了什么或我做错了什么?