安装gcc问题总结

在AIX系统上编译GCC时遇到`makeinfo`缺失的问题,导致编译错误。解决方法是安装Texinfo软件,从GNU档案站点下载并安装。在安装后,需要修改GCC源码中的configure文件,扩展支持4.11版本的Texinfo,通过修改正则表达式使GCC编译成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

编译了一段时间后出错,其错误信息如下:

WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [fastjar.info] 错误 1
make[3]:正在离开目录 `/home/wyt/gcc-obj/fastjar'
make[2]: *** [all] 错误 2
make[2]:正在离开目录 `/home/wyt/gcc-obj/fastjar'
make[1]: *** [all-fastjar] 错误 2
make[1]:正在离开目录 `/home/wyt/gcc-obj'
make: *** [all] 错误 2


从此信息当中发现需要安装 Texinfo 软件,如是就下载了一个:

wget  http://ftp.gnu.org/gnu/texinfo/texinfo-4.12.tar.gz

安装后,修改gcc下的configure文件

以下语句

# For an installed makeinfo, we require it to be from texinfo 4.12 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1;then
:
else
MAKEINFO="$MISSING makeinfo"
fi
;;

其中4\.[2-9]|[5-9]表示的是支持4.1-4.9之间的几个版本,所以需要自己添加4\.[1-9][0-9]*,以支持4.11版本。即把'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])'编辑成'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]*|[5-9])'后保存,编译通过。





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值