【问题标题】:Autorreconf and "error: possibly undefined macro: AM_NLS"Autorreconf 和“错误:可能未定义的宏:AM_NLS”
【发布时间】:2018-11-27 06:04:45
【问题描述】:

我正在尝试为systemd 生成一个configure 脚本。

$ git clone https://github.com/systemd/systemd.git
$ cd systemd

$ autoreconf -i
configure.ac:74: warning: macro 'AM_NLS' not found in library
configure.ac:74: error: possibly undefined macro: AM_NLS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

我在一个相当现代的机器上,它已经完全打了补丁。它的 Fedora 25、x86_64:

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description:    Fedora release 25 (Twenty Five)
Release:        25
Codename:       TwentyFive

我不是 Autotools 专家,搜索 "error: possible undefined macro: AM_NLS" 并没有返回对我有用的结果。我找到了Linphone configuration results in multiple undefined Autotools macros,但并不完全清楚我应该做什么。 Unix & Linux Stack Exchange 有 Some M4 macros don't seem to be defined,但仍然不清楚我应该为这个问题做些什么。

问题是什么,我该如何解决?

【问题讨论】:

    标签: autotools configure fedora-25


    【解决方案1】:

    有什么问题,我该如何解决?

    问题是它期待GNU gettext,特别是在Fedora 25 gettext-devel。它位于该包中的/usr/share/aclocal/nls.m4 中。您应该能够安装该软件包并进行构建。

    【讨论】:

    • 非常感谢。谁提出了这些难以理解的错误信息? Autotools 工程过程中有什么问题无法完成,“请安装 gettext 或确保它在路径上”
    • AM_NLS 不是 automake 的一部分,因此他们无法直观了解需要安装的内容。也许运行 autogen.sh 也会为您提供更多信息,因为该脚本会引导构建。
    • 可能值得一提的是apt-file 在这种情况下非常有用。特别是如果您能够猜到您可能需要一个名为nls.m4 的文件。例如。 apt-file find nls.m4 将为您提供 gettextgnulib 作为该文件的可能来源。
    • 值得一提的是,apt-file 对 Fedora 没有帮助。但是dnf provides '*nls.m4' 可能会有所帮助。 IIRC,我在解码错误后搜索了rpmfind.net或类似的包。
    猜你喜欢
    • 2015-04-18
    • 1970-01-01
    • 1970-01-01
    • 2014-04-19
    • 1970-01-01
    • 2019-05-07
    • 2012-02-07
    • 1970-01-01
    相关资源
    最近更新 更多