[Dev-luatex] zlib version check
ulm at gentoo.org
Tue Jul 31 14:01:39 CEST 2012
Forwarding downstream bug report <https://bugs.gentoo.org/310487>.
LuaTeX does a check if the version of the zlib shared library when
executing agrees with the zlib version used at build time. IMHO, this
check does more harm than good:
- LuaTeX will refuse to run after every minor upgrade of zlib (e.g. if
upgrading from zlib-1.2.6 to zlib-1.2.7) and needs to be rebuild.
- There's no good way for automatic tools to detect this. See the
downstream bug for details.
- The full zlib version is the wrong thing to check. Changes in zlib's
ABI are tracked by its soname (i.e. libz.so.1); the dynamic linker
already takes care that the right version will be used.
- In addition to this, zlib's deflateInit* and inflateInit* functions
contain another version check, which looks at the initial version
component only. So in total, the zlib version is checked at three
different places (each time differently!).
So, would it be possible to remove the check for the zlib version?
See patch included below.
@@ -549,14 +549,6 @@
/* ====================================================================== */
- /* make sure header and library version are consistent */
- const char* version = zlibVersion();
- if (strncmp(version, ZLIB_VERSION, 5))
- lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
/* create new metatable for zlib compression structures */
More information about the dev-luatex