# /opt/dev/android-sdk/platforms/android-1.5/tools/aapt
/opt/dev/android-sdk/platforms/android-1.5/tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
On an i386 box this aapt launches, but not on amd64. /lib/libz.so.1 is there in both cases. How come?
It looks like the SDK aapt tool is a 32-bit binary, so it's looking for the 32-bit version of the libz library but only finding the 64-bit. You can check this with
ldd
. I believe if you install the emul-linux-x86-baselibs package it will give you the correct library in/usr/lib32
.I've looked at dev-util/android-sdk and turns out it's pulling app-emulation/emul-linux-x86-gtklibs as a dependency.
Just try: # emerge emul-linux-x86-baselibs, it will provide the 32bit libz.so.1 ... if this fails try ldd /path/to/aapt and provide the output, as well as the output of your ldconfig -v | grep libz
the bug is indeed in emul-linux's 32bit libz.so.1.2.3 !!
i just built a 32bit libz version myself and it works - aapt does not throw the above error. if you are using gentoo - all libz versions of emul-linux-x86-baselibs have this problem (currently 20100915-r1 and 20110129)
here are the steps you need until an updated version of emul-linux-baselibs is out:
The Problem is, that while the 64bit version you compile yourself has the following fields in the ELF header:
the 32bit version provided by current emul-linux-x86-baselibs lacks the VERDEF field, it contains only
you can check yourself whether your custom build of 32bit lib has the VERDEF field - mine does and I wonder why it is missing in the emul-linux distribution..
regards, cmuelle8
ps: sometimes the error messages printed by computer programs is right..