pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Failure to build go on some 32bit port-i386 machines
On Tue, Apr 30, 2024 at 12:04:36PM +0200, Alexander Schreiber wrote:
> On Tue, Apr 30, 2024 at 12:52:55AM +0200, Alexander Schreiber wrote:
> > On Mon, Apr 29, 2024 at 04:14:52PM -0500, Jonathan A. Kollasch wrote:
> > > On Mon, Apr 29, 2024 at 10:04:26PM +0200, Alexander Schreiber wrote:
> > > > Hi,
> > > >
> > > > I've been trying to build node_exporter-1.7.0nb3 on an Alix machine
> > > > running port-i386 (CPU is an AMD Geode LX, i586 class, 32 bit), but with
> > > > no success. Building node_exporter requires building go121-1.21.8 which
> > > > requires go118-1.18.10nb1 which requires go14-1.4.3nb15. On the Alix,
> > > > building go118 reliably dies with SIGILL. The prebuilt node_exporter
> > > > package fetched via pkgin also has it's executable die with SIGILL
> > > > on early startup (internal Go setup according to the core dump).
> > > >
> > > > To narrow things down a little and because I don't have the hardware
> > > > to test, I ran qemu with various Intel 32 bit CPU emulation targets:
> > > > - i486: go14 dies with SIGILL in build
> > > > - pentium: go118 dies with SIGILL in build
> > > > - pentium3: go118 dies with SIGLL in build
> > > > - n270: successfull build of node_exporter with all go-versions
> > > > needed
> > > >
> > > > It looks like Go by now needs a sufficiently new 32 bit Intel (the n270
> > > > is the newest 32bit Intel CPU qemu seems to support) just to build.
> > > >
> > > > Does pkgsrc have a mechanism to signal:
> > > > - package is expected to build on arch ${arch-foo} (e.g. i386)
> > > > - but know not to build on CPUs X, Y, Z?
> > > >
> > > > I suspect there isn't such a thing?
> > > >
> > > > Also: NetBSD (10.0) _itself_ seems to be perfectly happy on that Alix,
> > > > it's just go that is ... particular.
> > > >
> > > > Kind regards,
> > > > Alex.
> > > > --
> > > > "Opportunity is missed by most people because it is dressed in overalls and
> > > > looks like work." -- Thomas A. Edison
> > >
> > > https://github.com/prometheus/node_exporter/issues/1568
> >
> > I've kicked off a build with the env-vars in that bug, will report
> > results.
>
> Set env-vars:
> export GOARCH=386
> export GO386=387
>
> and did make install for node_exporter. During the go118 build, that
> got as far as:
>
> ----- snip -----
>
> Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
> runtime
> runtime/internal/sys
> internal/abi
> internal/bytealg
> internal/goos
> internal/cpu
> internal/goarch
> runtime/internal/atomic
> runtime/internal/math
> internal/goexperiment
> unsupported setting GO386=387. Consider using GO386=softfloat instead.
>
> go tool dist: FAILED: /usr/pkgobj/lang/go118/work/go/pkg/tool/netbsd_386/compile -std -pack -o /tmp/go-tool-dist-551671284/internal/goarch/_go_.a -p internal/goarch -importcfg /tmp/go-tool-dist-551671284/internal/goarch/importcfg /usr/pkgobj/lang/go118/work/go/src/internal/goarch/goarch.go /usr/pkgounsupported setting GO386=387. Consider using GO386=softfloat instead.
>
> ----- snip -----
Ok, this is hilarious, tried setting GO386=softfloat as recommended
by the go tooling above and got:
---- snip ----
===> Configuring for go118-1.18.10nb1
=> Substituting "paths" in src/crypto/x509/root_solaris.go
=> Replacing bash interpreter in lib/time/update.bash misc/arm/a misc/cgo/fortran/test.bash misc/wasm/go_js_wasm_exec src/all.bash src/bootstrap.bash src/buildall.bash src/clean.bash src/cmd/compile/internal/ssa/gen/cover.bash src/cmd/go/mkalldocs.sh src/cmd/vendor/golang.org/x/sys/unix/mkall.sh src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh src/internal/trace/mkcanned.bash src/make.bash src/race.bash src/run.bash src/syscall/mkall.sh src/syscall/mkerrors.sh src/syscall/mksysnum_plan9.sh.
=> Replacing Perl interpreter in src/net/http/cgi/testdata/test.cgi src/regexp/syntax/make_perl_groups.pl src/syscall/*.pl.
===> Building for go118-1.18.10nb1
cd /usr/pkgobj/lang/go118/work/go/src && env GOROOT_BOOTSTRAP=/usr/pkg/go14 GOROOT_FINAL=/usr/pkg/go118 GOCACHE=/usr/pkgobj/lang/go118/work/.cache/go-build /usr/pkg/bin/bash ./make.bash -v
Building Go cmd/dist using /usr/pkg/go14. (go1.4.3 netbsd/386)
cmd/dist
# _/usr/pkgobj/lang/go118/work/go/src/cmd/dist
/usr/pkg/go14/pkg/tool/netbsd_386/8g: unsupported setting GO386=softfloat
---- snip ----
I _suspect_ that _might_ work by patching it in at the right point in the
middle of the build process, but that just feels bad.
So I tried building with only GOARCH=386 and that eventuell explodes
with SIGILL building go118:
---- snip ----
internal/goexperiment
SIGILL: illegal instruction
PC=0x80e5ba8
goroutine 1 [running]:
bootstrap/cmd/compile/internal/ssagen.(*state).zeroVal(0x192b0240, 0x1920bf80, 0x192efa40)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/ssagen/ssa.go:3711 +0x2a8 fp=0x1902b9ac sp=0x1902b96c
bootstrap/cmd/compile/internal/ssagen.(*state).zeroResults(0x192b0240)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/ssagen/ssa.go:661 +0x11c fp=0x1902ba20 sp=0x1902b9ac
bootstrap/cmd/compile/internal/ssagen.buildssa(0x192e3a00, 0x0, 0x0)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/ssagen/ssa.go:581 +0x1dc4 fp=0x1902bcdc sp=0x1902ba20
bootstrap/cmd/compile/internal/ssagen.Compile(0x192e3a00, 0x0)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/ssagen/pgen.go:183 +0x37 fp=0x1902bd80 sp=0x1902bcdc
bootstrap/cmd/compile/internal/gc.func·005(0x0)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/gc/compile.go:153 +0x3d fp=0x1902bd9c sp=0x1902bd80
bootstrap/cmd/compile/internal/gc.func·002(0x192c4460)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/gc/compile.go:125 +0x25 fp=0x1902bda4 sp=0x1902bd9c
bootstrap/cmd/compile/internal/gc.func·006(0x19200200, 0x31, 0x40)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/gc/compile.go:156 +0x11e fp=0x1902bde0 sp=0x1902bda4
bootstrap/cmd/compile/internal/gc.compileFunctions()
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/gc/compile.go:163 +0x24a fp=0x1902be28 sp=0x1902bde0
bootstrap/cmd/compile/internal/gc.Main(0x8b51f9c)
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/internal/gc/main.go:310 +0xd37 fp=0x1902bf74 sp=0x1902be28
main.main()
/usr/pkgobj/lang/go118/work/go/src/cmd/compile/main.go:55 +0x157 fp=0x1902bfcc sp=0x1902bf74
runtime.main()
/usr/pkg/go14/src/runtime/proc.go:63 +0xc6 fp=0x1902bff0 sp=0x1902bfcc
runtime.goexit()
/usr/pkg/go14/src/runtime/asm_386.s:2287 +0x1 fp=0x1902bff4 sp=0x1902bff0
eax 0x0
ebx 0x1920bf80
ecx 0x8
edx 0x0
edi 0x1902b9b8
esi 0x192b0240
ebp 0x1920bf80
esp 0x1902b96c
eip 0x80e5ba8
eflags 0x10246
cs 0x17
fs 0xab
gs 0xb3
go tool dist: FAILED: /usr/pkgobj/lang/go118/work/go/pkg/tool/netbsd_386/compile -std -pack -o /tmp/go-tool-dist-423608706/runtime/internal/atomic/_go_.a -p runtime/internal/atomic -importcfg /tmp/go-tool-dist-423608706/runtime/internal/atomic/importcfg -asmhdr /tmp/go-tool-dist-423608706/runtime/internal/atomic/go_asm.h -symabis /tmp/go-tool-dist-423608706/runtime/internal/atomic/symabis /usr/pkgobj/lang/go118/work/go/src/runtime/internal/atomic/atomic_386.go /usr/pkgobj/lang/go118/work/go/src/runtime/internal/atomic/doc.go /usr/pkgobj/lang/go118/work/go/src/runtime/internal/atomic/stubs.go /usr/pkgobj/lang/go118/work/go/src/runtime/internal/atomic/types.go /usr/pkgobj/lang/go118/work/go/src/runtime/internal/atomic/unaligned.go: exit status 2
---- snip ----
I'll do some more testing with different emulated i386 CPUs in qemu,
but it's not looking too good for the time being.
Kind regards,
Alex.
--
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison
Home |
Main Index |
Thread Index |
Old Index