Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android build failure

I followed instructions from here. After $ repo sync I tried to build it with $ make, but got this error:

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 

Using Ubuntu 10.04 LTS. Any help appreciated.

UPD: I found a discussion, that claims, that problem could be that I'm having 64bit libs on my 32bit system.

$ ls -l /usr/lib/libz.so 
lrwxrwxrwx 1 root root 20 2010-07-07 17:08 /usr/lib/libz.so -> /lib/libz.so.1.2.3.3

$ file /lib/libz.so.1.2.3.3
/lib/libz.so.1.2.3.3: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

How do I figure out, if that libz.so.1.2.3.3 is the right lib, and in case I have to replace it with the right one, how do I do it?

Also, $ arch says, I have an i686 architecture. Machine, I'm using is Lenovo ThinkPad SL500 with Core 2 DUO CPU.

like image 283
George Avatar asked Jul 07 '10 16:07

George


People also ask

How fix Gradle build failed?

You can resolve gradle by going C:\Users\(user name path)\. gradle and delete this . gradle file build again and make sure you are connected to internet.

What does Android build mean?

The Android build system compiles app resources and source code, and packages them into APKs or Android App Bundles that you can test, deploy, sign, and distribute.

Why is my Gradle build failing?

Sometimes due to any issue or after formatting of your pc. Some of the Gradle files may get deleted unexpectedly. So when you will start building your apps you will get to see an error in Android studio as 'Error running android: Gradle project sync failed.


1 Answers

Everything works now, the solution was to install lib64z1-dev:

sudo apt-get install lib64z1-dev

Edit: now there's another problem, with ClearSilver, described here and finally resolved here.

like image 54
George Avatar answered Sep 20 '22 01:09

George