Linux Yocto-构建依赖项
我想在Yocto中添加我自己的应用程序。此应用程序使用协议缓冲区。当我尝试构建映像时,会出现许多错误,如以下错误:Linux Yocto-构建依赖项,linux,protocol-buffers,yocto,Linux,Protocol Buffers,Yocto,我想在Yocto中添加我自己的应用程序。此应用程序使用协议缓冲区。当我尝试构建映像时,会出现许多错误,如以下错误: path/to/file.pb.h:10:10: fatal error: google/protobuf/port_def.inc: No such file or directory 我将protobuf添加到我的应用程序配方文件中的DEPEND变量,以及IMAGE\u INSTALL\u append变量。当我在没有应用程序的情况下构建映像时,我在中找到了所有需要的prot
path/to/file.pb.h:10:10: fatal error: google/protobuf/port_def.inc: No such file or directory
我将protobuf添加到我的应用程序配方文件中的DEPEND
变量,以及IMAGE\u INSTALL\u append
变量。当我在没有应用程序的情况下构建映像时,我在中找到了所有需要的protobuf文件
build/tmp/work/<my_machine>/atmel-demo-image/1.0-r1/rootfs/.
提前感谢您的帮助
DESCRIPTION = "Some description."
LICENSE="MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
bindir = "${localdir}/bin"
DEPENDS += "protobuf protobuf-native protobuf-c protobuf-c-native"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
SRC_URI = "file://MyApp/src/* \
"
S = "${WORKDIR}"
FILES_${PN} += "${libdir}/*"
FILES_${PN}-dev = "${libdir}/* ${includedir}"
do_compile() {
cd MyApp/src
export PROTOBUF_CONFIG_OPTS="--host=arm-poky-linux-gnueabi --with-protoc=/usr/local/bin/protoc"
protoc -I=. --cpp_out=. path/to/file1.proto
protoc -I=. --cpp_out=. path/to/file2.proto
make
}
do_install() {
install -d ${D}${bindir}
cp "/path/to/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/MyApp/1.0-r0/MyApp/src/myapp" "${D}${bindir}/myapp"
}