-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version
)?
I am running go 1.16.5, but I am also testing go 1.17rc1:
$ go1.17rc1 version go version go1.17rc1 linux/amd64 $ go version go version go1.16.5 linux/amd64
Does this issue reproduce with the latest release?
It's ok with the latest stable release (1.16.5), not with 1.17rc1
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOOS="linux"
I am running Archlinux, fully up to date as of July 15 2021, 10:15 BST. I am running in an LXD container (LXD 4.16)
go env
Output
$ go1.17rc1 env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/unix/.cache/go-build" GOENV="/home/unix/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/unix/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/unix/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/unix/sdk/go1.17rc1" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/unix/sdk/go1.17rc1/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.17rc1" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" 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=/tmp/go-build640958217=/tmp/go-build -gno-record-gcc-switches"
What did you do?
This is the full script of what I ran:
I [unix@go117 foo]$ go1.17rc1 mod init foo go: creating new go.mod: module foo I [unix@go117 foo]$ ed main.go main.go: No such file or directory a package main import ( . "github.com/lyderic/tools" ) func main(){ Cyanln("Hello, World!") } . wq 98 I [unix@go117 foo]$ go1.17rc1 mod tidy go: finding module for package github.com/lyderic/tools go: downloading github.com/lyderic/tools v0.3.4 go: found github.com/lyderic/tools in github.com/lyderic/tools v0.3.4 go: downloading github.com/fatih/color v1.10.0 go: downloading github.com/sendgrid/sendgrid-go v3.10.0+incompatible go: downloading github.com/wayneashleyberry/terminal-dimensions v1.0.0 go: downloading github.com/mattn/go-colorable v0.1.8 go: downloading github.com/mattn/go-isatty v0.0.12 go: downloading github.com/sendgrid/rest v2.6.4+incompatible go: downloading github.com/stretchr/testify v1.7.0 go: downloading golang.org/x/sys v0.0.0-20210423082822-04245dca01da go: downloading golang.org/x/net v0.0.0-20210614182718-04defd469f4e go: downloading github.com/davecgh/go-spew v1.1.0 go: downloading github.com/pmezard/go-difflib v1.0.0 go: downloading gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c I [unix@go117 foo]$ go1.17rc1 build \# runtime/cgo cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH I [unix@go117 foo]$ go build I [unix@go117 foo]$ ./foo Hello, World!
What did you expect to see?
With go 1.16.5, the above program compiles with no error. I use only one external lib: github.com/lyderic/tools
What did you see instead?
With go 1.17rc1, I get the following error:
$ go1.17rc1 build
# runtime/cgo
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
Note: if I install gcc, the error (obviously) goes away. However, the program compiles with no gcc installed if I compile with go 1.16.5, so there might be a bug.
Thanks
L.
alashti and ecolytics-tech
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.