reboot tests fail to build on gccgo

Bug #1381671 reported by Curtis Hovey
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Martin Packman
gccgo-5 (Ubuntu)
Fix Released
High
Unassigned
gccgo-go (Ubuntu)
Trusty
Invalid
Medium
Unassigned

Bug Description

The reboot tests cannot be built on ppc64el which uses the gccgo compiler.

We see
    FAIL github.com/juju/juju/api/reboot [build failed]

which is confirmed by this output earlier in the unittest log

# testmain
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.ClearReboot.pN37_github_com_juju_juju_api_reboot.State':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:67: multiple definition of `github_com_juju_juju_api_reboot.ClearReboot.pN37_github_com_juju_juju_api_reboot.State'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:67: first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.GetRebootAction.pN37_github_com_juju_juju_api_reboot.State':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:90: multiple definition of `github_com_juju_juju_api_reboot.GetRebootAction.pN37_github_com_juju_juju_api_reboot.State'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:90: first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.RequestReboot.pN37_github_com_juju_juju_api_reboot.State':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:45: multiple definition of `github_com_juju_juju_api_reboot.RequestReboot.pN37_github_com_juju_juju_api_reboot.State'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:45: first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.WatchForRebootEvent.pN37_github_com_juju_juju_api_reboot.State':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:30: multiple definition of `github_com_juju_juju_api_reboot.WatchForRebootEvent.pN37_github_com_juju_juju_api_reboot.State'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:30: first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o):(.data.rel.ro.__go_tdn_github_com_juju_juju_api_reboot.State+0x0): multiple definition of `__go_tdn_github_com_juju_juju_api_reboot.State'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):(.data.rel.ro.__go_tdn_github_com_juju_juju_api_reboot.State+0x0): first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.State$hash':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/export_test.go:12: multiple definition of `github_com_juju_juju_api_reboot.State$hash'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:109: first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.State$equal':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/export_test.go:12: multiple definition of `github_com_juju_juju_api_reboot.State$equal'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:109: first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o):(.rodata.github_com_juju_juju_api_reboot.NewState$descriptor+0x0): multiple definition of `github_com_juju_juju_api_reboot.NewState$descriptor'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):(.rodata.github_com_juju_juju_api_reboot.NewState$descriptor+0x0): first defined here
/tmp/go-build573700990/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a(reboot.o): In function `github_com_juju_juju_api_reboot.NewState':
/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:20: multiple definition of `github_com_juju_juju_api_reboot.NewState'
/tmp/go-build573700990/github.com/juju/juju/api/libreboot.a(reboot.o):/home/ubuntu/juju-core_1.21-alpha2/src/github.com/juju/juju/api/reboot/reboot.go:20: first defined here
collect2: error: ld returned 1 exit status

I believe these tests were introduced in commit 6ffffa3

Revision history for this message
Martin Packman (gz) wrote :

This is reminiscent of bug 1289067 but it's not clear why the reboot api addition triggered the failures. I can't reproduce the linker error on amd64 with gccgo.

Revision history for this message
Martin Packman (gz) wrote :

As this is blocking developers landing code, I am going ahead and working around this by not building the problem test file. There is almost certainly a ppc64/gccgo bug in need of fixing here.

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Martin Packman (gz)
Martin Packman (gz)
Changed in juju-core:
status: In Progress → Fix Committed
Martin Packman (gz)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Casey Marshall (cmars) wrote :

I am getting the above error when I try to run tests on amd64 with gccgo 4.9.

http://paste.ubuntu.com/8827836/

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gccgo-go (Ubuntu):
status: New → Confirmed
Revision history for this message
Casey Marshall (cmars) wrote :

^^ in juju master @ a7e1ea03bb98064a5173e2200335d641fde511a5

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Here's a gccgo-go patch that fixes the problem.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "avoid-duplicate-symbols-when-testing.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in gccgo-go (Ubuntu):
assignee: nobody → Michael Hudson-Doyle (mwhudson)
Revision history for this message
Martin Packman (gz) wrote :

Thanks Michael! I guess I'll need to be pretty conservative about removing the workaround in juju as we're testing on multiple ubuntu releases.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: [Bug 1381671] Re: reboot tests fail to build on gccgo

Yes, unless we can get this fix into all releases we care about (just as
far back as trusty, right?)

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

FWIW, I've send the fix upstream now the tree has reopened: https://go-review.googlesource.com/1840

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Related bug 1417771. Let's release an updated version of gccgo-go for trusty at least, if not precise. In vivid, a more recent release (1.2.1-0ubuntu7 ) has the fix.

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

It turns out the vivid package does not yet have the needed patch from https://go-review.googlesource.com/#/c/1840/ we'll have to wait for an upstream release I guess.

Revision history for this message
Dave Cheney (dave-cheney) wrote :

The attached patch for gccgo-1.2.1~ubuntu1 ensures that the external test package is always presented to the linker before the internal test package.

Tested against juju/juju 1.23 (something) by building and running all tests.

No linking failures during the test run

Revision history for this message
Matthias Klose (doko) wrote :

it's not clear what needs to be done for gcc-4.9. please specify.

Changed in gcc-4.9 (Ubuntu):
status: New → Incomplete
Revision history for this message
Matthias Klose (doko) wrote :

gccgo-go is removed in vivid, superseded by gccgo-5

Changed in gccgo-go (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Dave Cheney (dave-cheney) wrote :

The fix for gccgo-5 has landed upstream

https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=221782

Can gccgo-5 in Vivid be rebuilt at or after revision 221782.

The patch is also available and should apply cleanly to gccgo-go in Trusty.

https://codereview.appspot.com/222890043

Changed in gcc-4.9 (Ubuntu):
status: Incomplete → In Progress
status: In Progress → Invalid
Changed in gccgo-go (Ubuntu):
status: Invalid → In Progress
Matthias Klose (doko)
Changed in gcc-4.9 (Ubuntu Trusty):
status: New → Invalid
Changed in gcc-4.9 (Ubuntu Utopic):
status: New → Invalid
Changed in gccgo-5 (Ubuntu Trusty):
status: New → Invalid
Changed in gccgo-5 (Ubuntu Utopic):
status: New → Invalid
Matthias Klose (doko)
Changed in gccgo-5 (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gccgo-5 - 5-20150401-0ubuntu1

---------------
gccgo-5 (5-20150401-0ubuntu1) vivid; urgency=medium

  * Update to SVN 20150401.
    - go/cmd/go: always link external test packages first. LP: #1381671.
 -- Matthias Klose <email address hidden> Wed, 01 Apr 2015 11:57:15 +0200

Changed in gccgo-5 (Ubuntu):
status: In Progress → Fix Released
Mathew Hodson (mhodson)
no longer affects: gcc-4.9 (Ubuntu)
no longer affects: gcc-4.9 (Ubuntu Trusty)
no longer affects: gcc-4.9 (Ubuntu Utopic)
no longer affects: gccgo-5 (Ubuntu Trusty)
no longer affects: gccgo-5 (Ubuntu Utopic)
no longer affects: gccgo-go (Ubuntu Utopic)
no longer affects: gccgo-go (Ubuntu)
Changed in gccgo-5 (Ubuntu):
importance: Undecided → High
Changed in gccgo-go (Ubuntu Trusty):
importance: Undecided → Medium
Curtis Hovey (sinzui)
Changed in gccgo-go (Ubuntu Trusty):
status: New → Opinion
status: Opinion → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.