[Dev-luatex] compiling luatex with --with-system-zlib
taco at elvenkind.com
Tue Aug 14 14:45:45 CEST 2007
Norbert Preining wrote:
> Hi Taco,
> I am trying to compile luatex with --with-system-zlib (in Debian we have
> to do this). But the latest changes (from 0.10.1 to 0.10.2) in
> luatexlib.mk seemed to have messed this up. I get a nice error:
> cd ../../libs/zziplib/zzip && \
> make CC='gcc' CFLAGS='-g -O2 ' LDFLAGS='' libzzip.la
> cp: cannot stat `../../libs/zlib/*.a': No such file or directory
> make: *** [../../libs/zziplib/zzip/.libs/libzzip.a] Error 1
zziplib's build system is the most unflexible bit of nonsense
I have seen in a very long time, and I do not know enough of
autofoo to fix it.
The main problem is that by default, it *only* configures and
builds against a pre-installed zlib. This is extremely bad, as I
link zlib statically in luatex. As a way around that, I now
create a dummy installation of zlib inside the build tree, but
of course that only works if zlib is actually built, sorry.
I really want to have this fixed so that both compile modes
work, but I do not know how to achieve that.
> I reverted luatexlib.mk to (quasi) 0.10.1 (some make -> $(MAKE)
> replacements I left) and it again compiles.
> Interestingly, with --with-system-zlib, I also had to add another patch
> because zzlib or whoever is very picky about the version string:
> (in luazlib/lzlib.c)
> if (strcmp(version, ZLIB_VERSION))
> then bail out
> but zlibVersion is (here) 1.3.3, while ZLIB_VERSION is 188.8.131.52. So I
> changed the code to compare only the first 5 chars:
> if (strncmp(version, ZLIB_VERSION, 5))
This I could patch, but it may even be better to remove the check
completely. As it stands, it will require the runtime zlib to have
the same version as compile-time zlib, thereby defeating the point
of --with-system completely.
More information about the dev-luatex