Apache OpenOffice (AOO) Bugzilla – Issue 105926
nss cannot be built on Linux machines without the zlib-dev package
Last modified: 2009-11-13 14:29:33 UTC
Trying to build module nss on a linux machine which does not have zhe zlib developer package installed fails with the following error: make: *** No rule to make target -lz. Stop. The problem is in mozilla/security/coreconf/Linux.mk (inside the extracted nss sources, i.e. in the module's output tree): USE_SYSTEM_ZLIB = 1 So, NSS is always compiled/linked with system-zlib. For one, this leads to a potentially inconsistent build, since now different libs might be linked against different zlibs: nss agains the one from the system, other libs in OOo against OOo's own version. Second, the build of the nss module fails on systems without a system-zlib. In particular, we encountered this with the Sun-internal Linux build bot. So, nss' makefile should be patched to rely on the system-zlib only when --with-system-zlib is given, and otherwise direct the linker to the zlib used in the rest of OOo.
It seems that only two tools from nss link libz.so. Although the tools are not used and are no part of OOo, this is still a build breaker when using a Linux base line machine.
On linux the system 's libz.so is used when SYSTEM_ZLIB=YES, which is the case when the respective configure switch is set.
@sb: please verify
verified by code inspection
.