golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.89k stars 17.65k forks source link

runtime, syscall: we require pipe2 but Solaris before 11.4 reportedly does not have it #56499

Open drook opened 2 years ago

drook commented 2 years ago

Env: Solaris: SunOS hyperion 5.11 11.3 i86pc i386 i86pc GCC:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/lto-wrapper
Target: i386-pc-solaris2.11
Configured with: /builds/hudson/workspace/nightly-update/build/i386/components/gcc48/gcc-4.8.2/configure CC=/usr/gcc/4.7/bin/gcc CXX=/usr/gcc/4.7/bin/g++ --prefix=/usr/gcc/4.8 --mandir=/usr/gcc/4.8/share/man --bindir=/usr/gcc/4.8/bin --libdir=/usr/gcc/4.8/lib --sbindir=/usr/gcc/4.8/sbin --infodir=/usr/gcc/4.8/share/info --libexecdir=/usr/gcc/4.8/lib --enable-languages=c,c++,fortran,objc --enable-shared --with-gmp-include=/usr/include/gmp --with-mpfr-include=/usr/include/mpfr --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/usr/gnu/bin/as CFLAGS='-g -O2  -mtune=opteron -march=opteron' CXXFLAGS='-g -O2 -mtune=opteron -march=opteron'
Thread model: posix
gcc version 4.8.2 (GCC)

Building toolchain:

[root@hyperion src]# pwd
/home/emz/src/go-go1.19.2/src
[root@hyperion src]# export CFLAGS="-g -m64"
[root@hyperion src]# export CXXFLAGS="-g -m64"
[root@hyperion src]# export LDFLAGS="-g -m64"
[root@hyperion src]# export PKG_CONFIG_PATH=/usr/local/pkgconf/lib
[root@hyperion src]# export GOROOT_BOOTSTRAP=/usr/local/go-1.4.3
[root@hyperion src]# rm -rf ../../go-solaris-amd64-bootstrap
[root@hyperion src]# GOOS=solaris GOARCH=amd64 ./bootstrap.bash
#### Copying to ../../go-solaris-amd64-bootstrap

#### Cleaning ../../go-solaris-amd64-bootstrap

#### Building ../../go-solaris-amd64-bootstrap

Building Go cmd/dist using /usr/local/go-1.4.3. (go1.4.3 solaris/amd64)
Building Go toolchain1 using /usr/local/go-1.4.3.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
ld.so.1: go_bootstrap: fatal: relocation error: file /home/emz/src/go-solaris-amd64-bootstrap/pkg/tool/solaris_amd64/go_bootstrap: symbol pipe2: referenced symbol not found
ld.so.1: go_bootstrap: fatal: relocation error: file /home/emz/src/go-solaris-amd64-bootstrap/pkg/tool/solaris_amd64/go_bootstrap: symbol pipe2: referenced symbol not foundgo tool dist: FAILED: /home/emz/src/go-solaris-amd64-bootstrap/pkg/tool/solaris_amd64/go_bootstrap install -i cmd/asm cmd/cgo cmd/compile cmd/link: signal: killed

Doesn't matter if I'm trying to built 32bit or 64 bit version of go binaries, the error stack is the same.

drook commented 2 years ago

Seems like pipe2() call is missing on Solaris 11.x versions < 11.4. Sad.

ianlancetaylor commented 2 years ago

CC @tklauser @golang/solaris

Looks like Solaris 11.4 came out in 2018. Would it be reasonable to make that a minimal requirement for Go support?

bcmills commented 2 years ago

Would it be reasonable to make that a minimal requirement for Go support?

More generally: in order to detect regressions on a given port, the builder(s) for that port should be running the oldest OS version, and (ideally) also the newest OS version supported by the port. Since there is only one Solaris builder running (solaris-amd64-oraclerel), the supported version range for Solaris is de facto exactly whatever version that builder happens to have installed. 😅

mknyszek commented 2 years ago

In triage: I think @bcmills is right; if we're not testing it I'm not sure we support that version. I was going to assign this to @golang/solaris but there doesn't appear to be anyone in there... @thanm notes that @rorth is the owner of the builder. Are you still actively maintaining the Solaris port?

CC @golang/illumos since this might be relevant to you as well.

jclulow commented 2 years ago

We've had pipe2() since 2013 so I believe we're good on the illumos front. Thanks for checking!

rorth commented 2 years ago

In triage: I think @bcmills is right; if we're not testing it I'm not sure we support that version. I was going to assign this to @golang/solaris but there doesn't appear to be anyone in there... @thanm notes that @rorth is the owner of the builder. Are you still actively maintaining the Solaris port?

While the solaris-amd64-oraclerel builder does indeed run the latest Solaris 11.4 SRU/update, @ianlancetaylor regularly imports golang into the GCC tree when a golang release approaches, which still supports both Solaris 11.3 and 11.4, both being tested regularly. Thus I'd very much appreciate if support for targets without pipe2 could remain.

That said, I've never really maintained the Solaris port. I've inherited the builder from @binarycrusader long ago and keep it running, the primary intent being to keep golang building and avoid unpleasant surprises once the next import into the GCC tree happens. Apart from that, I try to investigate specific issues if prompted or if I notice ongoing build failures.

mknyszek commented 1 year ago

If we don't have any maintainers for the Solaris port, that's not great. The port is not currently broken, but by the new port policy (#53383) if it gets into a broken state and nobody fixes it, it may end up getting removed.

Perhaps we should post on golang-dev looking for an owner. @rorth, @binarycrusader, @jclulow if you know anyone that might be interested please reach out to them if you have time.

For this particular issue, I think if we are supporting Solaris 11.3 indirectly through gccgo (and libruntime/libgo) then:

  1. We should state that explicitly.
  2. We need someone to remove reliance on pipe2 (presumably whoever the new owner is, or a volunteer).

Marking as help wanted.