#1148172 dh-go: Build failure due to dh_dwz error: Unknown debugging section .debug_addr

#1148172#5
Date:
2026-09-17 20:03:03 UTC
From:
To:
Dear Maintainer,

While trying to migrate a very simple Go package I maintain (gohelp2man)
from dh-golang to dh-go I get this error:

     dh_dwz -a -O--builddirectory=debian/_build -O--buildsystem=golang
  dwz: debian/gohelp2man/usr/bin/gohelp2man: Unknown debugging section .debug_addr
  dh_dwz: error: dwz -- debian/gohelp2man/usr/bin/gohelp2man returned exit code 1
  dh_dwz: error: Aborting due to earlier error


I only applied the following patch:

diff --git a/debian/control b/debian/control
index a5f575c..fd411b8 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: golang
 Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
 Uploaders: Nicolas Peugnet <nicolas@club1.fr>,
 Build-Depends: debhelper-compat (= 13),
-               dh-sequence-golang,
+               dh-go,
                dpkg-build-api (= 1),
                golang-any,
 Testsuite: autopkgtest-pkg-go

#1148172#10
Date:
2026-09-17 20:08:19 UTC
From:
To:
Nicolas Peugnet <nicolas@club1.fr> writes:

You could try bumping the package to compat 14 (don't forget to drop the
now unnecessary ${misc:Depends}) which has some dwz-related changes.

/Simon

#1148172#15
Date:
2026-09-17 20:08:19 UTC
From:
To:
Nicolas Peugnet <nicolas@club1.fr> writes:

You could try bumping the package to compat 14 (don't forget to drop the
now unnecessary ${misc:Depends}) which has some dwz-related changes.

/Simon

#1148172#20
Date:
2026-09-17 20:14:15 UTC
From:
To:
As this was copied to d-devel@ I must note that dh_dwz is no longer called
in compat 14 and so, even though I have no idea about Go and dh_go, I
recommend to bump compat and not spend any time on this.

#1148172#25
Date:
2026-09-17 20:15:59 UTC
From:
To:
Hi Nicolas,
to dh-go, and seems this issue has been addressed in #918903, #1016936
And both has been forwarded:
https://sourceware.org/bugzilla/show_bug.cgi?id=24756

Best regards,
-Andrew

#1148172#30
Date:
2026-09-17 20:33:57 UTC
From:
To:
This was reported against dh-go and has to be fixed there.

The dh sequence in dh-go already has remove_command('dh_dwz'),
and the buildsystem also needs something like that.

cu
Adrian

#1148172#35
Date:
2026-09-20 06:06:56 UTC
From:
To:
I reproduced this with dh-go 1.68 and gohelp2man. Adding
--with=golang fixes the compat 13 build.

I also tested compat 14, with the necessary install-file changes.
Without the Go sequence, the build succeeds but Static-Built-Using
is missing. Adding --with=golang restores it, so skipping dh_dwz
alone does not fully address the migration.

Tobias, the 1.66 changelog says the build dependency can be changed
without changing the rest of the configuration. For packages coming
from dh-sequence-golang, is adding --with=golang the intended migration
path, or should dh-go handle sequence activation automatically?

                                            - Troy

#1148172#40
Date:
2026-09-20 10:23:23 UTC
From:
To:
Am 20.09.26 um 08:06 schrieb Troy Mitchell:

Hi,

yes, the "remove_command('dh_dwz')" should be applied by the golang
debhelper addon. In dh-golang, this works, but in dh-go, it doesn't. I'm
not sure why dh_dwz is not removed from the builsd sequence in dh-go,
but I'll try to investigate. Any help appreciated. :-)

No, ideally, I'd like to avoid adding --with=golang to all d/rules
files. From my understanding, golang is a recognized third-party build
system by debhelper since August 2021 (v13.4), and therefore, dh-go
should be recognized by debhelper as well.

Regards,
Tobias

#1148172#45
Date:
2026-10-05 15:49:22 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
dh-go, 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 1148172@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <toddy@debian.org> (supplier of updated dh-go 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 05 Oct 2026 17:07:15 +0200
Source: dh-go
Architecture: source
Version: 1.69
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Changed-By: Dr. Tobias Quathamer <toddy@debian.org>
Closes: 1148172 1149022 1149945
Changes:
 dh-go (1.69) unstable; urgency=medium
 .
   [ Dr. Tobias Quathamer ]
   * Check that XS-Go-Import-Path is equal to module path from go.mod
   * Do not remove dh_dwz from build sequence in compat >= 14
   * Revert "Move setup of golang build environment into pre_building_step()"
     Thanks to Juan Manuel Mendez Rey <juan.mendezr@proton.me> (Closes: #1149945)
   * Update example to use debhelper v14
   * Run perltidy
   * Strip comments from go.mod (Closes: #1149022)
   * Use debhelper v14
 .
   [ Juan Manuel Méndez Rey ]
   * Keep symlinks when copying sources.
     Three file tests follow the link they are given, so symlinks to directories
     and dangling symlinks are silently dropped:
       - the DH_GOLANG_INSTALL_EXTRA walk in configure uses -f, which is false
         for a directory and for a broken link;
       - the main source walk in configure uses -e, which is false for a broken
         link;
       - install uses -d before the branch that recreates a symlink, so a link
         to a directory returns early, and File::Find does not descend into it
         either, so the subtree goes too.
     Test suites ship both kinds deliberately. The first of the three is
https://bugs.debian.org/842755, reported in 2016 and still open.
   * Follow requirements of modules installed under another path
   * Follow requirements of every module in go.work
     _create_go_work_file only walked the requirements of the main module
     (DH_GOPKG). A multi-module repository whose root module requires nothing,
     such as github.com/GoogleCloudPlatform/opentelemetry-operations-go, lists
     its submodules in go.work but their requirements were never followed, so
     modules they need (for example the requirements of grpc-gateway/v2) were
     neither replaced nor stubbed and target expansion failed with "module
     lookup disabled by GOPROXY=off".
     Seed the walk with the requirements of every module written as a use
     directive as well.
   * Sequence: fix inverted compat guard around dh_dwz removal.
     The guard removes dh_dwz at compat >= 14, where debhelper does not run it
     anyway, and leaves it in the sequence at compat 13, where it does run and
     fails on Go binaries with 'Unknown debugging section .debug_addr'.
     (Closes: #1148172)
   * Write a go directive into generated minimal go.mod files
   * Create go.work from the raw build packages, not from go list
     _create_go_work_file() expanded DH_GOLANG_BUILDPKG with get_targets(),
     which shells out to `go list`. That cannot work there: the workspace
     `go list` needs is the file being written, so any pattern ends up
     contributing nothing and the resulting go.work has no use directive.
     A multi-module package that passes bare module paths to
     dh_auto_configure and "module/..." patterns to dh_auto_build hits this
     whenever the workspace is missing at build time, which is what
     dh_golang_autopkgtest arranges: it disables override_dh_auto_configure
     and injects one that only copies the installed sources. The build then
     fails with "matched no packages" for every pattern, followed by "go: no
     modules were found in the current workspace".
     Strip a trailing /... from each entry instead and let the existing loop
     locate the go.mod files; for bare paths the result is unchanged.
Checksums-Sha1:
 996d3a936bade7f443dabb0ed5213cb2ade1a6a2 1726 dh-go_1.69.dsc
 71a7f0119cfbf517ddfe7aed0ead8b1d9b202828 28784 dh-go_1.69.tar.xz
 423be35487bdb0acb6197cab87595ebfa4f8b62e 5238 dh-go_1.69_amd64.buildinfo
Checksums-Sha256:
 d4a756fac2d0f5a65abc52a201937538538ee2b99ef838befa35130e44be8db3 1726 dh-go_1.69.dsc
 0a53d9a7d3fbe1607a750a4e3969584899b56a0f6a4d088ef2d70c0b07e0e5c3 28784 dh-go_1.69.tar.xz
 ba1171901fd78328c802cdc9c97b4ff9c3f3118c6b0e35166182f7eb3ad59f46 5238 dh-go_1.69_amd64.buildinfo
Files:
 67e8ff558c5e9cb82c2582eb452996b9 1726 golang optional dh-go_1.69.dsc
 43fcd49b19887cb9d0a52fe38405fcf9 28784 golang optional dh-go_1.69.tar.xz
 e985b5e364dd3bc5f023f6b70b34bc21 5238 golang optional dh-go_1.69_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE0cuPObxd7STF0seMEwLx8Dbr6xkFAmrDwcYACgkQEwLx8Dbr
6xn/6g//QzViYqnWzKFarNCZ//k4F9Nar/uC1TRfEq9BHYbsN6iOaAqCgUXtx8JY
M1leTlyYCwu/l92/QavWYjHjmTOvroXEIih17sL4DgWYJ8dK/8JcLZTlW3doEd+n
B7YciXb+5NohxEbYyip0+/xWCEom7z8VGeK5DcLMQwnnqovz8cs06Fe/JYwCVrz2
eIeAwMKJHTEJuxBwO6rT4T0SmWHBs36RzHdK30yBiPPe22MNC+Ao8FSELnj26GJI
SjbHY/R4bNniiSQv7nDldEcM7ms6xlLN/WtwFk1CuDzo+tN7Ts2PuAGsksXo8ZGz
Y+LeOtgLjBu5+1UJnmuhk3lHNLu34gilR4G52j1dqVR5CNu8aCL1m2ImO/zVHMr1
Z9cdIsCna2DYxo7Lq943ae1oPHp24UsBAk1DKue1HNn+AStaFDNnYo+pqd+lOFoV
EPg0/RfKp+jj64/mwFaagOkCBTr0Hxan4tuZqx1Idlbr8/1DThYUYXi6QitPOuDb
nn2Col+3/v+yE3APyZuIk4bmyn6qnr/Lg/HRzHfuCd4xHuuFNHkuRKJmk6/t58g7
8NaXDvFF+hOFzdg/fpt6Bz9bjzOuqbDRyQ2M+sSts/c5NKXPv2XbinursOoW8dfQ
9O13cp2Sro/VYGnycUgxtn/DO1kcCwm3/7ocuUVLoM5782jr+FQ=
=JqyA
-----END PGP SIGNATURE-----