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

Open
ruralcoder opened this issue Jan 2, 2021 · 1 comment

Comments

@ruralcoder
Copy link

@ruralcoder ruralcoder commented Jan 2, 2021

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

@ianlancetaylor ianlancetaylor commented Jan 4, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.