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/dist: build fails if gcc is not installed #10731

Closed
davecheney opened this issue May 7, 2015 · 6 comments
Closed

cmd/dist: build fails if gcc is not installed #10731

davecheney opened this issue May 7, 2015 · 6 comments
Milestone

Comments

@davecheney
Copy link
Contributor

@davecheney davecheney commented May 7, 2015

Building Go on a fresh linux/arm64 machine fails because gcc is not installed.

This might be confusing to new developers because we've made a lot of noise that we're moving away from C to Go in the 1.5 release.

The gcc build time dependency comes from cgo, and all linux/* platforms default to cgo enabled by default.

Should cmd/dist check to see if gcc (or $CC) is valid, and if not, disable cgo ?

/cc @adg @minux

@davecheney davecheney added this to the Go1.5 milestone May 7, 2015
@adg
Copy link
Contributor

@adg adg commented May 7, 2015

Most people want cgo support to be available. That means you need a C
compiler, and shouldn't be a surprise to anyone.

I don't see the problem with saying "If you don't have or want a C compiler
then disable cgo."

On 7 May 2015 at 10:09, Dave Cheney notifications@github.com wrote:

Building Go on a fresh linux/arm64 machine fails because gcc is not
installed.

This might be confusing to new developers because we've made a lot of
noise that we're moving away from C to Go in the 1.5 release.

The gcc build time dependency comes from cgo, and all linux/* platforms
default to cgo enabled by default.

Should cmd/dist check to see if gcc (or $CC) is valid, and if not, disable
cgo ?

/cc @adg https://github.com/adg @minux https://github.com/minux


Reply to this email directly or view it on GitHub
#10731.

@davecheney
Copy link
Contributor Author

@davecheney davecheney commented May 7, 2015

Fair point. Currently the build pukes in the middle of the second stage compile. Do you have strong feelings on adding a check to cmd/dist that if cgo is enabled and gcc/$CC is not found, to abort earlier ?

@adg
Copy link
Contributor

@adg adg commented May 7, 2015

It sounds like a nice user friendly thing to do.

On 7 May 2015 at 10:25, Dave Cheney notifications@github.com wrote:

Fair point. Currently the build pukes in the middle of the second stage
compile. Do you have strong feelings on adding a check to cmd/dist that if
cgo is enabled and gcc/$CC is not found, to abort earlier ?


Reply to this email directly or view it on GitHub
#10731 (comment).

@minux
Copy link
Member

@minux minux commented May 7, 2015

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented May 7, 2015

This actually bit me today while setting up new builders. I agree we should fail earlier, and be helpful when failing would be nice.

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 14, 2015

CL https://golang.org/cl/12146 mentions this issue.

@rsc rsc closed this in ef6d3a9 Jul 15, 2015
@golang golang locked and limited conversation to collaborators Jul 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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