在对libxml进行模糊测试时,需要先将其拉去并进行编译,可参考此链接:magma本地编译
或者直接参考这个链接:magma编译libxml2
然而在编译的过程中,拉去完libxml2执行到这一句时报错如下:
configure.ac:42: error: require Automake 1.16.3, but have 1.15
autoreconf: automake failed with exit status: 1 configure: error:
cannot find install-sh, install.sh, or shtool in “.” “./…” “./…/…”Configure script failed, check config.log for more info.
它的原因时automake需要的版本时1.16.3,而本地的是1.15,因此我们先下载一个automake,参考此链接:下载automake
执行过程如下:
wget https://ftp.gnu.org/gnu/automake/automake-1.16.3.tar.gz
tar -zxvf automake-1.16.3.tar.gz
cd automake-1.16.3
./configure
make
make install
接下来使用命令automake --version 查看automake的版本可以发现已经是1.16.3了。
接下来继续执行autogen命令报错如下:
./autogen.sh --with-http=no --with-python=no --with-lzma=yes --with-threads=no --disable-shared
libtoolize: putting auxiliary files in ‘.’.
libtoolize: copying file ‘./ltmain.sh’
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, ‘m4’.
libtoolize: copying file ‘m4/libtool.m4’
libtoolize: copying file ‘m4/ltoptions.m4’
libtoolize: copying file ‘m4/ltsugar.m4’
libtoolize: copying file ‘m4/ltversion.m4’
libtoolize: copying file ‘m4/lt~obsolete.m4’
configure.ac:1072: error: possibly undefined macro: m4_ifdef
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1Couldn’t find pkg.m4 from pkg-config. Install the appropriate package
for your distribution or set ACLOCAL_PATH to the directory containing
pkg.m4.
这个报错是找不到pkg.m4文件,可以参考此链接:报错“configure.ac: error: possibly undefined macro“的解决方案
这个问题是因为大多数.m4文件都在/usr/share/aclocal/目录下,但实际上configure的默认aclocal路径为/usr/local/share/aclocal,
那么可以有两种方法,
第一,将/usr/share/aclocal/下的*.m4文件都拷贝到usr/local/share/aclocal/目录下;
第二,指定aclocal的安装路径;
cp /usr/share/aclocal/*.m4 /usr/local/share/aclocal/
再次./autogen.sh,就通过了。
接下来再执行这条命令可以看到结果如下:
./autogen.sh --with-http=no --with-python=no --with-lzma=yes --with-threads=no --disable-shared
结束!!!