Bug 1216650 - libz upgrade breaks texlive-latex-bin-bin / lualatex (library version does not match)
Summary: libz upgrade breaks texlive-latex-bin-bin / lualatex (library version does no...
Status: RESOLVED FIXED
: 1216678 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Danilo Spinella
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-27 09:48 UTC by Marco Huenseler
Modified: 2024-02-22 08:28 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Huenseler 2023-10-27 09:48:32 UTC
I did a 'zypper dup' yesterday and noticed that I couldn't compile any LaTeX documents using LuaLaTeX any longer:

% lualatex beamer5.tex
PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.13, library: 1.3)
[1]    7239 IOT instruction (core dumped)  lualatex beamer5.tex

And indeed zlib was updated recently:
% LC_ALL=C rpm -qi libz1
Name        : libz1
Version     : 1.3
Release     : 1.1
Architecture: x86_64
Install Date: Thu Oct 26 22:00:15 2023
Group       : Unspecified
Size        : 118944
License     : Zlib
Signature   : RSA/SHA512, Wed Oct 25 18:06:26 2023, Key ID 35a2f86e29b700a4
Source RPM  : zlib-1.3-1.1.src.rpm
Build Date  : Wed Oct 25 18:06:09 2023
Build Host  : i03-ch2c
Packager    : https://bugs.opensuse.org
Vendor      : openSUSE
URL         : https://www.zlib.net/
Summary     : Library implementing the DEFLATE compression algorithm
Description :
zlib is a general-purpose lossless data-compression library,
implementing an API for the DEFLATE algorithm, the latter of
which is being used by, for example, gzip and the ZIP archive
format.
Distribution: openSUSE Tumbleweed

However, the corresponding texlive package was not:

% LC_ALL=C rpm -qi texlive-latex-bin-bin
Name        : texlive-latex-bin-bin
Version     : 2023.20230311.svn54358
Release     : 93.4
Architecture: x86_64
Install Date: Wed Oct 11 19:42:52 2023
Group       : Productivity/Publishing/TeX/Utilities
Size        : 26
License     : LPPL-1.0
Signature   : RSA/SHA512, Mon Oct  9 12:04:33 2023, Key ID 35a2f86e29b700a4
Source RPM  : texlive-2023.20230311-93.4.src.rpm
Build Date  : Mon Oct  9 11:45:00 2023
Build Host  : i03-ch1b
Relocations : /usr/bin 
Packager    : https://bugs.opensuse.org
Vendor      : openSUSE
URL         : https://www.tug.org/texlive/
Summary     : Binary files of latex-bin
Description :
Binary files of latex-bin
Distribution: openSUSE Tumbleweed

It seems like the texlive package is in need of a rebuild.
Comment 1 hui 2023-10-29 11:46:38 UTC
*** Bug 1216678 has been marked as a duplicate of this bug. ***
Comment 2 Ernst Reißner 2023-10-29 12:10:11 UTC
Same Problem. 

I tried: 
13:02 $ lualatex --credits
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/TeX Live for SUSE Linux)

The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.

LuaHBTeX merges and builds upon (parts of) the code from these projects:

tex       : Donald Knuth
etex      : Peter Breitenlohner, Phil Taylor and friends
omega     : John Plaice and Yannis Haralambous
aleph     : Giuseppe Bilotta
pdftex    : Han The Thanh and friends
kpathsea  : Karl Berry, Olaf Weber and others
lua       : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo
metapost  : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends
pplib     : Paweł Jackowski
fontforge : George Williams (partial)
luajit    : Mike Pall (used in LuajitTeX)

Compiled with libharfbuzz 8.2.1; using 8.2.2
Compiled with libpng 1.6.40; using 1.6.40
Compiled with lua version 5.3.6
Compiled with mplib version 2.02
Compiled with zlib 1.2.13; using 1.3

Development id: 7581

One can see the problem also: Compiled with zlib 1.2.13; using 1.3
Comment 3 Ernst Reißner 2023-10-29 12:33:41 UTC
As I see there is another potential problem: libharfbuzz 8.2.1; using 8.2.2

What i dont understand is, 
that the incompatibility is not discovered...
Comment 4 Ernst Reißner 2023-10-29 18:08:08 UTC
I protected the versions in yast.. 
Please notify me when lualatex is updated.
Comment 5 Alberto Verga 2023-10-30 08:01:44 UTC
Same problem:

It seems that lualatex is broken: it was compiled with zlib 1.2.13, but the actual zlib version is 1.3
lualatex

PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.13, library: 1.3)
Aborted (core dumped)

For information (Tumbleweed updated today):
This is LuaTeX, Version 1.17.0 (TeX Live 2023/TeX Live for SUSE Linux)

The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.

LuaTeX merges and builds upon (parts of) the code from these projects:

tex : Donald Knuth
etex : Peter Breitenlohner, Phil Taylor and friends
omega : John Plaice and Yannis Haralambous
aleph : Giuseppe Bilotta
pdftex : Han The Thanh and friends
kpathsea : Karl Berry, Olaf Weber and others
lua : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo
metapost : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends
pplib : Paweł Jackowski
fontforge : George Williams (partial)
luajit : Mike Pall (used in LuajitTeX)

Compiled with libpng 1.6.40; using 1.6.40
Compiled with lua version 5.3.6
Compiled with mplib version 2.02
Compiled with zlib 1.2.13; using 1.3

Development id: 7581
Comment 6 Atri Bhattacharya 2023-10-30 13:40:28 UTC
Apparently 'texlive' in openSUSE:Factory needs a rebuild against the updated zlib.

For me, packages from https://build.opensuse.org/package/show/Publishing:TeXLive/texlive which have been rebuilt against zlib 1.3 work fine.
Comment 7 Atri Bhattacharya 2023-10-30 13:53:43 UTC
CC'ing maintainer.
Comment 8 Atri Bhattacharya 2023-11-07 05:14:55 UTC
The problem should have been fixed in the meanwhile due to a new build against zlib 1.3 (probably trigerred manually). To ensure a new zlib check-in to Factory automatically rebuilds texlive, I have submitted https://build.opensuse.org/request/show/1121211 (pending review for a week now).

Could someone please confirm that lualatex now works as of texlive-latex-bin-bin version "2023.20230311.svn54358-93.5"? Thanks in advance.
Comment 9 Alberto Verga 2023-11-07 18:20:02 UTC
Thank you. Yes, I may confirm that lualatex is working fine after recompilation.
Comment 10 Dr. Werner Fink 2023-11-15 12:49:24 UTC
Hmmm ... a minor version update of a library with major API changes and the library using programs get a bug ... sorry, but this is a bug of libz.

I'll add a workaround from Atri Bhattacharya to catch this ... nevertheless the violation of not changing the API for minor version update still holds true even for libz

The only problem is that this is caused by upstream and the maintainer of libz ... aka zlib can only change the naming scheme of the library package to catch such changes ... means from current lib1 to something like libz-1_3
Comment 11 Dr. Werner Fink 2023-11-16 14:31:30 UTC
I see a lot of TeXlive binaries which depends on libz

 > rpmqpack | grep -Ee '^texlive-.*-bin$' | \
 xargs -n 1 rpm -ql | grep /usr/bin | \
 xargs ldd 2>/dev/null | grep libz\\.so | wc -l
 73

not sure if fixing luatex binary package solves the problem for
all other TeXlive binaries
Comment 12 Atri Bhattacharya 2023-11-16 14:44:29 UTC
(In reply to Dr. Werner Fink from comment #11)
> I see a lot of TeXlive binaries which depends on libz
> 
>  > rpmqpack | grep -Ee '^texlive-.*-bin$' | \
>  xargs -n 1 rpm -ql | grep /usr/bin | \
>  xargs ldd 2>/dev/null | grep libz\\.so | wc -l
>  73
> 
> not sure if fixing luatex binary package solves the problem for
> all other TeXlive binaries

From my (albeit only brief) testing, only luatex panics and crashes when it sees a different version of libz being used as opposed to what it is built against.

This brings me to your previous comment, Werner, about libz API changes. Seeing that luatex crashes even when libz version mismatch happens at the patch level [1], I wonder if this is from an assertion check within luatex (or lua itself) that prohibits any such version mismatch or actual API changes in libz.

[1] Many similar reports on the www, both old and recent:
    * https://bbs.archlinux.org/viewtopic.php?id=162609
    * https://ubuntuforums.org/showthread.php?t=1680984
    * https://github.com/void-linux/void-packages/issues/45986
Comment 13 Dr. Werner Fink 2023-11-16 15:03:47 UTC
(In reply to Atri Bhattacharya from comment #12)
> 
> From my (albeit only brief) testing, only luatex panics and crashes when it
> sees a different version of libz being used as opposed to what it is built
> against.

Thanks ... good to know.

> This brings me to your previous comment, Werner, about libz API changes.
> Seeing that luatex crashes even when libz version mismatch happens at the
> patch level [1], I wonder if this is from an assertion check within luatex
> (or lua itself) that prohibits any such version mismatch or actual API
> changes in libz.
> 
> [1] Many similar reports on the www, both old and recent:
>     * https://bbs.archlinux.org/viewtopic.php?id=162609
>     * https://ubuntuforums.org/showthread.php?t=1680984
>     * https://github.com/void-linux/void-packages/issues/45986

None of them patch their dependency rules but rebuild TeXLive
... I've to think about this
Comment 14 Dr. Werner Fink 2023-11-17 13:44:44 UTC
The workaround is up with SR#1127307 now for all lua based binaries as well
Comment 15 OBSbugzilla Bot 2023-11-17 15:35:01 UTC
This is an autogenerated message for OBS integration:
This bug (1216650) was mentioned in
https://build.opensuse.org/request/show/1127307 Factory / texlive
Comment 16 OBSbugzilla Bot 2023-11-20 09:35:04 UTC
This is an autogenerated message for OBS integration:
This bug (1216650) was mentioned in
https://build.opensuse.org/request/show/1127649 Factory / texlive
Comment 17 Dr. Werner Fink 2024-02-22 08:28:05 UTC
Fixed