您的位置:首页 > 其它

[libtool] autogen时AM_PATH_GLIB_2_0错误的处理

2016-06-08 11:33 405 查看
错误提示: macro 'AM_PATH_GLIB_2_0' not found in library

说明对应的定义没有找到,

而对应包已安装

#rpm -qa|grep glib2

glib2-devel-2.22.5-6.1.el6.x86_64

glib2-2.22.5-6.1.el6.x86_64

说明定义文件.m4没包含在autoconf的路径中,查看autogen:

#cat autogen

#! /bin/sh

# cd to the directory we're run from

cd `dirname $0`

# if you change this, please also change it in the root Makefile.am

includes="-I . -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive"

# clean up

rm -f aclocal.m4

rm -rf autom4te*.cache

rm -f configure

die() {

    echo x"${@}" | sed 's/^x//'

    exit 1

}

echo "See DEVELOPING for instructions on updating:"

echo " * gettext macros"

echo " * gnulib"

echo " * libtool files"

echo "..creating file lists"

(   cd config

    for m4dir in amanda gettext-macros gnulib macro-archive; do

        echo "## this file is automatically generated by autogen" > "$m4dir/file-list"

        for f in $m4dir/*.m4; do echo "EXTRA_DIST += $f" >> "$m4dir/file-list"; done

    done

    echo "## this file is automatically generated by autogen" > "automake/file-list"

    for f in automake/*.am; do echo "EXTRA_DIST += $f" >> "automake/file-list"; done

)

echo "..aclocal"

aclocal $includes || die "aclocal failed"

echo "...aclocal patches"

# See http://bugzilla.gnome.org/show_bug.cgi?id=418778
#

# The Glib developers are a bit over-eager in their version requirements, requiring

# an unnecessarily high verison of pkg-config at configure time, when they really

# only need it at autogen time.  This patch resets the version number in the file

# just generated by aclocal to the version we've been requiring all along.

sed --in-place -e  \

     's/PKG_PROG_PKG_CONFIG(\[0\.16\])/PKG_PROG_PKG_CONFIG([0.7])/g' \

     aclocal.m4

echo "..autoconf"

autoconf || die "autoconf failed"

echo "..autoheader"

autoheader || die "autoheader failed"

touch config/config.h.in

echo "..automake"

automake --force --copy --warnings=none || die "automake failed"

解决方法,找到.m4文件,加入环境变量

#rpm -ql glib2-devel |grep m4

/usr/share/aclocal/glib-2.0.m4

/usr/share/aclocal/glib-gettext.m4

export ACLOCAL_PATH=/usr/share/aclocal

重编译。

[root@dev /root/rpmbuild/BUILD/amanda-2.6.1p2]

#./autogen

See DEVELOPING for instructions on updating:

 * gettext macros

 * gnulib

 * libtool files

..creating file lists

..aclocal

aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'

config/amanda/libs.m4:120: warning: macro 'AM_PATH_GLIB_2_0' not found in library

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached

../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from...

../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from...

config/libtool.m4:640: AC_LIBTOOL_LINKER_OPTION is expanded from...

config/libtool.m4:2559: _LT_AC_LANG_C_CONFIG is expanded from...

config/libtool.m4:2558: AC_LIBTOOL_LANG_C_CONFIG is expanded from...

config/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from...

config/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from...

config/libtool.m4:25: AC_PROG_LIBTOOL is expanded from...

config/libtool.m4:6132: AM_PROG_LIBTOOL is expanded from...

configure.in:183: the top level

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:595: AC_LIBTOOL_COMPILER_OPTION is expanded from...

config/libtool.m4:4695: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:2671: _LT_AC_LANG_CXX_CONFIG is expanded from...

config/libtool.m4:2670: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...

config/libtool.m4:1709: _LT_AC_TAGCONFIG is expanded from...

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_F77, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:3785: _LT_AC_LANG_F77_CONFIG is expanded from...

config/libtool.m4:3784: AC_LIBTOOL_LANG_F77_CONFIG is expanded from...

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_GCJ, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:3891: _LT_AC_LANG_GCJ_CONFIG is expanded from...

config/libtool.m4:3890: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...

...aclocal patches

..autoconf

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached

../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from...

../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from...

config/libtool.m4:640: AC_LIBTOOL_LINKER_OPTION is expanded from...

config/libtool.m4:2559: _LT_AC_LANG_C_CONFIG is expanded from...

config/libtool.m4:2558: AC_LIBTOOL_LANG_C_CONFIG is expanded from...

config/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from...

config/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from...

config/libtool.m4:25: AC_PROG_LIBTOOL is expanded from...

config/libtool.m4:6132: AM_PROG_LIBTOOL is expanded from...

configure.in:183: the top level

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:595: AC_LIBTOOL_COMPILER_OPTION is expanded from...

config/libtool.m4:4695: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:2671: _LT_AC_LANG_CXX_CONFIG is expanded from...

config/libtool.m4:2670: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...

config/libtool.m4:1709: _LT_AC_TAGCONFIG is expanded from...

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_F77, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:3785: _LT_AC_LANG_F77_CONFIG is expanded from...

config/libtool.m4:3784: AC_LIBTOOL_LANG_F77_CONFIG is expanded from...

configure.in:183: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_GCJ, ...): suspicious cache-id, must contain _cv_ to be cached

config/libtool.m4:3891: _LT_AC_LANG_GCJ_CONFIG is expanded from...

config/libtool.m4:3890: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...

configure:39615: 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:39616: error: possibly undefined macro: AC_MSG_ERROR

autoconf failed
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  autoconf libtool m4