Snapd master fails on zesty/ppc64el with R_PPC64_ADDR16_HA for symbol `' out of range

The builds of snapd git master (and 2.28~rc1) fail on ppc64el in zesty (only there) with the following error message:

/tmp/go-build312455947/github.com/snapcore/snapd/cmd/snap-seccomp/_test/snap-seccomp.test: error while loading shared libraries: R_PPC64_ADDR16_HA re115ff6af8 for symbol `’ out of range
exit status 127

One full build log is here: https://launchpad.net/~snappy-dev/+archive/ubuntu/edge/+build/13338127

This looks related to bug https://bugs.launchpad.net/ubuntu/+source/containerd/+bug/1711935 but in this bugreport a rebuild fixes it which is clearly not the case for us. I also rebuild without -buildmode=pie but that did not have any effects for the error.

Oh I’m pretty sure I know this one, it’s some kind of toolchain bug where gcc produces PIE binaries even though it’s not supposed to and so ends up with massive numbers of relocations against the text segment and for some reason this fails. The latter bit is odd, this is supposed to work, but the first part is a real bug too and fixing that will fix the bug. I didn’t realize this bug was still extant :frowning:

Ah, it’s not really a toolchain bug, more a go bug, we need https://go-review.googlesource.com/c/go/+/33106 which is part of 1.8 but not 1.7 which is the default in zesty.

It is still a bug that these executables don’t run, mind.

I tried various combinations of buildmode= now in 17.04 on ppc64el, they all fail in different ways. So it seems like we need to fix go itself with the patch from https://go-review.googlesource.com/c/go/+/33106 and SRU that.

I uploaded a backport of the linked fix for go1.7 to our image PPA: https://launchpad.net/~snappy-dev/+archive/ubuntu/edge/+sourcepub/8383669/+listing-archive-extra - this appears to have fixed the issue. Lets do the SRU paperwork to unblock this issue (or I’m open for other ideas how to move forward :slight_smile:

I reported created the SRU bugreport at https://bugs.launchpad.net/ubuntu/+source/golang-1.7/+bug/1726706 and uploaded a SRU to the unapproved queue https://launchpad.net/ubuntu/zesty/+queue?queue_state=1&queue_text= for zesty-proposed.

1 Like