While I can't tell you the exact Ubuntu version, I would expect 20.04LTS to 
be problematic at this point. You could try with a devcontainer and a more 
recent Ubuntu base image, from the 24.04LTS era, installing more recent 
kernel headers into the devcontainer than the kernel the devcontainer is 
deployed on. There is a well-maintained go devcontainer feature by 
Microsoft to install specific or the latest stable Go toolchain into the 
devcontainer if necessary. A devcontainer is a Docker/OCI container used 
for development, well supported in VSCode, created from simple json 
configurations, which are modular thanks to the feature mechanism. No need 
for a separate VM, just Docker.

On Wednesday, August 27, 2025 at 8:08:56 AM UTC+2 mr....@gmail.com wrote:

> Hello,
>
> I am attempting to generate new system calls for Golang's syscall package. 
> While running ./mkall.sh on Ubuntu 20.04.6 LTS AARCH64, I consistently 
> encounter the following error:
> plaintext
> ./zsyscall_linux_arm64.go:1336:23: undefined: SYS_SYNC_FILE_RANGE2 go tool 
> cgo: signal: broken pipe
>
> This issue suggests that SYS_SYNC_FILE_RANGE2 is not defined in the 
> context of the build. Could someone advise which Linux distribution (and 
> version) is recommended for successfully generating system calls for 
> AARCH64?
>
> Thank you in advance for your guidance!
>
>
>
> Linux lima-default 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:55:34 
> UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
>
>
> AR='ar'
> CC='gcc'
> CGO_CFLAGS='-O2 -g'
> CGO_CPPFLAGS=''
> CGO_CXXFLAGS='-O2 -g'
> CGO_ENABLED='1'
> CGO_FFLAGS='-O2 -g'
> CGO_LDFLAGS='-O2 -g'
> CXX='g++'
> GCCGO='gccgo'
> GO111MODULE=''
> GOARCH='arm64'
> GOARM64='v8.0'
> GOAUTH='netrc'
> GOBIN=''
> GOCACHE='/home/dingli.linux/.cache/go-build'
> GOCACHEPROG=''
> GODEBUG=''
> GOENV='/home/dingli.linux/.config/go/env'
> GOEXE=''
> GOEXPERIMENT=''
> GOFIPS140='off'
> GOFLAGS=''
> GOGCCFLAGS='-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 
> -ffile-prefix-map=/tmp/go-build1072417917=/tmp/go-build 
> -gno-record-gcc-switches'
> GOHOSTARCH='arm64'
> GOHOSTOS='linux'
> GOINSECURE=''
> GOMOD='/home/dingli.linux/work/go/src/go.mod'
> GOMODCACHE='/home/dingli.linux/go/pkg/mod'
> GONOPROXY=''
> GONOSUMDB=''
> GOOS='linux'
> GOPATH='/home/dingli.linux/go'
> GOPRIVATE=''
> GOPROXY='https://proxy.golang.org,direct'
> GOROOT='/home/dingli.linux/work/go'
> GOSUMDB='sum.golang.org'
> GOTELEMETRY='local'
> GOTELEMETRYDIR='/home/dingli.linux/.config/go/telemetry'
> GOTMPDIR=''
> GOTOOLCHAIN='auto'
> GOTOOLDIR='/home/dingli.linux/work/go/pkg/tool/linux_arm64'
> GOVCS=''
> GOVERSION='go1.26-devel_77f911e31c Fri Aug 15 18:10:28 2025 -0700'
> GOWORK=''
> PKG_CONFIG='pkg-config'
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/1f736bf4-5e0d-4ddb-8279-ae067d2a8778n%40googlegroups.com.

Reply via email to