Android 构建失败

发布于 2024-09-08 16:27:59 字数 1418 浏览 2 评论 0原文

我按照此处的说明进行操作。在 $ 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

听风吹 2024-09-15 16:27:59

现在一切正常,解决方案是安装 lib64z1-dev:

sudo apt-get install lib64z1-dev

编辑: 现在还有另一个问题,与 ClearSilver 相关,描述为 这里最终解决了这里

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.

缱倦旧时光 2024-09-15 16:27:59

您需要安装 libz。

sudo apt-get install libz-dev

You need to install libz.

sudo apt-get install libz-dev
篱下浅笙歌 2024-09-15 16:27:59

libz 库在

debian 系统上的不同发行版 lib32z1中有不同的名称

libz library has different name in different distros

lib32z1 on debian system

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文