Description
Go version
1.21.5
What operating system and processor architecture are you using (go env
)?
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/runner/.cache/go-build'
GOENV='/home/runner/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/runner/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/runner/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/hostedtoolcache/go/1.21.5/x64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/hostedtoolcache/go/1.21.5/x64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/runner/work/caddy/caddy/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build498393660=/tmp/go-build -gno-record-gcc-switches'
What did you do?
Trying to (cross-)compile Caddy for AIX with the following command
GOOS=AIX GOARCH=ppc64 go build -trimpath -o caddy
What did you expect to see?
Successful compilation and build
What did you see instead?
The compilation fails with errors about unix.Flock
not existing:
$ GOOS=aix GOARCH=ppc64 go build
# github.com/dgraph-io/badger
../../../../go/pkg/mod/github.com/dgraph-io/[email protected]/dir_unix.go:63:13: undefined: unix.Flock
# github.com/dgraph-io/badger/v2
../../../../go/pkg/mod/github.com/dgraph-io/badger/[email protected]/dir_unix.go:62:13: undefined: unix.Flock
The error points to the absence of Flock
syscall for AIX in the golang.org/x/sys/unix
package. I searched the respective directory within the package, and indeed the function is missing. AIX documentation documents the syscall Flock
exists (see: flock.h File, and lockfx, lockf, flock, or lockf64 Subroutine). I understand the syscalls definitions in the package are generated, so whatever source or script used to generate them is resulting in the gap.
As of now, we're only aware of the Flock
function missing because it directly impacts us (see caddyserver/caddy#5970), but others may be missing and subject to verification.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status