goxx
goxx copied to clipboard
ERROR version `GLIBC_2.34' not found when using osxcross
Support guidelines
- [X] I've read the support guidelines
I've found a bug and checked that ...
- [X] ... the documentation does not mention anything about my problem
- [X] ... there are no open or closed issues that are related to my problem
Description
Hi,
When I'm using osxcross:14.5 to build with CGO, the build return the error :
o64-clang: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by o64-clang)
I don't have this problem with osxcross:13.1 I can build my artifact.
The version of libc present in the container is 2.31.
Expected behaviour
Build
Actual behaviour
Not build
Steps to reproduce
Try to build a Go program for Darwin arm/amd with CGO enabled and MacOS SDK header required.
Docker info
Client:
Version: 27.2.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.16.2
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.29.2
Path: /usr/lib/docker/cli-plugins/docker-compose
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 23
Server Version: 27.2.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 nvidia runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111.m
runc version:
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.7.12-1-MANJARO
Operating System: Manjaro Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.36GiB
Name: yokann-xps
ID: 64149e4c-109f-4d2e-b86f-fbfa3d280fa0
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Default Address Pools:
Base: 172.39.0.0/16, Size: 24
Logs
0.290 GO111MODULE='auto'
0.290 GOARCH='amd64'
0.290 GOBIN=''
0.290 GOCACHE='/root/.cache/go-build'
0.290 GOENV='/root/.config/go/env'
0.290 GOEXE=''
0.290 GOEXPERIMENT=''
0.290 GOFLAGS=''
0.290 GOHOSTARCH='amd64'
0.290 GOHOSTOS='linux'
0.290 GOINSECURE=''
0.290 GOMODCACHE='/go/pkg/mod'
0.290 GONOPROXY=''
0.290 GONOSUMDB=''
0.290 GOOS='darwin'
0.290 GOPATH='/go'
0.290 GOPRIVATE=''
0.290 GOPROXY='https://proxy.golang.org,direct'
0.290 GOROOT='/usr/local/go'
0.290 GOSUMDB='sum.golang.org'
0.290 GOTMPDIR=''
0.290 GOTOOLCHAIN='auto'
0.290 GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
0.290 GOVCS=''
0.290 GOVERSION='go1.23.0'
0.290 GODEBUG=''
0.290 GOTELEMETRY='local'
0.290 GOTELEMETRYDIR='/root/.config/go/telemetry'
0.290 GCCGO='gccgo'
0.290 GOAMD64='v1'
0.290 AR='ar'
0.290 CC='o64-clang'
0.290 CXX='o64-clang++'
0.290 CGO_ENABLED='1'
0.290 GOMOD='/src/go.mod'
0.290 GOWORK=''
0.290 CGO_CFLAGS='-O2 -g'
0.290 CGO_CPPFLAGS=''
0.290 CGO_CXXFLAGS='-O2 -g'
0.290 CGO_FFLAGS='-O2 -g'
0.290 CGO_LDFLAGS='-O2 -g'
0.290 PKG_CONFIG='pkg-config'
0.290 GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4218415607=/tmp/go-build -gno-record-gcc-switches -fno-common'
0.372 runtime/cgo
0.374 # runtime/cgo
0.374 o64-clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by o64-clang)
0.374 o64-clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by o64-clang)
Additional info
No response
It seems updating ubuntu to 24.10 in the base image fix the issue.