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

# runtime/cgo cgo: exec /missing-cc: fork/exec /missing-cc: no such file or directory #52064

Closed
xuegege5290 opened this issue Mar 31, 2022 · 1 comment

Comments

@xuegege5290
Copy link

xuegege5290 commented Mar 31, 2022

root@docker-dev:test:/go/src# cat hello.go
package main

//import "fmt"

import "C"

func main() {
//fmt.Println("Hello, world")
C.puts(C.CString("Hello, World\n"))
}
root@docker-dev:test:/go/src# CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ AR=x86_64-pc-linux-gnu-ar go build hello.go
runtime/cgo
cgo: exec /missing-cc: fork/exec /missing-cc: no such file or directory

root@docker-dev:test:/go/src# CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOARM=7 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ AR=x86_64-pc-linux-gnu-ar go build hello.go
runtime/cgo
cgo: exec /missing-cc: fork/exec /missing-cc: no such file or directory

root@docker-dev:test:/go/src# go version
go version go1.15.7 linux/amd64

root@docker-dev:test:~# go env
GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build464463100=/tmp/go-build -gno-record-gcc-switches"

@seankhliao
Copy link
Member

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

@golang golang locked and limited conversation to collaborators Apr 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants