AOSP master (post 2.2) build fail on Ubuntu 10.04 due to incompatible libz

61 views
Skip to first unread message

Yichuan

unread,
Jul 5, 2010, 9:47:51 PM7/5/10
to Android Building

0. repo init
1. repo sync
2. . build/envsetup.sh
3. m


Build output:
-------------------------------------------------------------------
target thumb C++: librs_jni <= frameworks/base/graphics/jni/
android_renderscript_RenderScript.cpp
Install: out/host/linux-x86/bin/acp
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
make: *** Waiting for unfinished jobs....
In file included from frameworks/base/graphics/jni/
android_renderscript_RenderScript.cpp:37:
dalvik/libnativehelper/include/nativehelper/jni.h:489: note: the
mangling of 'va_list' has changed in GCC 4.4
make: Leaving directory `/home/yichuan/android'
-------------------------------------------------------------------

Ted Chien

unread,
Jul 8, 2010, 12:00:13 AM7/8/10
to android-...@googlegroups.com
between 2 and 3 you need to do "lunch".

Ted


在 2010/7/6 上午9:47 時, Yichuan 寫到:

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Bharathi Subramanian

unread,
Jul 9, 2010, 10:08:00 PM7/9/10
to android-...@googlegroups.com
On Tue, Jul 6, 2010 at 9:47 AM, Yichuan <yichu...@gmail.com> wrote:
> /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

Loks like LibZip is missing in your system. To build android, you need
to download few additional tools/packages, please check the "setting
up your machine" section in the link:
http://source.android.com/source/download.html

--
Bharathi Subramanian

Mor

unread,
Jul 13, 2010, 2:28:38 AM7/13/10
to Android Building
Hi,

I'm having the exact same issue building AOSP on Ubuntu 10.04 and I
did the "lunch" part.
it seems like the link process is looking for an ARM compiled libz
shared library and that's why it does not like what we have at /usr/
lib/libz.so

there is a libz.so somewhere in the NDK part of the tree but I can't
make it search there.

any ideas?

Austin, Brian

unread,
Jul 13, 2010, 1:42:57 PM7/13/10
to android-...@googlegroups.com
It has to do with 32bit and 64bit systems. Android is forcing 64bit builds, and if you are on a 32bit system, you are going to get these errors.

There is a patch that forces 64bit builds if using Java6 on 32bit systems.

+# This forces a 64-bit build for Java6
+ifneq ($(filter 1.6%,$(java_version)),)
+ LOCAL_CFLAGS += -m64
+ LOCAL_LDFLAGS += -m64
+endif

Comment these lines out wherever you see them in the .mk files and you will be OK.

Brian

Reply all
Reply to author
Forward
0 new messages