gpt4 book ai didi

c - autoreconf 失败并显示 "possibly undefined macro: AM_PATH_GLIB_2_0"

转载 作者:行者123 更新时间:2023-12-05 02:57:42 32 4
gpt4 key购买 nike

修改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 工具版本的问题,还是其他原因?

谢谢。

最佳答案

我在 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

解决了问题

关于c - autoreconf 失败并显示 "possibly undefined macro: AM_PATH_GLIB_2_0",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59669302/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com