Android 构建失败
我按照此处的说明进行操作。在 $ reposync
之后,我尝试使用 $ make
构建它,但收到此错误:
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
使用 Ubuntu 10.04 LTS。任何帮助表示赞赏。
UPD:我发现了一个讨论,声称该问题可能是我的 32 位系统上有 64 位库。
$ 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
我如何判断 libz.so.1.2.3.3 是否是正确的库,如果我必须用正确的库替换它,我该怎么做?
另外,$ arch
表示,我有一个 i686 架构。我使用的机器是 Lenovo ThinkPad SL500,配备 Core 2 DUO CPU。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
现在一切正常,解决方案是安装 lib64z1-dev:
编辑: 现在还有另一个问题,与 ClearSilver 相关,描述为 这里并最终解决了这里。
Everything works now, the solution was to install lib64z1-dev:
Edit: now there's another problem, with ClearSilver, described here and finally resolved here.
您需要安装 libz。
You need to install libz.
libz 库在
debian 系统上的不同发行版
lib32z1
中有不同的名称libz library has different name in different distros
lib32z1
on debian system