FTBFS on Bionic/i386

Bug #1983742 reported by Sergio Durigan Junior
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Go
New
Unknown
golang-1.16 (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
High
Sergio Durigan Junior

Bug Description

[ Impact ]

golang-1.16 is currently FTBFSing on Bionic/i386:

https://launchpad.net/ubuntu/+source/golang-1.16/1.16.2-0ubuntu1~18.04.1/+build/24101938

Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
unsupported setting GO386=387. Consider using GO386=softfloat instead.

unsupported setting GO386=387. Consider using GO386=softfloat instead.

go tool dist: FAILED: /<<PKGBUILDDIR>>/pkg/tool/linux_386/compile -std -pack -o /tmp/go-tool-dist-404527298/runtime/internal/sys/_go_.a -p runtime/internal/sys -importcfg /tmp/go-tool-dist-404527298/runtime/internal/sys/importcfg -asmhdr /tmp/go-tool-dist-404527298/runtime/internal/sys/go_asm.h -symabis /tmp/go-tool-dist-404527298/runtime/internal/sys/symabis /<<PKGBUILDDIR>>/src/runtime/internal/sys/arch.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/arch_386.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/intrinsics_common.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/intrinsics_stubs.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/stubs.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/sys.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/zgoarch_386.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/zgoos_linux.go /<<PKGBUILDDIR>>/src/runtime/internal/sys/zversion.go: exit status 1
go tool dist: FAILED: /<<PKGBUILDDIR>>/pkg/tool/linux_386/compile -std -pack -o /tmp/go-tool-dist-404527298/internal/cpu/_go_.a -p internal/cpu -importcfg /tmp/go-tool-dist-404527298/internal/cpu/importcfg -asmhdr /tmp/go-tool-dist-404527298/internal/cpu/go_asm.h -symabis /tmp/go-tool-dist-404527298/internal/cpu/symabis /<<PKGBUILDDIR>>/src/internal/cpu/cpu.go /<<PKGBUILDDIR>>/src/internal/cpu/cpu_386.go /<<PKGBUILDDIR>>/src/internal/cpu/cpu_x86.go: exit status 1
go tool dist: open /tmp/go-tool-dist-404527298/internal/cpu/_go_.a: no such file or directory
go tool dist: open /tmp/go-tool-dist-404527298/runtime/internal/sys/_go_.a: no such file or directory
go tool dist: open /tmp/go-tool-dist-404527298/runtime/internal/atomic/_go_.a: no such file or directory
unsupported setting GO386=387. Consider using GO386=softfloat instead.

[ Test Plan ]

The package should build and work correctly on i386.

[ Where problems could occur ]

The fix is aimed specifically at fixing the i386 compilation, so it shouldn't affect other architectures. Moreover, the package hasn't been published to the regular Ubuntu user yet, so there is virtually no chance to introduce a regression. However, the fact that the generated Go binary will use SSE2 instructions on i386 will make it not run on old CPUs.

[ Other Info ]

The fix involves unsetting the "GO386" variable when compiling for Bionic/i386. This makes the build pass, but has the drawback of making the generated Go binary use SSE2 instructions, which means that it will not run on older CPUs (older than Pentium 4 and AMD Opteron/Athlon 64). For this reason, I've decided to extend the fix and make the Go binary package explicitly depend on "sse2-support".

It is possible to bootstrap golang-1.16 using "GO386=softfloat", but it requires using golang >= 1.14, which we don't have in Bionic.

Related branches

Changed in golang-1.16 (Ubuntu Bionic):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in golang-1.16 (Ubuntu):
status: In Progress → Invalid
importance: High → Undecided
assignee: Sergio Durigan Junior (sergiodj) → nobody
summary: - FTBFS on i386
+ FTBFS on Bionic/i386
description: updated
Changed in golang:
status: Unknown → New
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Would a two-stage build on i386 be another way to address this, like outlined in https://github.com/golang/go/issues/44500#issuecomment-784675990 ?

"""
export GO386='softfloat'
GO386= ./bootstrap.bash
export GOROOT_BOOTSTRAP="../../go-$GOOS-$GOARCH-bootstrap"
./make.bash
"""

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote : Re: [Bug 1983742] Re: FTBFS on Bionic/i386

On Wednesday, September 14 2022, Andreas Hasenack wrote:

> Would a two-stage build on i386 be another way to address this, like
> outlined in
> https://github.com/golang/go/issues/44500#issuecomment-784675990 ?
>
> """
> export GO386='softfloat'
> GO386= ./bootstrap.bash
> export GOROOT_BOOTSTRAP="../../go-$GOOS-$GOARCH-bootstrap"
> ./make.bash
> """

Unfortunately no. I remember having tried to do this 2-stage build and
bumping into another failure.

I believe that not using GO387 when compiling for i386 is the proper
(and apparently the only) way to go here.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

tags: added: cetest
tags: removed: cetest
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Sergio, or anyone else affected,

Accepted golang-1.16 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.16/1.16.2-0ubuntu1~18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in golang-1.16 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :
tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
tags: removed: server-todo
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang-1.16 - 1.16.2-0ubuntu1~18.04.2

---------------
golang-1.16 (1.16.2-0ubuntu1~18.04.2) bionic; urgency=medium

  * d/helpers/goenv.sh: Don't set GO386 when building on i386.
    (LP: #1983742)
  * d/control{,.in}: Make golang-X.Y-go depend on sse2-support on
    i386.

golang-1.16 (1.16.2-0ubuntu1~18.04.1) bionic; urgency=medium

  * Backport to Bionic (LP: #1967425, #1960449).
    - Downgrade debhelper to compat level 11.
    - Remove Breaks: dh-golang (<< 1.43~).
      dh-golang/1.34.2 is available in Bionic. If you need any feature from
      newer dh-golang please try to implement it directly in the affected
      package. As reference take a look at LP #1967425.

 -- Sergio Durigan Junior <email address hidden> Fri, 05 Aug 2022 23:26:55 -0400

Changed in golang-1.16 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for golang-1.16 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.