Your message dated Sun, 15 Mar 2026 10:49:18 +0000
with message-id <[email protected]>
and subject line Bug#1125305: fixed in ghc 9.10.3-4
has caused the Debian Bug report #1125305,
regarding ghc: DSO DT_NEEDED ordering issues reproducibility problem
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1125305: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1125305
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ghc
Version: 9.10.3-1
Severity: normal
X-Debbugs-Cc: [email protected]
User: [email protected]
Usertags: randomness
Hi,
we see a number of reproducibility regressions of Haskell packages on
reproduce.debian.net where the linked shared libraries are in a
different order. For example:
│ │ ├──
./usr/lib/haskell-packages/ghc/lib/aarch64-linux-ghc-9.10.3-98d9/libHSfast-logger-3.2.6-LyYTgPSYEd64scJh7XG7qd-ghc9.10.3.so
│ │ │┄ File has been modified after NT_GNU_BUILD_ID has been applied.
│ │ │ ├── readelf --wide --dynamic {}
│ │ │ │ @@ -1,34 +1,34 @@
│ │ │ │
│ │ │ │ Dynamic section at offset 0x4f9b8 contains 58 entries:
│ │ │ │ Tag Type Name/Value
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHStext-2.1.3-54f8-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSauto-update-0.2.6-1k2gXzjv1IO47cMPEOTACz-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSeasy-file-0.2.5-IgVZCl11gbNHDIWZv87z6o-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSdirectory-1.3.8.5-8546-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSunix-time-0.4.17-BEvWzcSeWkGB8GkMahqg2p-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSold-time-1.1.0.4-KiWCneuM5JdGrQ6yBG4I8D-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSold-locale-1.0.0.7-6rxVRR51oKCJikTZOJLRQt-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSbinary-0.8.9.3-acc1-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHScontainers-0.7-15ad-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSunix-compat-0.7.4.1-86RO4YoLR3DL7aJ8cPb6Xn-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSdirectory-1.3.8.5-8546-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSunix-2.8.7.0-8dad-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHStime-1.12.2-5137-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSfilepath-1.5.4.0-c84d-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSos-string-2.0.7-e950-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSexceptions-0.10.9-b548-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSstm-2.5.3.1-8d78-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSmtl-2.3.1-f904-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHStransformers-0.6.1.1-86ae-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSunix-time-0.4.17-BEvWzcSeWkGB8GkMahqg2p-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSold-time-1.1.0.4-KiWCneuM5JdGrQ6yBG4I8D-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSold-locale-1.0.0.7-6rxVRR51oKCJikTZOJLRQt-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHSbinary-0.8.9.3-acc1-ghc9.10.3.so]
│ │ │ │ - 0x0000000000000001 (NEEDED) Shared library:
[libHScontainers-0.7-15ad-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSbytestring-0.12.2.0-a0a4-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHStemplate-haskell-2.22.0.0-7589-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSpretty-1.1.3.6-ab72-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSghc-boot-th-9.10.3-c0cf-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSdeepseq-1.5.0.0-9baa-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSauto-update-0.2.6-1k2gXzjv1IO47cMPEOTACz-ghc9.10.3.so]
│ │ │ │ + 0x0000000000000001 (NEEDED) Shared library:
[libHSstm-2.5.3.1-8d78-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSarray-0.5.8.0-c618-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSbase-4.20.2.0-6a67-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSghc-internal-9.1003.0-30ff-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSghc-bignum-1.3-4172-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library:
[libHSghc-prim-0.12.0-90d3-ghc9.10.3.so]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library: [libgmp.so.10]
│ │ │ │ 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
https://reproduce.debian.net/arm64/api/v1/builds/97592/artifacts/206086/diffoscope
I was able to reproduce this with:
$ sbuild --chroot-mode=unshare --dist=unstable haskell-fast-logger
$ debrebuild --buildresult=out --builder=sbuild+unshare --cache=cache \
haskell-fast-logger_3.2.6-1_amd64.buildinfo
But this works only sometimes.
I found that reproducibility depends on the content of
/var/lib/ghc/package.conf.d/package.cache. From my understanding the
content of the package.cache depends on the install order of the Debian
packages as ghc.postinst has a dpkg-trigger and does ghc-pkg recache
--global. Specifically I captured a chroot.tar as generated from
debrebuild/debootsnap where the package was not reproducible and
exchanged the package.cache from one where it was reproducible and it
fixed the issue.
Next I tested calling ghc -lfoo -lbar and ghc -lbar -lfoo directly and
found that the command line order is preserved in the DT_NEEDED but that
is already the case in stable so my conclusion was that this is not the
regression with the new ghc version in unstable we see.
So I created a minimal example with cabal:
$ mkdir -p haskell/{foo,bar,baz}
$ cd haskell/foo/
$ cabal init --non-interactive --lib --dependency=base --package-name=foo
$ cd ../bar/
$ cabal init --non-interactive --lib --dependency=base --package-name=bar
$ cd ../baz/
$ cabal init --non-interactive --lib --dependency=base,foo,bar
--package-name=baz
$ cd ..
$ echo 'packages: */*.cabal */' > cabal.project
$ cabal build foo
$ cabal build baz
$ ldd
dist-newstyle/build/x86_64-linux/ghc-*/baz-0.1.0.0/build/libHSbaz-0.1.0.0-inplace-*.so
[..]
libHSfoo-0.1.0.0-inplace-ghc9.10.3.so =>
/home/jspricke/haskell/dist-newstyle/build/x86_64-linux/ghc-9.10.3/foo-0.1.0.0/build/libHSfoo-0.1.0.0-inplace-ghc9.10.3.so
(0x00007f787a138000)
libHSbar-0.1.0.0-inplace-ghc9.10.3.so =>
/home/jspricke/haskell/dist-newstyle/build/x86_64-linux/ghc-9.10.3/bar-0.1.0.0/build/libHSbar-0.1.0.0-inplace-ghc9.10.3.so
(0x00007f787a133000)
$ rm -r dist-newstyle/
$ cabal build bar
$ cabal build baz
$ ldd
dist-newstyle/build/x86_64-linux/ghc-*/baz-0.1.0.0/build/libHSbaz-0.1.0.0-inplace-*.so
[..]
libHSbar-0.1.0.0-inplace-ghc9.10.3.so =>
/home/jspricke/haskell/dist-newstyle/build/x86_64-linux/ghc-9.10.3/bar-0.1.0.0/build/libHSbar-0.1.0.0-inplace-ghc9.10.3.so
(0x00007fc869fb4000)
libHSfoo-0.1.0.0-inplace-ghc9.10.3.so =>
/home/jspricke/haskell/dist-newstyle/build/x86_64-linux/ghc-9.10.3/foo-0.1.0.0/build/libHSfoo-0.1.0.0-inplace-ghc9.10.3.so
(0x00007fc869faf000)
Whereas on Debian stable the output is the same both times. I assume
that this is again due to the package.cache in dist-newstyle/packagedb/.
I used the container images from [1] to bisect the problem and found
that it is reproducible with the latest available version (9.12.2) as
well as with 9.8.4 but not with 9.6.7, so I assume the change happened
between those versions. Also note that the cabal-install version is the
same (3.14.1.1) in both containers so I assume it is not the cause of
the bug.
Filling this on the Debian side for the tracking, can you please forward
it upstream in case?
Thanks!
Jochen
P.S.: This issue is to fix the Debian package reproducibility, if you
could make the package.cache reproducible, that would be awesome as
well.
[1] https://hub.docker.com/_/haskell/
-- System Information:
Debian Release: forky/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.18.3+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages ghc depends on:
ii dpkg 1.23.3
ii gcc 4:15.2.0-4
ii libbsd-dev 0.12.2-2
ii libc6 2.42-7
ii libc6-dev 2.42-7
ii libffi-dev 3.5.2-3
ii libffi8 3.5.2-3
ii libgmp-dev 2:6.3.0+dfsg-5
ii libgmp10 2:6.3.0+dfsg-5
ii libncurses-dev 6.6+20251231-1
ii libnuma-dev 2.0.19-1
ii libnuma1 2.0.19-1
ii libtinfo6 6.6+20251231-1
Versions of packages ghc recommends:
ii libstdc++-15-dev 15.2.0-12
Versions of packages ghc suggests:
ii clang-21 1:21.1.8-1+b1
pn ghc-doc <none>
pn ghc-prof <none>
pn llvm-21 <none>
ii perl 5.40.1-7
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: ghc
Source-Version: 9.10.3-4
Done: Ilias Tsitsimpis <[email protected]>
We believe that the bug you reported is fixed in the latest version of
ghc, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ilias Tsitsimpis <[email protected]> (supplier of updated ghc package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 07 Mar 2026 19:29:27 +0200
Source: ghc
Architecture: source
Version: 9.10.3-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Haskell Group
<[email protected]>
Changed-By: Ilias Tsitsimpis <[email protected]>
Closes: 1125305 1125455 1128371
Changes:
ghc (9.10.3-4) unstable; urgency=medium
.
[ John Paul Adrian Glaubitz ]
* Build with -optc-no-integrated-cpp on hppa
* Build with --enable-ld-override on loong64 (Closes: #1125455)
* Drop --enable-unregisterised on loong64 after bootstrap
* Re-enable patch to pass -mcmodel=medium to LLVM backend on loong64
* Re-enable patch to pass -mcmodel=medium to CC on loong64
* Stop passing -optc-mcmodel=medium in EXTRA_HADRIAN_FLAGS on loong64
* Update patch to pass -mcmodel=medium to LLVM backend on loong64
.
[ Ilias Tsitsimpis ]
* Fix determinism of linker arguments (Closes: #1125305)
* Bump standards version to 4.7.3
* Bump debhelper compat to 13
* Add bash completion
* Backport patches to build on hurd-any (Closes: #1128371)
* Build-Depend on pkgconf instead of pkg-config
Checksums-Sha1:
8132312db5818b510e7054ec8e07192db79cee53 2842 ghc_9.10.3-4.dsc
8051b7d36542654c9ecdc224f5b44802f78517fd 67172 ghc_9.10.3-4.debian.tar.xz
a3f2cb3684f5d20e2141bfdc991a1211266489ee 6200 ghc_9.10.3-4_source.buildinfo
Checksums-Sha256:
deb3fa991632a0d756b12bb1aeb893e552c03e136810d0ffa80025d8746edb42 2842
ghc_9.10.3-4.dsc
f3c51edac5d0d64da10b0e289f3bb3a23105d31b06df9a9e5b6732220ecc61a7 67172
ghc_9.10.3-4.debian.tar.xz
4374bec50f79c804d9078373484ab2f8b4648271d1a1321030eea899462f248d 6200
ghc_9.10.3-4_source.buildinfo
Files:
754c61c3a37453f6ec550aed112a0400 2842 haskell optional ghc_9.10.3-4.dsc
04b3177543a50183413c09730c37c85f 67172 haskell optional
ghc_9.10.3-4.debian.tar.xz
78d1b5dff7527ce491e7ce16f7f9106e 6200 haskell optional
ghc_9.10.3-4_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJIBAEBCgAyFiEEJ9c8pfW11+AaUTb116hngMxkQDwFAmm2i2QUHGlsaWFzdHNp
QGRlYmlhbi5vcmcACgkQ16hngMxkQDwb9hAAi2J4zNlGYP8MxXIlp00Z2wvQvqsC
Vupt+xrScP+jK5+YSY7FKiyGvZKDudKjZ0UsQTJZyujjvltjl7Z584y2NlKrOsRx
HVtWGVLHCW2NwxEzX1+T+Txdnrh4gexPOhv1Mit5vixwRCdi157BANp+lKSkAa9M
aEw9JkcK2lcFWN1Icm4j/ukGWTzUt+/jPCkjXxGhCiOIO07w+8XY3ggM7/FyDIvR
6iLefPZkYiIBIvdxU51l124kBiqtER7MwMOwHa0YTmL+yHTMXPzvRVbYPSvkzgXy
xLYTobyVTESJgztzXol6i4XoClsQZIs2Ve8X7Mb39FCXuHjUiPiDn7ROJ3TPGhPB
WYBBNcr7LdC7xPcnzuffDfdX6g/j9c8zI9ODKiCj0JJte9/p7clmeU075A96k6AI
eXUGQeHXG9TgahT5T/eWgDNKS6aTMkf/UonzrQTqlyndVf3qAuKf4SOV1XaAZ6yO
UQoqxSyaodM6tGXadQgPPT00O2nSre1cK61QtxQ2hh66VRjNvariJW2VVeS13S+F
qt8Z2K4cbSEixx124LYx61ri20zEP/LahRXck9a149dKUjsXBz37EAF4r6mVRXkw
AXoaTthE2EZusiLI3vrpnDGJqnhqwBK1eZa4lu7ssVBxy2vyBleQZbYBvxfbvn9v
BymhdB6LkLTt+6E=
=MN9L
-----END PGP SIGNATURE-----
pgpWasAVbMNFg.pgp
Description: PGP signature
--- End Message ---
_______________________________________________
Pkg-haskell-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-haskell-maintainers