android源码编译错误处理
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
external/clearsilver/cgi/cgi.c:885: error: (Each undeclared identifier is reported only once
external/clearsilver/cgi/cgi.c:885: error: for each function it appears in.)
* external/clearsilver/java-jni/Android.mk
* external/clearsilver/util/Android.mk
* external/clearsilver/cs/Android.mk
把这四个Makefile中的下列语句注掉即可:
external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:888: error: expected expression before ‘)’ token
#$(warning Only 64-bit build environments are supported beyond froyo/2.2.)
#$(warning ************************************************************)
#$(error stop)
本文是我编译过程所遇到的一些问题,然后通过搜索网络解决方法,结实验都能成功,本着从网络受益也回报网络,特整理成文档以便他人少走弯路。
我在编译的过程中遇到下面的错误:
************************************************************
You are attempting to build on a 32-bit system.
make: *** [out/target/common/docs/doc-comment-check-timestamp] Error 45
这是由于clearsilver在编译时如果检测到使用Java JDK 6,就使用64位编译。要避开此错误,需要修改下面四个文件:
* external/clearsilver/cgi/Android.mk
of java.
Your version is: /bin/bash: java:找不到命令.
The correct version is: 1.6.
Please follow the machine setup instructions at
/source/download.html
make: *** [out/host/linux-x86/obj/lib/libneo_util.so] 错误 1
解决方法:
sudo apt-get install g++-multilib
external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: 没有那个文件或目录
external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before ‘stream’
external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared (first use in this function)
host SharedLib: libneo_util (out/host/linux-x86/obj/lib/libneo_util.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
external/clearsilver/cgi/cgi.c:890: error: expected expression before ‘)’ token
external/clearsilver/cgi/cgi.c:892: error: ‘uLong’ undeclared (first use in this function)
target Generated: libclearsilver-jni <= out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jar
host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_util.c
In file included from /usr/include/features.h:378,
from /usr/include/string.h:26,
from external/clearsilver/java-jni/j_neo_util.c:1:
/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: 没有那个文件或目录
external/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:889: error: expected ‘;’ before ‘str’
external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:
external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared (first use in this function)
sudo apt-get install bison libc6-dev-amd64 g++-multilib zlib1g-dev lib64z1-dev flex libncurses5-dev libx11-dev gperf
下面是我遇到的错误及解决方法:
/bin/bash: bison:找不到命令
#ifneq (64,$(findstring 64,$(build_arch)))
#$(warning ************************************************************)
#$(warning You are attempting to build on a 32-bit system.)
make: *** [out/target/common/docs/api-stubs-timestamp] Error 45
make: *** Waiting for unfinished jobs….
Could not load ‘clearsilver-jni’
java.library.path = out/host/linux-x86/lib
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before ‘stream’
external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first use in this function)
************************************************************
build/core/main.mk:114: *** stop。 停止。
解决方法:
sudo apt-get install bx-x86/framework/droiddoc.jar
当编译完成时,生成的image文件放在out/target/product/generic目录中。
刚下好 android 源码后马上编译会发现有各种各样的错误,原因是有些依赖包没有装。
为了避免出现以下我遇到的错误,请先安装 jdk1.5,必须是 jdk1.5,不然肯定编译不过的。
然后,在检查以下有没有安装以下依赖包:
#endif
接下来又遇到下面的错误:
Docs droiddoc: out/target/common/docs/api-stubs
Could not load ‘clearsilver-jni’
java.library.path = out/host/linux-x86/lib
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o] 错误 1
解决方法:
sudo apt-get install libc6-dev-amd64
/2010/07/android-stubs-64/
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
Only 64-bit build environments are supported beyond froyo/2.2.
************************************************************
这是因为在Makefile中检测了CPU的字长。我直接把build/core/main.mk中下面的话注释掉:
# This forces a 64-bit build for Java6
# Comment by Easwy
# LOCAL_CFLAGS += -m64
# LOCAL_LDFLAGS += -m64
然后在external/clearsilver目录中执行一下make clean,然后回到项目根目录,继续 make即可。
external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric constant
external/clearsilver/cgi/cgi.c:885: error: for each function it appears in.)
* external/clearsilver/java-jni/Android.mk
* external/clearsilver/util/Android.mk
* external/clearsilver/cs/Android.mk
把这四个Makefile中的下列语句注掉即可:
external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:888: error: expected expression before ‘)’ token
#$(warning Only 64-bit build environments are supported beyond froyo/2.2.)
#$(warning ************************************************************)
#$(error stop)
本文是我编译过程所遇到的一些问题,然后通过搜索网络解决方法,结实验都能成功,本着从网络受益也回报网络,特整理成文档以便他人少走弯路。
我在编译的过程中遇到下面的错误:
************************************************************
You are attempting to build on a 32-bit system.
make: *** [out/target/common/docs/doc-comment-check-timestamp] Error 45
这是由于clearsilver在编译时如果检测到使用Java JDK 6,就使用64位编译。要避开此错误,需要修改下面四个文件:
* external/clearsilver/cgi/Android.mk
of java.
Your version is: /bin/bash: java:找不到命令.
The correct version is: 1.6.
Please follow the machine setup instructions at
/source/download.html
make: *** [out/host/linux-x86/obj/lib/libneo_util.so] 错误 1
解决方法:
sudo apt-get install g++-multilib
external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: 没有那个文件或目录
external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before ‘stream’
external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared (first use in this function)
host SharedLib: libneo_util (out/host/linux-x86/obj/lib/libneo_util.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
external/clearsilver/cgi/cgi.c:890: error: expected expression before ‘)’ token
external/clearsilver/cgi/cgi.c:892: error: ‘uLong’ undeclared (first use in this function)
target Generated: libclearsilver-jni <= out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jar
host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_util.c
In file included from /usr/include/features.h:378,
from /usr/include/string.h:26,
from external/clearsilver/java-jni/j_neo_util.c:1:
/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: 没有那个文件或目录
external/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:889: error: expected ‘;’ before ‘str’
external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:
external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared (first use in this function)
sudo apt-get install bison libc6-dev-amd64 g++-multilib zlib1g-dev lib64z1-dev flex libncurses5-dev libx11-dev gperf
下面是我遇到的错误及解决方法:
/bin/bash: bison:找不到命令
#ifneq (64,$(findstring 64,$(build_arch)))
#$(warning ************************************************************)
#$(warning You are attempting to build on a 32-bit system.)
make: *** [out/target/common/docs/api-stubs-timestamp] Error 45
make: *** Waiting for unfinished jobs….
Could not load ‘clearsilver-jni’
java.library.path = out/host/linux-x86/lib
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before ‘stream’
external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first use in this function)
************************************************************
build/core/main.mk:114: *** stop。 停止。
解决方法:
sudo apt-get install bx-x86/framework/droiddoc.jar
当编译完成时,生成的image文件放在out/target/product/generic目录中。
刚下好 android 源码后马上编译会发现有各种各样的错误,原因是有些依赖包没有装。
为了避免出现以下我遇到的错误,请先安装 jdk1.5,必须是 jdk1.5,不然肯定编译不过的。
然后,在检查以下有没有安装以下依赖包:
#endif
接下来又遇到下面的错误:
Docs droiddoc: out/target/common/docs/api-stubs
Could not load ‘clearsilver-jni’
java.library.path = out/host/linux-x86/lib
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o] 错误 1
解决方法:
sudo apt-get install libc6-dev-amd64
/2010/07/android-stubs-64/
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
Only 64-bit build environments are supported beyond froyo/2.2.
************************************************************
这是因为在Makefile中检测了CPU的字长。我直接把build/core/main.mk中下面的话注释掉:
# This forces a 64-bit build for Java6
# Comment by Easwy
# LOCAL_CFLAGS += -m64
# LOCAL_LDFLAGS += -m64
然后在external/clearsilver目录中执行一下make clean,然后回到项目根目录,继续 make即可。
external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric constant