Merge ~sergiodj/ubuntu/+source/golang-1.16:fix-ftbfs-i386-bionic into ubuntu/+source/golang-1.16:ubuntu/bionic-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | git-ubuntu bot | ||||
Approved revision: | not available | ||||
Merged at revision: | 8dc37ba7021962f0bbe7dbffa9411ee1fa26fd88 | ||||
Proposed branch: | ~sergiodj/ubuntu/+source/golang-1.16:fix-ftbfs-i386-bionic | ||||
Merge into: | ubuntu/+source/golang-1.16:ubuntu/bionic-devel | ||||
Diff against target: |
64 lines (+20/-3) 4 files modified
debian/changelog (+9/-0) debian/control (+2/-1) debian/control.in (+2/-1) debian/helpers/goenv.sh (+7/-1) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
git-ubuntu bot | Approve | ||
Lucas Kanashiro (community) | Approve | ||
Canonical Server packageset reviewers | Pending | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+427997@code.launchpad.net |
Description of the change
This MP fixes the current FTBFS that's affecting golang-1.16 on Bionic/i386.
The problem is that golang-1.16 doesn't support using "GO386=387" anymore when bootstrapping, which is what the Debian/Ubuntu golang always use when building (see the file d/helpers/goenv.sh and the Debian bug http://
The change I'm proposing here is that we only set "GO386=387" when *not* building for i386, and leave the variable empty otherwise. This works, but has a drawback: when "GO386" is not set and we're building for i386, this means that the generated go binary will use SSE2 instructions, which ultimately means that they will be unable to run on old CPUs (e.g., CPUs older than Intel Pentium 4 and AMD Opteron/Athlon 64). I am not sure whether it'd make sense to add an explict Depends on "sse2-support [any-i386]" for this package, but I decided to do so anyway.
There's a PPA with the proposed change here:
https:/
The package doesn't have any dep8 tests. In order to test it, I'd recommend firing up a Bionic/i386 LXD container and installing it there.
Thanks for the patch Sergio, appreciated!
Your solution (not setting GO386 variable in i386) seems to be the right way to go, and it indeed fixed the FTBFS as we can see in your PPA. I was thinking about the sse2-support runtime dependency, it would be better if we could keep the needed changes minimal (not needing that), but we could also hit the unlikely case where users would try to install it in a machine which does not support SSE2 instruction set.
I launched a container and installed the package, ran a simple script and it worked well.
I +1 the changes. Please, when uploading the package also include the previous changelog entry in the changes file.