Skip to content

gcc_linux_amd64 compiler error #73441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MasterDimmy opened this issue Apr 19, 2025 · 3 comments
Closed

gcc_linux_amd64 compiler error #73441

MasterDimmy opened this issue Apr 19, 2025 · 3 comments
Labels
BugReport Issues describing a possible bug in the Go implementation.

Comments

@MasterDimmy
Copy link

MasterDimmy commented Apr 19, 2025

Go version

go version go1.24.2 windows/amd64

Output of go env in your module/workspace:

set AR=ar
set CC=gcc
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_ENABLED=1
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set CXX=g++
set GCCGO=gccgo
set GO111MODULE=
set GOAMD64=v1
set GOARCH=amd64
set GOAUTH=netrc
set GOBIN=
set GOCACHE=C:\Users\1\AppData\Local\go-build
set GOCACHEPROG=
set GODEBUG=
set GOENV=C:\Users\1\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFIPS140=off
set GOFLAGS=
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=E:\TEMP\go-build333069533=/tmp/go-build -gno-record-gcc-switches
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMOD=M:\Projects\AY\reverse_browser\go.mod
set GOMODCACHE=D:\gopath\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\gopath
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\go
set GOSUMDB=sum.golang.org
set GOTELEMETRY=off
set GOTELEMETRYDIR=C:\Users\1\AppData\Roaming\go\telemetry
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=D:\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.24.2
set GOWORK=
set PKG_CONFIG=pkg-config

What did you do?

set GOOS=linux
set GOARCH=amd64
go build -race -o test     
                                                                                                                                                                                                                                                                                                                                     server>go build -race -o test                                                                                                                                                   # 
runtime/cgo                                                                                                                                                                                                      
gcc_linux_amd64.c: In function '_cgo_sys_thread_start':                                                                                                                                                            
gcc_linux_amd64.c:57:9: error: unknown type name 'sigset_t'; did you mean '_sigset_t'?                                                                                                                                
57 |         sigset_t ign, oset;                                                                                                                                                                                      
|         ^~~~~~~~                                                                                                                                                                                                 
|         _sigset_t                                                                                                                                                                                          
gcc_linux_amd64.c:62:9: error: implicit declaration of function 'sigfillset' [-Werror=implicit-function-declaration]                                                                                                  
62 |         sigfillset(&ign);                                                                                                                                                                                        
|         ^~~~~~~~~~                                                                                                                                                                                         
gcc_linux_amd64.c:57:23: error: unused variable 'oset' [-Werror=unused-variable]                                                                                                                                      
57 |         sigset_t ign, oset;                                                                                                                                                                                      
|                       ^~~~                                                                                                                                                                                 
cc1.exe: all warnings being treated as errors                                                                         

What did you see happen?

errors

What did you expect to see?

ok

@MasterDimmy
Copy link
Author

This is after:

server>gox -os="linux" -arch="amd64" -ldflags="-s -X main.appVersion=b29247801db7df22790561efc98541b1cbebe591 -X main.appBuild=19.04.2025_4_36_11_98" -gcflags="-race" 

        Number of parallel builds: 3                                                                                                                                                                                                                                                                                                                                                                                                          -->     linux/amd64: server/cmd/server                                                                                                                                                                                                                                                                                                                                                                                                1 errors occurred:                                                                                                                                                                                                 --> linux/amd64 error: exit status 1                                                                                                                                                                               Stderr: # server/cmd/server                                                                                                                                                                                        link: reference to undefined builtin "runtime.racefuncenter" from package "main"                                                                                                                

This also fails.

M:\server>set GOOS=linux                                                                                                                                                                                                                                                                                                                                                                              
M:\server>set GOARCH=amd64                                                                                                                                                                                                                                                                                                                                                                            
M:\server>go build -race -ldflags="-s -X main.appVersion=b29247801db7df22790561efc98541b1cbebe591 -X main.appBuild=19.04.2025_4_39_20_95"                                          

-race is not supported on linux /amd64                                                                                                                          

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 19, 2025
@seankhliao
Copy link
Member

that looks like something wrong in your environment, eg look at the extra space in the error about race

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation.
Projects
None yet
Development

No branches or pull requests

3 participants