#1084905 leptonlib: FTBFS on sparc64 due to unaligned access

Package:
src:leptonlib
Source:
src:leptonlib
Submitter:
John Paul Adrian Glaubitz
Date:
2025-10-21 17:05:01 UTC
Severity:
normal
Tags:
#1084905#5
Date:
2024-10-10 18:44:57 UTC
From:
To:
Hi,

leptonlib currently fails to build from source on sparc64 due to unaligned access:

FAIL: ioformats_reg
===================


////////////////////////////////////////////////
////////////////   ioformats_reg   ///////////////
////////////////////////////////////////////////
leptonica-1.84.2 : libgif 5.2.2 : libjpeg 6b (libjpeg-turbo 2.1.5) : libpng 1.6.44 : libtiff 4.5.1 : zlib 1.3.1 : libwebp 1.4.0 : libopenjp2 2.5.0
Test bmp 1 bpp file:
Bus error (core dumped)
FAIL ioformats_reg (exit status: 138)

with the following backtrace:

#0  0xfff800010064f9b0 in pixReadMemBmp (cdata=0x10000231160 "BMV\r", size=3414) at bmpio.c:181
181         ihbytes = convertOnBigEnd32(*(l_uint32 *)(bmpih));
(gdb) bt
#0  0xfff800010064f9b0 in pixReadMemBmp (cdata=0x10000231160 "BMV\r", size=3414) at bmpio.c:181
#1  0xfff80001006504dc in pixReadStreamBmp (fp=0x1000022c1d0) at bmpio.c:102
#2  0xfff80001007aa700 in pixReadStream (fp=0x1000022c1d0, hint=0) at readfile.c:329
#3  pixReadStream (fp=0x1000022c1d0, hint=0) at readfile.c:313
#4  0xfff80001007aa8b8 in pixRead (filename=0x10000231140 "./weasel2.4c.bmp") at readfile.c:200
#5  pixRead (filename=0x10000231140 "./weasel2.4c.bmp") at readfile.c:189
#6  0xfff80001007f538c in writeMultipageTiffSA (sa=0x10000204ac0, fileout=0x10000002aa8 "/tmp/lept/tiff/weasel_orig.tif") at tiffio.c:1579
#7  0xfff80001007f551c in writeMultipageTiff (dirin=0x10000002860 ".", substr=0x10000002ac8 "weasel2", fileout=0x10000002aa8 "/tmp/lept/tiff/weasel_orig.tif")
    at tiffio.c:1536
#8  0x0000010000001f1c in main (argc=<optimized out>, argv=<optimized out>) at mtiff_reg.c:270

This has already been reported upstream [1].

Thanks,
Adrian

#1084905#12
Date:
2024-10-15 19:24:56 UTC
From:
To:
Jonas, this alignment issue was reported on Sparc64. It was recently
addressed by upstream, but not yet brought into Debian. Mentioning in case
there is any interaction with the Rust bindings, which were also throwing
an error related to alignment.

https://github.com/DanBloomberg/leptonica/issues/750
https://ci.debian.net/packages/r/rust-leptonica-sys/testing/i386/52950971/#S7

#1084905#19
Date:
2025-10-21 12:22:56 UTC
From:
To:
Upstream has already released version 1.86.0. Time for a package update?

The debian/watch file doesn't seem to work either, FWIW. See this section [1]
in the Debian wiki on how to fix it for the new GitHub API.

Adrian

#1084905#24
Date:
2025-10-21 17:03:00 UTC
From:
To:
Jeff, if you have time this fall, we should do a new Debian release for the
big Ubuntu distro in April 2026.

I somewhat screwed up the tag and release for 1.86.0, because I didn't use
a different 'prerelease' tag for the prerelease version.
So I'm putting out 1.87.0 in the next day or two, and will try to do it
correctly.

Looking at the 1.86.0 release on github, is there anything obviously wrong,
except perhaps that the autotools tarball was initially uploaded outside of
the assets (and perhaps someone copied it into the assets later?).

Dan


On Tue, Oct 21, 2025 at 5:22 AM John Paul Adrian Glaubitz < glaubitz@physik.fu-berlin.de> wrote: