【发布时间】:2020-01-16 06:24:51
【问题描述】:
我正在尝试将 Github 上的一个 CPLD 编程实用程序合并到我的 Yocto 构建中,该实用程序位于 https://github.com/kontron/altera-stapl,但我得到了对 gpiod 函数的未定义引用。我认为这取决于我食谱中的 libgpiod。我是否正确指定了依赖项?
这是我的食谱:
SUMMARY = "CPLD STAPL Programming"
DESCRIPTION = "A userspace port of the Altera Jam STAPL Bytecode Player."
MAINTAINER = "Michael Walle <michael.walle@kontron.com>"
HOMEPAGE = "https://github.com/kontron/altera-stapl"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b"
SRC_URI = "git://github.com/kontron/altera-stapl.git"
SRCREV = "71540fb3dccf57ea0e43cef77d628244de402152"
SRC_URI[sha256sum] = "DCF8A052CD7908F484EAEE8A1924809056611E68EA28652E17C021BE836FAA6C"
DEPENDS = "libgpiod"
S="${WORKDIR}/git"
do_install () {
install -d ${D}${bindir}
install -m 0755 altera-stapl ${D}${bindir}
}
这些是我得到的链接器错误(有很多,不仅仅是这个,如果需要我可以发布整个日志)
gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: altera-gpio.c:(.text+0x3f4): undefined reference to `gpiod_line_request_output'
/home/gen-ccm-root/workdir/tools/poky/build-dev/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/altera-stapl/1.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: altera-gpio.o: in function `close_jtag_hardware':
altera-gpio.c:(.text+0x4da): undefined reference to `gpiod_line_release'
collect2: error: ld returned 1 exit status
Makefile:31: recipe for target 'altera-stapl' failed
设置依赖的正确方法是什么? 更新:我在 Ubuntu 18.04 上运行 Yocto Zeus(我的 GCC 是 7.4.0)。
【问题讨论】:
-
正在使用什么构建机制?自动工具?制作?介子?别的东西?继承各自的类可能已经足够了,因此会触发适当的配置机制。
-
附录:yocto的依赖设置正确的方法是
DEPENDS,应该没问题。只是包构建还必须了解所有跨构建特性。 -
我正在使用 Yocto Zeus,我不确定它在引擎盖下使用了什么。我怎样才能找到它?
-
通过查看 github.com/kontron/altera-stapl.git :) 注意:要么你的 MAINTAINER 是错误的(例如你不是 Michael Walle),要么你应该知道,因为你然后工作控创。读作:配方的 MAINTAINER 字段是指配方的维护者,而不是上游源包的维护者。
-
altera-stapl 使用了一个很好的旧 Makefile。我也会修复维护者。
标签: embedded-linux yocto bitbake