您的位置:首页 > 其它

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

2017-02-13 15:33 399 查看
问题1:

-bash: /home/book/a20/CloverLinux/boot/config/gcc-linaro/bin/arm-linux-gnueabi-gcc: 没有那个文件或目录

解决:sudo apt-get install lsb-core

问题2:

arm-linux-gnueabi-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

解决:sudo apt-get install lib32stdc++6

问题3:

"mkimage" command not found - U-Boot images will not be built

解决:sudo apt-get install u-boot-tools

问题4:

arm-linux-gnueabi-gcc: error: directory: No such file or directory

解决:SVN_REV := ""

make[2]: Entering directory `/home/book/a20/CloverLinux/linux-3.4'

  CC [M]  /home/book/a20/CloverLinux/linux-3.4/modules/mali/DX910-SW-99002-r3p2-01rel2/driver/src/devicedrv/ump/common/ump_kernel_common.o
arm-linux-gnueabi-gcc: error: Unversioned: No such file or directory

解决:

将两个文件中的SVN_REV值都赋值为空“”即可。

drivers/gpu/mali/ump/Makefile.common

16 # Get subversion revision number, fall back to 0000 if no svn info is available

17 #SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/

/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')

19 SVN_REV:=""

drivers/gpu/mali/mali/Makefile

117 #SVN_REV := $(shell (cd $(DRIVER_DIR); (svnversion | grep -qv exported && svnversion) || git svn info | grep '^Revision: '| sed -e 's/ ^Revision: //' ) 2>/dev/null )

119 SVN_REV := ""

即可解决以上问题。

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 



<span style="font-family:Arial;font-size:12px;"># Begin patch  
=== modified file 'grub-core/gnulib/stdio.in.h'  
--- grub-core/gnulib/stdio.in.h 2010-09-20 10:35:33 +0000  
+++ grub-core/gnulib/stdio.in.h 2012-07-04 15:18:15 +0000  
@@ -140,8 +140,10 @@  
 /* It is very rare that the developer ever has full control of stdin,  
    so any use of gets warrants an unconditional warning.  Assume it is  
    always declared, since it is required by C89.  */  
+#if defined gets  
 #undef gets  
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");  
+#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

 





--- autoconf-2.65/doc/autoconf.texi 2009-11-05 10:42:15.000000000 +0800  

+++ autoconf-2.65/doc/autoconf.texi.new 2013-05-28 05:41:09.243770263 +0800  

@@ -15,7 +15,7 @@  

 @c The ARG is an optional argument.  To be used for macro arguments in  

 @c their documentation (@defmac).  

 @macro ovar{varname}  

-@r{[}@var{\varname\}@r{]}@c  

+@r{[}@var{\varname\}@r{]}  

 @end macro  

   

 @c @dvar(ARG, DEFAULT)  

@@ -23,7 +23,7 @@  

 @c The ARG is an optional argument, defaulting to DEFAULT.  To be used  

 @c for macro arguments in their documentation (@defmac).  

 @macro dvar{varname, default}  

-@r{[}@var{\varname\} = @samp{\default\}@r{]}@c  

+@r{[}@var{\varname\} = @samp{\default\}@r{]}  

 @end macro  

   

 @c Handling the indexes with Texinfo yields several different problems.  

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

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: