用autoconf和configure

问题描述 投票:0回答:1
并决定通过yocto食谱构建它,以便我可以进行一些练习,并且度过了艰难的时光。

我可以在我的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的文档给出以下
建造依赖关系
makefile yocto autoconf
1个回答
0
投票

GCC
Autoconf-Archive

Automake

autopoint

asciidoc
  • 带有开发文件的getText
  • 带开发文件的ncurses
  • 看起来不像您的食谱确保完整的依赖列表(无论是明确或依赖默认值)。
  • 更重要的是,包装文档似乎忽略了一个或多个PKGCONF组件的构建依赖性,您的食谱也无法确保。
  • 作为一个单独但相关的问题,最好是由Autotools Build Systems的软件包是由Autotools Distribution Tarballs构建的,例如可以通过项目
  • autogen.sh
  • 构建。 这些将包括预先构建的
  • make dist
  • 脚本和其他构建的自动自动伪像,这些人工制品旨在用作IS,而不是重建(通过
  • configure

autogen.sh

或类似)。 在您的特殊情况下,使用这样的起点并省略执行

autoreconf

会稍微降低构建依赖列表(如果其中某些DEP是可选的,并且您不得不将它们包括在内),但是看起来这仍然会让您留下一些未划分的deps.


© www.soinside.com 2019 - 2025. All rights reserved.