Openwrt编译报错问题

2018-11-22 15:38:52  阅读 6386 次 评论 0 条

打印错误消息

In file included from /usr/include/i386-linux-gnu/sys/syscall.h:31:0,
                 from renameat2.c:29:
renameat2.c: In function 'renameat2':
renameat2.c:81:22: error: '__NR_renameat2' undeclared (first use in this function)
   ret_val = syscall (SYS_renameat2, fd1, src, fd2, dst, flags);
                      ^
renameat2.c:81:22: note: each undeclared identifier is reported only once for each function it appears in
make[7]: *** [renameat2.o] Error 1
make[7]: Leaving directory `/home/user/openwrt/build_dir/host/patch-2.7.6/lib'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/home/user/openwrt/build_dir/host/patch-2.7.6/lib'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/user/openwrt/build_dir/host/patch-2.7.6'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/user/openwrt/build_dir/host/patch-2.7.6'
make[3]: *** [/home/user/openwrt/build_dir/host/patch-2.7.6/.built] Error 2
make[3]: Leaving directory `/home/user/openwrt/tools/patch'
time: tools/patch/compile#13.15#4.29#131.83
make[2]: *** [tools/patch/compile] Error 2
make[2]: Leaving directory `/home/user/openwrt'
make[1]: *** [/home/user/openwrt/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnyy] Error 2
make[1]: Leaving directory `/home/user/openwrt'
make: *** [world] Error 2

百度google了很久没找到方法,无意中看到某位仁兄提到了patch版本,才算是大略明白问题所在了。

执行 patch -v

GNU patch 2.7.1
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall
License GPLv3+: GNU GPL version 3 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 Larry Wall and Paul Eggert

显示系统patch版本为2.7.1,尝试安装2.7.6版本的patch,然而没用。搜了贴子升级系统内核,结果系统搞的神经了,登录界面狂闪。

索性再装个最新版Ubuntu 18.04,也用不了多少时间,装完后patch -v 显示正是2.7.6版本。在此系统下编译一切OK。


本文地址:http://bloguan.com/?id=465
版权声明:本文为原创文章,版权归 博观网 所有,欢迎分享本文,转载请保留出处!

发表评论


表情

还没有留言,还不快点抢沙发?