码迷,mamicode.com
首页 > 移动开发 > 详细

Android 编译错误/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../

时间:2014-11-25 23:33:00      阅读:639      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   io   ar   color   os   使用   

编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz错误 ============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv5te
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.a when searching for -lz
/usr/bin/ld: skipping incompatible //usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible //usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
缺少lib32z1-dev,安装即可:apt-get install lib32z1-dev 

 

引用

0123 的 [android]编译时出现 /usr/include/gnu/stubs.h:7: fatal error: gnu/stubs-32.h: No such file or directory 错误信息 
编译时出现 /usr/include/gnu/stubs.h:7: fatal error: gnu/stubs-32.h: No such file or directory 错误信息 ============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv5te
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
host C: acp <= build/tools/acp/acp.c
In file included from /usr/include/features.h:387,
                 from /usr/include/stdlib.h:25,
                 from build/tools/acp/acp.c:11:
/usr/include/gnu/stubs.h:7: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
缺少libc开发包,安装即可: apt-get install libc6-dev-i386 

 

引用

0123 的 [android]初始化代码仓库时出现“OSError: [Errno 2] No such file or directory”错误 
OSError: [Errno 2] No such file or directoryroot@shanmin-ubuntu:/home/android/src# ../repo init -u git://android.git.kernel.org/platform/manifest.git 
Traceback (most recent call last):
  File "../repo", line 595, in <module>
    main(sys.argv[1:])
  File "../repo", line 562, in main
    _Init(args)
  File "../repo", line 181, in _Init
    _CheckGitVersion()
  File "../repo", line 210, in _CheckGitVersion
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
这是由于没有安装git造成的,安装上git就可以了。按说程序里面应该判断一下系统是否安装了git,不知道为什么没有判断。
apt-get install git
 

 

引用

0123 的 太不容易了,终于看到自己编译的Android了 

 可能是我使用的机器比较慢,虚拟机运行的有些慢啊。。。。

bubuko.com,布布扣
下一步开始研究这个系统怎样去定制了....
 

引用

0123 的 编译Android,遇到Your version is: /bin/bash: java: command not found.错误的解决 
Your version is: /bin/bash: java: command not found. ============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
/bin/bash: bison: command not found
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.

Your version is: /bin/bash: java: command not found.
The correct version is: 1.6.

Please follow the machine setup instructions at
    http://source.android.com/source/download.html 
************************************************************
build/core/main.mk:114: *** stop.  Stop.

这是由于没有装jdk导致的,可以到sun.com下载jdk后安装,建议安装到/usr/lib /jvm目录下,例如我下载的安装文件为 jdk-6u21-linux-i586.bin,安装完后生成一个jdk1.6.0_21的目录,然后使用ln -s jdk1.6.0_21 java-6-sun命令做一个链接,这样以后再升级sun jdk时只需要改动一下链接就可以了。

引用

0123 的 编译Android,遇到Could not load ‘clearsilver-jni‘错误的解决 

 

Could not load ‘clearsilver-jni‘===========================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
Docs droiddoc: out/target/common/docs/api-stubs
Could not load ‘clearsilver-jni‘
java.library.path = out/host/linux-x86/lib
make: *** [out/target/common/docs/api-stubs-timestamp] Error 45

从网上查得的解决办法:
make clean
make update-api (经测试,这个可以不需要)
make
参考网址:http://www.eoeandroid.com/thread-25900-1-1.html
 

引用

0123 的 Android编译环境中的JDK存放位置 

因为Ubuntu 10.04已经不带有SUN JDK,所以这个需要到sun网站上下载,并手动安装。所以,这个安装位置的问题就出现了。开始的时候没有注意,随便找了一个位置,并且设置了 JAVA_HOME就可以正常使用了。后来查看build/envsetup.sh才发现,如果没有设置JAVA_HOME的时候,编译环境会自动设置为 /usr/lib/jvm/java-6-sun ,所以建议直接安装到这个目录,还省得进行设置。

引用

0123 的 杯具了,VMware虚拟盘文件出现错误... 

 晕死了,不说别的,就下载Android的源代码就得差不多一天啊......

bubuko.com,布布扣
似乎昨晚关机的时候强关的机器,没想到会影响这么大。。。。。
 

引用

0123 的Android编译遇到错误/usr/bin/ld: cannot find -lstdc++的解决 

 首先发现编译2.2版,gcc4.3和gcc4.4没有什么区别。

/usr/bin/ld: cannot find -lstdc++

============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================

 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.3.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++ 
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libneo_util.so] 错误 1

缺少g++-multilib库,安装即可: apt-get install g++-multilib   

    

引用

0123 的android编译遇到错误 

 环境: vmware + ubuntu 10.04

使用gcc 4.3或gcc 4.4都会出错误信息:

 

 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.3.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libneo_util.so] 错误 1

现在不知道怎么解决,按照http://www.ways2u.com/?post=163 写的使用gcc 4.3就不会有这个问题,但我这边还是出现这个错误。。。。

 

引用

0123android编译环境

android所有源代码在 http://android.git.kernel.org/

如果在Windows下只能使用git一个项目一个项目的下载,如果在linux可以直接使用repo下载全部代码

linux下的全部下载方式见 http://source.android.com/source/git-repo.html

 

按照 http://www.ways2u.com/?post=163 说的,必须安装gcc 4.3才可以,例如我用的ubuntu 10.04默认装的是4.4,编译就会出错。

 

在装完Eclipse & SDK后,编译Android需要安装部分软件:

apt-get install bison

apt-get install g++

apt-get install libc6-dev-amd64

到源代码目录执行

make

即可

 

引用

0123搭建android开发环境 (2010-07-06) 
0123搭建android开发环境 (2010-07-05)

 在Ubuntu下安装ADT时如果出现如下错误:

requires ‘org.eclipse.gef 0.0.0‘ but it could not be found.

bubuko.com,布布扣
 
bubuko.com,布布扣
 

则需要安装Extensible Tool Platform and Java IDE软件包

bubuko.com,布布扣
 

引用

0123搭建android开发环境

在 http://www.android123.com.cn/ 得知android.com网站可以通过http://androidappdocs-staging.appspot.com 访问。这样就可以防止和谐了。

android开发环境

  1. http://www.eclipse.org/downloads/ 下载Eclipse,我下载的是 Eclipse Classic 3.6.0
  2. 运行eclipse,进入 Help -> Install New Software , 从https://dl-ssl.google.com/android/eclipse 下载 Android Developer Tools
    bubuko.com,布布扣
  3. http://androidappdocs-staging.appspot.com/sdk/index.html 下载Android SDK,我下的是android-sdk_r06-windows.zip
  4. 运行下载的android SDK,选择要下载的SDK版本文件进行安装,这里至少要安装一个SDK Platform,版本可根据自己的需要选择。
    bubuko.com,布布扣
  5. 设置eclipse与android SDK的关联,从Windows -> Perferences,选择Android项
    bubuko.com,布布扣
     设置路径为存放android sdk的路径。
  6. 创建Android工程。File -> New -> Project,选择Android->Android Project
    bubuko.com,布布扣
  7. Next
    bubuko.com,布布扣
     
     

 

引用

0123http://developer.android.com/ 不能访问?
这几天想看看android系统,发现http://developer.android.com/ 还是不能正常访问。哎~~~还得找代理服务器,多麻烦啊,何必呢....

Android 编译错误/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../

标签:android   style   blog   http   io   ar   color   os   使用   

原文地址:http://blog.csdn.net/wjw0130/article/details/41494523

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!