【问题标题】:autoreconf fails with "possibly undefined macro: AM_PATH_GLIB_2_0"autoreconf 因“可能未定义的宏:AM_PATH_GLIB_2_0”而失败
【发布时间】:2020-04-27 08:57:28
【问题描述】:

在修改this source code 时,我从autoreconf 收到此错误:

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

configure.ac 中的行是:

AM_PATH_GLIB_2_0([2.7.1], [ac_glib_test="yes"], [ac_glib_test="no"], [gthread])

这是我使用的 autoconf/automake 工具的版本问题,还是其他问题?

谢谢。

【问题讨论】:

  • 你需要安装glib开发包

标签: c autoconf automake slurm autoreconf


【解决方案1】:

我在 Centos8 上做了以下操作:

sudo find /usr /opt -name "*.m4" -exec grep -H AM_PATH_GLIB_2_0 {} \;

查找包含 glib-2.0.m4 的目录

/usr/share/aclocal/glib-2.0.m4:dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])

发行

export ACLOCAL_PATH=/usr/share/aclocal

解决了问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-08
    • 1970-01-01
    • 2020-02-08
    • 2017-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    相关资源
    最近更新 更多