[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Version check in luazlib very strict



Dear Hilmar,

I believe that check was included to ensure binary compatibility, but I can't remember the exact reason why the check was so strict, or if I read somewhere it should be enforced like that.

I can release a new version so it doesn't check the minor version. But as a workaround it could also be compiled statically.

Since lzlib only uses the public api, can you guarantee it is binary compatible?

And if you don't mind me asking, since I hardly get any feedback on the subject, does luatex use lzlib extensively or is the main purpose to be used by luatex users?

If it is luatex that uses the module, I had released an experimental version that included support for compressed streams (if I can call it that), but I was too unsure about the api that was provided, and never had any (real) feedback on it. Also some functions were changed or removed in that release (house cleaning).

Would you mind trying that version and see if it helps, or at least luatex doesn't break?

Regards,
Tiago

PS: it has been a long time since I touched lzlib, but will try to take a look into it tomorrow


On Sat, Jun 19, 2010 at 2:51 PM, Hilmar Preusse <hille42@web.de> wrote:
Dear Tiago,

as far as I can see, you're the author of "lzlib - Lua 5 interface to
access zlib library functions", which is used by luatex. The file
lzlib.c contains the following code to check the installed zlib
version:

   /* 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, li
       lua_error(L);
   }

The version check is very strict, it checks even the minor version of
the zlib. This causes a disfunction in luatex in case people upgrade
their zlib version (see http://bugs.debian.org/581818 and friends).

Is there a specific reason why the check is that strict? Do you
think it is possible to untighten it and check only the major version
of the zlib (i.e. turn the 5 above into a 3)?

Many thanks,
 Hilmar
--
sigmentation fault


Reply to: