linux-arm编译报错m4: unrecognized option ‘--gnu‘

在Linux ARM平台上编译libuv时遇到m4报错,问题根源在于m4版本过旧不支持'--gnu'选项。更新m4到1.4.19版本后,./autogen.sh脚本执行成功,后续编译及安装过程无误。

linux-arm编译libuv第一步执行./autogen.sh报错,网上说的是autoconf和automake没有安装。

结论:m4版本比较老,不支持某些新的特性导致执行./autogen.sh报错,更新到1.4.19版本重新执行成功

m4: unrecognized option ‘–gnu’
Try `m4 --help’ for more information.
autom4te: m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

我一开始查看了两个工具版本都是比较新的

automake (GNU automake) 1.14
Copyright © 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl-2.0.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey tromey@redhat.com
and Alexandre Duret-Lutz adl@gnu.org.

autoconf (GNU Autoconf) 2.69
Copyright © 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html, http://gnu.org/licenses/exceptions.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.

但是m4版本是4.9,版本比较老,尝试更新到4.19

m4 (GNU M4) 1.4.9
Copyright © 2007 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Rene’ Seindal.

使用源码编译安装新版本的m4后,执行/autogen.sh脚本成功。

m4 (GNU M4) 1.4.19
Copyright © 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

后续编译和安装没有出现问题。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值