开发者

android build source errors

i have ubuntu installed on the lenovo s10e netbook. I am not sure if this is related to the issue. I am new to source builds so I would appreciate some direction. I followed instructions on cyanogen's wiki (http://wiki.cyanogenmod.com/index.php/Building_from_source)

I am stuck on the last step of 'Building CyanogenMod' after starting the build process.

$make -j4
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=开发者_Python百科OPENMASTER
============================================
Install: out/host/linux-x86/framework/apicheck.jar
Install: out/host/linux-x86/framework/clearsilver.jar
Install: out/host/linux-x86/framework/droiddoc.jar
host SharedLib: libneo_cgi (out/host/linux-x86/obj/lib/libneo_cgi.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../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/lib/libneo_cgi.so] Error 1


An old question, but in case anybody looks for it, here is what I found: if you are running 64-bit ubuntu, the correct library is lib32z1-dev, so:

sudo apt-get install lib32z1-dev

Should do the trick


"-lz" implies that the compiler is trying to link against some library "libz.{a,so}". I searched the packages.ubuntu.com website to find the package it is located in: zlib1g-dev

Install the package: sudo apt-get install zlib1g-dev

And you should be able to overcome this issue.


I believe the problem is that your operating system is 64-bit and you need a 32-bit libz. Try sudo apt-get install zlib1g-dev.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜