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
10
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers