compiling luatex with --with-system-zlib
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
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 1.3.3.2. So I
changed the code to compare only the first 5 chars:
if (strncmp(version, ZLIB_VERSION, 5))
All this together let me compile 0.10.2 with the system zlib. (BTW: I
have made all the other libs shared linked, too, freetype, fontconfig,
jpeg, etc).
If you have any other suggestion or idea, please let me know. I would
prefer NOT to patch the luatexlib.mk in that way ...
Thanks a lot and all the best
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
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 1.3.3.2. 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. Best wishes, Taco
Hi Taco, On Die, 14 Aug 2007, Taco Hoekwater wrote:
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
I agree, for some time I tried to understand what is going on but gave up soon ...
The main problem is that by default, it *only* configures and builds against a pre-installed zlib. This is extremely bad, as I
Well, this is what we=Debian want ;-).
I really want to have this fixed so that both compile modes work, but I do not know how to achieve that.
That would be great. In the meantime I will revert the hack from luatexlib.mk.
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.
Not completely. I guess the authors are scared that zlib is changing
their API in a weird way and want to be sure that what it was compiled
for is actually used. So that if a distribtution later installs a much
newer zlib there is a big fat warning.
But still, the check is tooooo paranoid, and in fact plain wrong as
written, because in Debian I used the VERY same version for compiling
and running and got an error, because the two ways of checking the
version returned different things.
I guess the check could be good enough when checking only the first 3
chars (major.minor) and NOT including the last .revision, but to be sure
I do it for now with major.minor.revision.
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
Norbert Preining wrote:
The main problem is that by default, it *only* configures and builds against a pre-installed zlib. This is extremely bad, as I
Well, this is what we=Debian want ;-).
I know :-) Perhaps I should just destroy its autoconf support completely. I did that for fontforge, and that worked out reasonably well ...
if (strncmp(version, ZLIB_VERSION, 5))
I guess the check could be good enough when checking only the first 3 chars (major.minor) and NOT including the last .revision, but to be sure I do it for now with major.minor.revision.
Ok, applied that. Best wishes, Taco
participants (2)
-
Norbert Preining
-
Taco Hoekwater