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. Ulrich --- luatex-beta-0.70.1-orig/source/texk/web2c/luatexdir/luazlib/lzlib.c +++ luatex-beta-0.70.1/source/texk/web2c/luatexdir/luazlib/lzlib.c @@ -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); - lua_error(L); - } - /* create new metatable for zlib compression structures */ luaL_newmetatable(L, ZSTREAMMETA); lua_pushliteral(L, "__index");
On Di, 31 Jul 2012, Ulrich Mueller wrote:
- 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.
Right, .. now that you mention it, we have a patch like that in Debian since long:
So, would it be possible to remove the check for the zlib version? See patch included below.
Not good, why not check only the first three items, that should be fine. In Debian we do since long: @@ -551,7 +551,7 @@ /* make sure header and library version are consistent */ const char* version = zlibVersion(); - if (strncmp(version, ZLIB_VERSION, 5)) + if (strncmp(version, ZLIB_VERSION, 3)) { lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version); lua_error(L); Best wishes Norbert ------------------------------------------------------------------------ Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org} JAIST, Japan TeX Live & Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------ SNITTERFIELD (n.) Office noticeboard on which snitters (q.v.), cards saying 'You don't have to be mad to work here, but if you are it helps !!!' and slightly smutty postcards from Ibiza get pinned up by snitterbies (q.v.) --- Douglas Adams, The Meaning of Liff
On Thu, 2 Aug 2012, Norbert Preining wrote:
- 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.
Right, .. now that you mention it, we have a patch like that in Debian since long:
I know. See https://bugs.gentoo.org/show_bug.cgi?id=310487#c13, and following comments there.
So, would it be possible to remove the check for the zlib version? See patch included below.
Not good, why not check only the first three items, that should be fine. In Debian we do since long:
As I said before, the version is already checked by the dynamic linker (via soname) and by zlib's deflateInit* and inflateInit* functions. There's no need to check it for a third time (and in a manner that is different from that in zlib itself). Ulrich
On Do, 02 Aug 2012, Ulrich Mueller wrote:
As I said before, the version is already checked by the dynamic linker (via soname) and by zlib's deflateInit* and inflateInit* functions. There's no need to check it for a third time (and in a manner that is different from that in zlib itself).
Indeed, sounds reasonable. Besides that as far as I remember (but it might have been some other lib) that changed API without changing soname ... which created quite some problems. Best wishes Norbert ------------------------------------------------------------------------ Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org} JAIST, Japan TeX Live & Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------ CHIPPING ONGAR (n.) The disgust and embarrassment (or 'ongar') felt by an observer in the presence of a person festooned with kirbies (q.v.) when they don't know them well enough to tell them to wipe them off, invariably this 'ongar' is accompanied by an involuntary staccato twitching of the leg (or 'chipping') --- Douglas Adams, The Meaning of Liff
participants (3)
-
Norbert Preining
-
Taco Hoekwater
-
Ulrich Mueller