#1130485 bash: Filenames being mangled on sh4 cause other packages to FTBFS

Package:
src:bash
Source:
src:bash
Submitter:
John Paul Adrian Glaubitz
Date:
2026-05-01 12:27:02 UTC
Severity:
normal
Tags:
#1130485#5
Date:
2026-03-12 12:32:59 UTC
From:
To:
Hi,

the latest upload of bash (5.3-2) is not working correctly on sh4 and causes filenames to be
mangled such that other packages are FTBFS or are not built correctly while still succeeding.

For example, the libunistring package does not contain correctly named *.so files [1]:

drwxr-xr-x root/root         0 2026-03-08 19:19 ./
drwxr-xr-x root/root         0 2026-03-08 19:19 ./usr/
drwxr-xr-x root/root         0 2026-03-08 19:19 ./usr/lib/
drwxr-xr-x root/root         0 2026-03-08 19:19 ./usr/lib/sh4-linux-gnu/
lrwxrwxrwx root/root         0 2026-03-08 19:19 ./usr/lib/sh4-linux-gnu/lib.so.5 -> lib.so.5.2.1
-rw-r--r-- root/root   1969120 2026-03-08 19:19 ./usr/lib/sh4-linux-gnu/lib.so.5.2.1
drwxr-xr-x root/root         0 2026-03-08 19:19 ./usr/share/
drwxr-xr-x root/root         0 2026-03-08 19:19 ./usr/share/doc/
drwxr-xr-x root/root         0 2026-03-08 19:19 ./usr/share/doc/libunistring5/
-rw-r--r-- root/root       838 2026-03-08 19:19 ./usr/share/doc/libunistring5/changelog.Debian.gz
-rw-r--r-- root/root      4514 2026-02-23 23:11 ./usr/share/doc/libunistring5/changelog.gz
-rw-r--r-- root/root    105103 2026-03-08 19:19 ./usr/share/doc/libunistring5/copyright

The filename of "libunistring.so.5" was mangled to "lib.so.5". I was able to fix the libunistring
package by rebuilding the package manually with bash_5.3-1 installed in the chroot. I have not yet
figured out whether this issue is a result of miscompilation or a the latest patches added to the
bash package.

The broken libunistring package causes gcc-16 to FTBFS on sh4 [2]:

msgfmt -o de.mo ../../../../src/libstdc++-v3/po/de.po
msgfmt -o fr.mo ../../../../src/libstdc++-v3/po/fr.po
/usr/bin/msgfmt: error while loading shared libraries: libunistring.so.5: cannot open shared object file: No such file or directory
/usr/bin/msgfmt: error while loading shared libraries: libunistring.so.5: cannot open shared object file: No such file or directory

I'm building gcc-16 for sh4 manually for now.

I'm filing this bug report for visibility and to document the problem.

Thanks,
Adrian

#1130485#10
Date:
2026-05-01 12:24:59 UTC
From:
To:
Hi,

Building bash with -O1 on sh4 (see attached patch) seems to fix the issue.
I will need to perform some more tests to verify this theory though, but
I think we can just apply the patch to be safe for the time being.

Adrian