Linker error on gccgo/ppc64 in test

Michael Hudson-Doyle michael.hudson at canonical.com
Fri Oct 17 03:19:01 UTC 2014


Michael Hudson-Doyle <michael.hudson at canonical.com> writes:

> Martin Packman <martin.packman at canonical.com> writes:
>
>> Landings were blocked today by a bug [1381671] where a recently landed
>> test file was failing to build on the ppc64 slave.
>>
>> As far as I can see, there's nothing obviously broken, and the package
>> follows the same basic layout as its api/ siblings. So, for now, I've
>> skipped building this file to unblock trunk.
>>
>> The linker failure itself looks similar to an issue [1289067] Dave
>> fixed upstream earlier in the year. However the fixed gccgo package is
>> indeed being used on the slave, so this requires extra investigation:
>>
>> # testmain
>> /tmp/go-build988982231/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-build988982231/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
>> ...
>>
>> I cannot reproduce the error with gccgo on amd64 or armhf, only on the
>> pcc64 machine.
>
> It fails for me on arm64 (in a freshly created trusty lxc).

FWIW, this sort of bug happens because the reboot library is on the
linker command line twice, once as

$WORK/github.com/juju/juju/api/reboot/_test/github.com/juju/juju/api/libreboot.a

which is the version compiled for the test and once as:

/home/ubuntu/goplay/pkg/gccgo_linux_arm64/github.com/juju/juju/api/libreboot.a

which is the installed version.  Usually the linker doesn't look into
the second one at all but for some reason on this occasion it is (the
gccgo integration into the go tool is a bit flaky).

> If I change the reboot_test to be an internal test, I guess an
> internal compiler error.

FWIW, it looks like it might be this bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61624

Cheers,
mwh

> Whee bugs!
>
> Cheers,
> mwh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20141017/f0014d75/attachment.pgp>


More information about the Juju-dev mailing list