TPService 编译过程

本文讨论了在Ubuntu系统中遇到的无法找到Zlib库的问题,并提供了使用`apt-get install lib32z1-dev`命令来解决该问题的方法。此外,还详细解释了如何在64位Linux版本上编译32位应用程序,以及如何解决编译过程中出现的`undefined reference to shm_open`错误。最后,提供了解决`zconf.h`文件不存在问题的建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


1.

ubuntu  cannot find -lz


I had the exact same error, and like you, installing zlib1g-dev did not fix it. Installing lib32z1-dev got me past it. I have a 64 bit system and it seems like it wanted the 32 bit library.



2.

HowTo Compile a 32-bit Application Using gcc On the 64-bit Linux Version


To fix this problem on a Debian or Ubuntu Linux type the following apt-get command:
$sudo apt-get install g++-multilib libc6-dev-i386

3. 

undefined reference to "shm_open"


-lrt 放在编译选项最后

Move your sourcefiles to the begin of the command and put -lrt after the source files.

G++ can be a little picky about the order (i know why, but i don't feel like explaining it)


并非如下:

FYI: since these are 64-bit ubuntu bots, you need to install
32bit libs for nacl-gcc to run (e.g., to build the IRT). To
do this on the bots, use "install-build-deps.sh --lib32"
which will apt-get ubuntu's "ia32-libs" along with a bunch
of other libraries (see the script).

R=bradnelson@chromium.org


in Ubuntu 13.10 the ia32-libs package is no more present.

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
sudo apt-get install libgl1-mesa-dri:i386

the second, shall install all its dependencies and resolve the compiling problems. The dependencies are:

gcc-4.8-base:i386 libc6:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 
libdrm-radeon1:i386 libdrm2:i386 libelf1:i386 libexpat1:i386 libffi6:i386
libgcc1:i386 libglapi-mesa:i386 libllvm3.3:i386 libpciaccess0:i386 
libstdc++6:i386 libtxc-dxtn-s2tc0:i386 zlib1g:i386

Bye,


4. zconf.hNo such file or directory


Suggested workaround from bugzilla.mozilla org:

sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include

原文:https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/1155307


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值