我可以在我的x86_64主机上使用以下步骤来克隆并构建Calcurse:
$ ./autogen
$ ./configure
$ make
$ make install
现在我想用Yocto食谱构建相同的内容。以下是我的构建配置以供参考:
Build Configuration:
BB_VERSION = "2.8.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "qemuarm64"
DISTRO = "poky"
DISTRO_VERSION = "5.0.6"
TUNE_FEATURES = "aarch64 crc cortexa57"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "scarthgap:60b5842348f50ad44b6a64fc6201952bbbc46849"
meta-clang = "scarthgap:9fbfa9db33131abdf3870a94f00199eb53e276e5"
meta-oe
meta-python = "scarthgap:3c293e14492f01e22a64004e2330fb620c27578a"
meta-mylayer
workspace = "scarthgap:60b5842348f50ad44b6a64fc6201952bbbc46849"
I准备了以下食谱(已添加到Meta-Mylayer),并且在配置步骤中失败。
LICENSE = "Unknown"
LIC_FILES_CHKSUM = "file://COPYING;md5=547ff6a749ae78798e7a1ab1c9177b9d"
SRC_URI = "git://github.com/lfos/calcurse.git;protocol=https;branch=master"
PV = "1.0+git"
SRCREV = "95bb55f68b446e4461f27ef3a74a7d2eda950289"
S = "${WORKDIR}/git"
DEPENDS = "ncurses"
DEPENDS += "autoconf-archive-native"
inherit gettext autotools
# Specify any options you want to pass to the configure script using EXTRA_OECONF:
EXTRA_OECONF = "--with-ncursesw"
do_configure() {
bbplain "WORKDIR=${WORKDIR}"
bbplain "S=${S}"
cd ${S}
${S}/autogen.sh
${S}/configure --host=${TARGET_SYS} --prefix=/usr
}
do_compile() {
cd ${S}
oe_runmake
}
do_install() {
cd ${S}
oe_runmake install DESTDIR=${D}
}
这是我运行时遇到的错误:
bitbake calcurse-dev
您出现的错误来自
| configure.ac:30: error: macro PKG_CHECK_EXISTS is not defined; is a m4 file missing?
| /mnt/secondary/poky/build/tmp/work/cortexa57-poky-linux/calcurse-dev/1.0+git/recipe-sysroot-native/usr/share/aclocal/ax_require_defined.m4:35: AX_REQUIRE_DEFINED is expanded from...
| /mnt/secondary/poky/build/tmp/work/cortexa57-poky-linux/calcurse-dev/1.0+git/recipe-sysroot-native/usr/share/aclocal/ax_with_curses.m4:197: _FIND_CURSES_FLAGS is expanded from...
| ../autoconf-2.72e/lib/m4sugar/m4sh.m4:697: AS_IF is expanded from...
| /mnt/secondary/poky/build/tmp/work/cortexa57-poky-linux/calcurse-dev/1.0+git/recipe-sysroot-native/usr/share/aclocal/ax_with_curses.m4:250: AX_WITH_CURSES is expanded from...
| configure.ac:30: the top level
| autom4te: error: m4 failed with exit status: 1
| aclocal: error: autom4te failed with exit status: 1
| configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
| configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
| configure.ac: that aclocal.m4 is present in the top-level directory,
| configure.ac: and that aclocal.m4 was recently regenerated (using aclocal)
| configure.ac:15: installing './config.guess'
| configure.ac:15: installing './config.sub'
| Makefile.am:7: error: ENABLE_DOCS does not appear in AM_CONDITIONAL
| doc/Makefile.am:3: error: HAVE_ASCIIDOC does not appear in AM_CONDITIONAL
| doc/Makefile.am:10: error: HAVE_A2X does not appear in AM_CONDITIONAL
| doc/Makefile.am:61: error: HAVE_ASCIIDOC does not appear in AM_CONDITIONAL
| doc/Makefile.am:66: error: HAVE_A2X does not appear in AM_CONDITIONAL
| src/Makefile.am: installing './depcomp'
的执行,它们似乎主要是为了反映包装的BitBake汇编环境中缺少所需的组件。
Calcurse的文档给出以下建造依赖关系
GCCAutoconf-Archive Automakeasciidoc
autogen.sh
make dist
configure
autogen.sh
autoreconf