new gccgo version update (4:8.2.0-1ubuntu2.1) is triggering dh-golang <1.35 bug

Bug #1794936 reported by Samuele Pedroni on 2018-09-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dh-golang (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned
gcc-8 (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[impact]
Packages that use gccgo-go to build fail to build. There aren't really any such packages in Ubuntu today, but it's still a broken situation.

[test case]
$ apt source golang-petname
$ cd golang-petname-*/
$ sed -i -e 's/golang-go/gccgo-go/' debian/control
$ apt build-dep ./
$ dpkg-buildpackage

[regression potential]
The added patch adds code that only runs if 'go version' contains gccgo, which means that it only affects builds where the default go is gccgo-go, i.e. the builds that are currently broken by this bug. It will not affect any other build.

[original description]
We see this kind of error in recent runs of snapd tests when using bionic updating gccgo 4:8.2.0-1ubuntu2.1 and current dh-golang 1.34.

Can be run from snapd master checkout with:

spread -v -debug google:ubuntu-18.04-64:tests/unit/gccgo

with the proper configuration.

Error:

...
  dh_makeshlibs -O--buildsystem=golang -O--fail-missing -O--builddirectory=_build
   dh_shlibdeps -O--buildsystem=golang -O--fail-missing -O--builddirectory=_build
   debian/rules override_dh_installdeb
make[1]: Entering directory '/home/gopath/src/github.com/snapcore/snapd'
dh_apparmor --profile-name=usr.lib.snapd.snap-confine.real -psnapd
dh_installdeb
make[1]: Leaving directory '/home/gopath/src/github.com/snapcore/snapd'
   dh_golang -O--buildsystem=golang -O--fail-missing -O--builddirectory=_build
template: main:2:14: executing "main" at <index (or .GoFiles ....>: error calling index: index out of range: 0
dh_golang: go list -f '\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}' returned exit code 1
debian/rules:103: recipe for target 'binary' failed
make: *** [binary] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
-----

These were passing until today.

Seems related/similar to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907263

which mentions dh-golang 1.35 having a fix.

description: updated
summary: - new gccgo version update () is triggering dh-golang bug
+ new gccgo version update (4:8.2.0-1ubuntu2.1) is triggering dh-golang
+ <1.35 bug
Zygmunt Krynicki (zyga) on 2018-09-28
tags: added: regression-update
William Grant (wgrant) on 2018-09-28
affects: gcc-defaults (Ubuntu) → gcc-8 (Ubuntu)

Should SRU the new dh_golang I guess. Although why do you care about
buildability with gccgo?

On Fri, 28 Sep 2018, 20:20 William Grant, <email address hidden> wrote:

> ** Package changed: gcc-defaults (Ubuntu) => gcc-8 (Ubuntu)
>
> --
> You received this bug notification because you are subscribed to dh-
> golang in Ubuntu.
> https://bugs.launchpad.net/bugs/1794936
>
> Title:
> new gccgo version update (4:8.2.0-1ubuntu2.1) is triggering dh-golang
> <1.35 bug
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/dh-golang/+bug/1794936/+subscriptions
>

Samuele Pedroni (pedronis) wrote :

that's a question for mvo, but afair is because some platforms we "support" have only that?

Steve Langasek (vorlon) wrote :

On Fri, Sep 28, 2018 at 10:56:03AM -0000, Samuele Pedroni wrote:
> that's a question for mvo, but afair is because some platforms we
> "support" have only that?

The only platform that lacks golang and must use gccgo is powerpc. We
should just consider that unsupported by snapd. (That would imply a
regression in buildability of snapd in Ubuntu 16.04; but not in Ubuntu 18.04
and later, where the powerpc architecture has been dropped.)

Michael Vogt (mvo) wrote :

I am much in favour of stop supporting powerpc in snapd. If we can make that official in the SRU page we have one worry less (in practical terms powerpc was never really fully supported because we don't build a core snap for powerpc).

Matthias Klose (doko) wrote :

marking as invalid for gcc-8. Awaiting reply now from the snapd team, if it should be ignored, or fixed.

Changed in gcc-8 (Ubuntu):
status: New → Invalid
Michael Vogt (mvo) wrote :

Thanks for your reply @doko.

Let me clarify what my position:
- we would like to stop supporting gccgo in snapd
- this will mean a regression in xenial where we currently have a buildable snapd on powerpc
- we would like to add the exception to powerpc to https://wiki.ubuntu.com/SnapdUpdates to make this official
- if foundations is okay with stopping to support gccgo this bug can be ignored - otherwise it needs to be fixed because we need to keep running gccgo builds to ensure we do not regress here.

Changed in dh-golang (Ubuntu):
status: New → Incomplete
status: Incomplete → Fix Released
Changed in dh-golang (Ubuntu Bionic):
status: New → Triaged
Michael Hudson-Doyle (mwhudson) wrote :

While I entirely support the idea of snapd no longer caring about gccgo, this report does indicate a clear bug so I've uploaded a fix for dh-golang to the SRU queue.

description: updated
Changed in dh-golang (Ubuntu Bionic):
status: Triaged → In Progress
Steve Langasek (vorlon) wrote :

On Mon, Oct 01, 2018 at 07:39:32AM -0000, Michael Vogt wrote:
> I am much in favour of stop supporting powerpc in snapd. If we can make
> that official in the SRU page we have one worry less (in practical terms
> powerpc was never really fully supported because we don't build a core
> snap for powerpc).

I've consulted with Adam and we agree that since there is no core snap, it
is not worth additional effort to keep snapd building on powerpc, including
in SRU.

Michael (mvo), feel free to adjust the language on the SRU exception wiki
page and ping us back for sign-off.

Robie Basak (racb) wrote :

The dh-golang SRU needs a proper Regression Potential section please.

> The dh-golang SRU needs a proper Regression Potential section please.

Done.

description: updated

Hello Samuele, or anyone else affected,

Accepted dh-golang into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dh-golang/1.34.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in dh-golang (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic

Ahh silly me 1.34.1 added the fix to debian/patches but it's a native package.

Changed in dh-golang (Ubuntu Bionic):
status: Fix Committed → In Progress
tags: added: verification-failed verification-failed-bionic
removed: verification-needed verification-needed-bionic
Brian Murray (brian-murray) wrote :

Hello Samuele, or anyone else affected,

Accepted dh-golang into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dh-golang/1.34.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in dh-golang (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-failed verification-failed-bionic

That worked better:

root@bionic:~# apt source golang-petname
Reading package lists... Done
NOTICE: 'golang-petname' packaging is maintained in the 'Bzr' version control system at:
https://code.launchpad.net/petname/petname/trunk
Please use:
bzr branch https://code.launchpad.net/petname/petname/trunk
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 20.9 kB of source archives.
Get:1 http://archive.ubuntu.com/ubuntu bionic/universe golang-petname 2.8-0ubuntu2 (dsc) [2113 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic/universe golang-petname 2.8-0ubuntu2 (tar) [13.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/universe golang-petname 2.8-0ubuntu2 (diff) [5148 B]
Fetched 20.9 kB in 1s (32.1 kB/s)
dpkg-source: info: extracting golang-petname in golang-petname-2.8
dpkg-source: info: unpacking golang-petname_2.8.orig.tar.gz
dpkg-source: info: unpacking golang-petname_2.8-0ubuntu2.debian.tar.xz
W: Download is performed unsandboxed as root as file 'golang-petname_2.8-0ubuntu2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
root@bionic:~# cd golang-petname-*/
root@bionic:~/golang-petname-2.8# sed -i -e 's/golang-go/gccgo-go/' debian/control
root@bionic:~/golang-petname-2.8# apt build-dep ./
Note, using directory './' to get the build dependencies
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  golang-1.10-go golang-1.10-src golang-src libfreetype6
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
root@bionic:~/golang-petname-2.8# dpkg-buildpackage
dpkg-buildpackage: info: source package golang-petname
dpkg-buildpackage: info: source version 2.8-0ubuntu2
[...]
 dpkg-genbuildinfo
 dpkg-genchanges >../golang-petname_2.8-0ubuntu2_amd64.changes
dpkg-genchanges: info: not including original source code in upload
 dpkg-source --after-build golang-petname-2.8
dpkg-buildpackage: info: binary and diff upload (original source NOT included)
root@bionic:~/golang-petname-2.8# dpkg -l dh-golang
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================-===================-===================-==============================================================
ii dh-golang 1.34.2 all debhelper add-on for packaging software written in Go (golang)

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dh-golang - 1.34.2

---------------
dh-golang (1.34.2) bionic; urgency=medium

  * Actually apply the patch the last upload added, as this is a native
    package.

dh-golang (1.34.1) bionic; urgency=medium

  * d/patches/0001-Fix-index-out-of-range-when-using-gccgo.-Closes-9072.patch:
    backport fix for building with gccgo from debian. (LP: #1794936)

 -- Michael Hudson-Doyle <email address hidden> Mon, 15 Oct 2018 12:37:07 +1300

Changed in dh-golang (Ubuntu Bionic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for dh-golang has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers