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/ error while loading shared libraries: R_PPC64_ADDR16_HA re115ff6af8 for symbol `’ out of range
exit status 127

One full build log is here:

This looks related to bug 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 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 and SRU that.

I uploaded a backport of the linked fix for go1.7 to our image PPA: - 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 and uploaded a SRU to the unapproved queue for zesty-proposed.

1 Like