Ubuntu14.04编译Allwinner lichee 两个出错解决方法

1.host-m4-1.4.15

In file includedfrom clean-temp.h:22:0,

from clean-temp.c:23:

./stdio.h:456:1:error: 'gets' undeclared here (not in a function)

_GL_WARN_ON_USE(gets,"gets is a security hole - use fgets instead");

解决方法

参考链接

http://www.civilnet.cn/talk/browse.php?topicno=78555,2楼.

找到:host-m4-1.4.15/lib/stdio.h,然后对stdio.h文件做出如下改动,必要时连同stdio.in.h一起修改

[plain] view plain copy
  1. <spanstyle="font-family:Arial;font-size:12px;">#Beginpatch
  2. ===modifiedfile'grub-core/gnulib/stdio.in.h'
  3. ---grub-core/gnulib/stdio.in.h2010-09-2010:35:33+0000
  4. +++grub-core/gnulib/stdio.in.h2012-07-0415:18:15+0000
  5. @@-140,8+140,10@@
  6. /*Itisveryrarethatthedevelopereverhasfullcontrolofstdin,
  7. soanyuSEOfgetswarrantsanunconditionalwarning.Assumeitis
  8. alwaysdeclared,sinceitisrequiredbyC89.*/
  9. +#ifdefinedgets
  10. #undefgets
  11. _GL_WARN_ON_USE(gets,"getsisasecurityhole-usefgetsinstead");
  12. +#endif



2.host-autoconf-2.65

conftest.c:14625:must be after `@defmac' to use `@defmacx'

make[3]: ***[autoconf.info] Error 1

make[3]: Leavingdirectory`//opt/Android/a23androidSRC/lichee/out/linux/common/buildroot/build/host-autoconf-2.65/doc'

make[2]: ***[install-recursive] Error 1

make[2]: Leavingdirectory`/opt/Android/a23androidSRC/lichee/out/linux/common/buildroot/build/host-autoconf-2.65'

make[1]: ***[install] Error 2

make[1]: Leavingdirectory`/opt/Android/a23androidSRC/lichee/out/linux/common/buildroot/build/host-autoconf-2.65'

make: ***[/opt/Android/a23androidSRC/lichee/out/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed]Error 2

解决方法如下:

参考链接

http://gnu-autoconf.7623.n7.nabble.com/compile-error-conftest-c-14625-must-be-after-defmac-to-use-defmacx-td18843.html

2楼有个补丁文件

[plain] view plain copy
  1. ---autoconf-2.65/doc/autoconf.texi2009-11-0510:42:15.000000000+0800
  2. +++autoconf-2.65/doc/autoconf.texi.new2013-05-2805:41:09.243770263+0800
  3. @@-15,7+15,7@@
  4. @cTheARGisanoptionalargument.Tobeusedformacroargumentsin
  5. @ctheirdocumentation(@defmac).
  6. @macroovar{varname}
  7. -@r{[}@var{\varname\}@r{]}@c
  8. +@r{[}@var{\varname\}@r{]}
  9. @endmacro
  10. @c@dvar(ARG,DEFAULT)
  11. @@-23,7+23,7@@
  12. @cTheARGisanoptionalargument,defaultingtoDEFAULT.Tobeused
  13. @cformacroargumentsintheirdocumentation(@defmac).
  14. @macrodvar{varname,default}
  15. -@r{[}@var{\varname\}=@samp{\default\}@r{]}@c
  16. +@r{[}@var{\varname\}=@samp{\default\}@r{]}
  17. @endmacro
  18. @cHandlingtheindexeswithTexinfoyieldsseveraldifferentproblems.

根据这个补丁文件修改即可,直接修改代码包,下次编译就不会再提示这个错误了。

3.host-makedevs

/opt/Android/a23androidSRC/lichee/out/linux/common/buildroot/build/host-makedevs/makedevs.c:374:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
int ret = EXIT_SUCCESS;
^
cc1: all warnings being treated as errors

直接修改makedevs.c文件

最后一行,return 0;

修改为:return ret;

代码位置:./buildroot/package/makedevs/makedevs.c

相关文章

1.安装过程出现0x00000000指令引用的0x00000000内存该内存不能为written 如果你安装的是inux系统 需要在...
写在全面:如果根据以下教程涉及到只读文件需要更改文件权限才能需修改文件内容,参考我的另一篇博客:...
写在前面:以下步骤中需要在终端输入命令,电脑端查看博客的朋友可以直接复制粘贴到终端,手机端查看的...
ubuntu16.04和18.04更换国内源 写在前面:安装好ubuntu双系统后,默认的软件更新源是国外的,在国内使用...
ubuntu双系统启动时卡死解决办法(在ubuntu16.04和18.04测试无误) 问题描述: 在安装完ubuntu双系统后...
又来造轮子了。。。。。。。。。。。。。。。。 今天使用w3af向文件中写入的时候,发现没有write权限,...