After updating to sys-libs/zlib-1.2.4, texlive stops working with error PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.3, library: 1.2.4) Reproducible: Always Steps to Reproduce: 1. $ texexec 2. PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.3, library: 1.2.4) Actual Results: PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.3, library: 1.2.4) Expected Results: texexec runs normally
I tried this. Only had texlive-core installed, and was not able to build texlive-basic before re-installing luatex (because of zlib upgade). Then, texlive-context for texexec. $ texexec MTXrun | kpse fallback with progname 'context' initialized in 0.01 seconds TeXExec | version 6.2.1 - 1997-2009 - PRAGMA ADE/POD And it's working. So, I suspect you need to rebuild something, such as luatex. Also make sure you don't have local copy of zlib.h or zconf.h in e.g. /usr/local installed by some 3rd party application.
You are right, after rebuilding luatex it works. Thank you!
*** Bug 405563 has been marked as a duplicate of this bug. ***
Created attachment 307627 [details] build.log
I just hit the same issue. Is it possible to automate rebuilding this somehow?
Reopening and reassigning to maintainer, since this nasty problem is reappearing after every zlib update. PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.6, library: 1.2.7) Either luatex should link explicitly against libz.so.1.2.7, so that the issue can be picked up by revdep-rebuild. Or (IMHO preferably) the check for the library's version should be removed. After all, if the SONAME is the same (i.e. libz.so.1), then the library's ABI should be unchanged.
*** Bug 421751 has been marked as a duplicate of this bug. ***
*** Bug 428374 has been marked as a duplicate of this bug. ***
(In reply to comment #6) > Reopening and reassigning to maintainer, since this nasty problem is > reappearing after every zlib update. > > PANIC: unprotected error in call to Lua API (zlib library version does not > match - header: 1.2.6, library: 1.2.7) > > Either luatex should link explicitly against libz.so.1.2.7, so that the > issue can be picked up by revdep-rebuild. Or (IMHO preferably) the check for > the library's version should be removed. After all, if the SONAME is the > same (i.e. libz.so.1), then the library's ABI should be unchanged. have you tried to contact upstream and/or write a patch for this ? :)
Created attachment 319734 [details, diff] Patch removing the obnoxious zlib version check I've tested building luatex with attached patch and zlib-1.2.6. I see no apparent problems when running it, after I had upgraded zlib to 1.2.7.
(In reply to comment #10) > Created attachment 319734 [details, diff] [details, diff] > Patch removing the obnoxious zlib version check > > I've tested building luatex with attached patch and zlib-1.2.6. > I see no apparent problems when running it, after I had upgraded zlib to > 1.2.7. sounds good to me, but have you tried to ask upstream as of why they wrote that check?
hmm, found this too: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581818 will attach debian patch
Created attachment 319912 [details, diff] debian patch
I've reported the issue to the dev-luatex@ntg.nl mailing list where my posting is awaiting maintainer approval. So quoting it here for reference: ╓──── ║ 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. ╙──── (In reply to comment #13) > Created attachment 319912 [details, diff] [details, diff] > debian patch I think that the Debian patch misses the point. There's no need for another version check in LuaTeX, in addition to soname and the one in zlib. It should be dropped altogether, for the reasons stated above.
Upstream report is here: <http://www.ntg.nl/pipermail/dev-luatex/2012-July/004534.html>
I first thought the debian patch was less radical, but you convinced me. Thanks, your patch is now applied to -r1 -> fixed.