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

x/vgo: vgo env CC/CXX is set to clang/clang++ on ubuntu #26570

Closed
lgarithm opened this issue Jul 24, 2018 · 2 comments

Comments

@lgarithm
Copy link

commented Jul 24, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10.3 linux/amd64 vgo:devel +88c76dcbab

Does this issue reproduce with the latest release?

Yes, I installed vgo via go get -u golang.org/x/vgo

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/root/local/go"
GOTMPDIR=""
GOTOOLDIR="/root/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build871799158=/tmp/go-build -gno-record-gcc-switches"

but vgo env is

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY=""
GORACE=""
GOROOT="/root/local/go"
GOTMPDIR=""
GOTOOLDIR="/root/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/root/tmp/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=/tmp/go-build430569664=/tmp/go-build -gno-record-gcc-switches"

What did you do?

run vgo env CC

What did you expect to see?

gcc

What did you see instead?

clang

This also caused a compile error if you build a simple program like:

package main 

import "net/http"

func main() {
	http.ListenAndServe(":8080", nil)
}
vgo build -v . 
golang_org/x/crypto/cryptobyte/asn1
golang_org/x/crypto/curve25519
runtime/cgo
golang_org/x/crypto/poly1305
# runtime/cgo
exec: "clang": executable file not found in $PATH
golang_org/x/text/transform
golang_org/x/crypto/chacha20poly1305/internal/chacha20
golang_org/x/net/http2/hpack
golang_org/x/text/unicode/bidi
golang_org/x/crypto/cryptobyte
golang_org/x/crypto/chacha20poly1305
golang_org/x/text/unicode/norm
golang_org/x/text/secure/bidirule
golang_org/x/net/idna

@gopherbot gopherbot added this to the vgo milestone Jul 24, 2018

@mvdan

This comment has been minimized.

Copy link
Member

commented Jul 24, 2018

@lgarithm have you tried go1.11beta2? vgo is now deprecated, since it was only the prototype tool that is now part of Go itself.

@lgarithm

This comment has been minimized.

Copy link
Author

commented Jul 24, 2018

@lgarithm lgarithm closed this Jul 24, 2018

@golang golang locked and limited conversation to collaborators Jul 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.