Skip to content
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

cmd/go: 1.15.6 produces the error _cgo_export.c:3:10: fatal error: 'stdlib.h' file not found #43467

Closed
ruralcoder opened this issue Jan 2, 2021 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@ruralcoder
Copy link

What version of Go are you using (go version)?

go version go1.15.6 darwin/amd64

$ go version

Does this issue reproduce with the latest release?

YES

When I rolled back to go version go1.15.5 darwin/amd64 the problem went away.

What operating system and processor architecture are you using (go env)?

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/starlord/Library/Caches/go-build"
GOENV="/Users/starlord/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/starlord/Developer/golang/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/starlord/Developer/golang"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/starlord/Developer/hackemy.go/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/96/vqf03z055x15lptgs5lw7c700000gq/T/go-build798066734=/tmp/go-build -gno-record-gcc-switches -fno-common"

go env Output
$ go env

What did you do?

go run .

What did you expect to see?

Run my program

What did you see instead?

_cgo_export.c:3:10: fatal error: 'stdlib.h' file not found

again, when I rolled back to go version go1.15.5 darwin/amd64 the problem went away.

@ianlancetaylor
Copy link
Contributor

I don't see anything that change between 1.15.5 and 1.15.6 that could cause this to happen.

What is the output of go run -x with both releases? Thanks.

@ianlancetaylor ianlancetaylor changed the title 1.15.6 produces the error _cgo_export.c:3:10: fatal error: 'stdlib.h' file not found cmd/go: 1.15.6 produces the error _cgo_export.c:3:10: fatal error: 'stdlib.h' file not found Jan 4, 2021
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 4, 2021
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants