#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