Skip to content

misc/dist: OS X install fails without explanation on Xcode license issue #6132

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

Closed
gopherbot opened this issue Aug 13, 2013 · 21 comments
Closed
Labels
ExpertNeeded FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@gopherbot
Copy link
Contributor

by mksql@yahoo.com:

What steps will reproduce the problem?

1. Execute .pkg installer for Go v1.1.2 (on a machine with v.1.1.1 installed and working)
2. Installer fails with error but no explanation
3. OS X console shows message: "You have not agreed to the Xcode license
agreements, please run 'xcodebuild -license' ..."

'xcodebuild -license' resolves the issue, but the installer does not suggest this may be
the problem. Additionally this install was on a machine that had Go v.1.1.1 installed
via the .pkg without any problems, and no Xcode updates had been applied since.

Which operating system are you using?

OS X 10.8.4

Which version are you using?  (run 'go version')

go version go1.1.2 darwin/amd64

Please provide any additional information below.

A message with the cause of the install failure would make locating the issue much
easier.
@robpike
Copy link
Contributor

robpike commented Aug 14, 2013

Comment 1:

Labels changed: added priority-soon, go1.2, os-macosx, removed priority-triage, go1.2maybe.

Owner changed to @adg.

Status changed to Accepted.

@adg
Copy link
Contributor

adg commented Aug 16, 2013

Comment 2:

Can we get a repro case?
I can't reproduce it on my machine.
Can anyone suggest a fix?

Labels changed: added expertneeded, suggested.

@gopherbot
Copy link
Contributor Author

Comment 3 by mksql@yahoo.com:

I assume the repro would be to somehow "unlicense" Xcode. But its odd that I had been
using it before installing 1.1.2, and had been using a .pkg installed 1.1.1 with no
problem.
IMO the fix is for the installer to emit information as to _why_ the install failed,
instead of requiring the use to look in the OS X console for error messages.

@adg
Copy link
Contributor

adg commented Aug 18, 2013

Comment 4:

The installer seems decidedly un-configurable in that regard. I guess providing an error
message in the UI isn't user friendly.

@robpike
Copy link
Contributor

robpike commented Aug 20, 2013

Comment 6:

Issue #6195 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

Comment 7 by jim@superluckycasino.com:

I can confirm that the installation still fails after running:
   xcodebuild -license
But subsequently succeeds if you run:
sudo xcodebuild -license

@ceh
Copy link
Contributor

ceh commented Aug 24, 2013

Comment 8:

Duplicate of issue #5874?
Revision dcc14ba7a1e5 seems to address failures of `xcodebuild -version`.
Are you still able to reproduce if you apply revision dcc14ba7a1e5 and recreate the
package?

@ceh
Copy link
Contributor

ceh commented Aug 24, 2013

Comment 9:

Duplicate of  issue #5874?
Revision dcc14ba7a1e5 seems to address failures of `xcodebuild -version`.
Are you still able to reproduce if you apply revision dcc14ba7a1e5 and recreate the
package?

@ceh
Copy link
Contributor

ceh commented Aug 25, 2013

Comment 10:

By the way, why do we even force installation of misc. Xcode files in the installer
package?

@adg
Copy link
Contributor

adg commented Aug 25, 2013

Comment 11:

Do we force it? The script looks like it merely attempts to install them.

@adg
Copy link
Contributor

adg commented Aug 26, 2013

Comment 12:

Issue #6256 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

Comment 13 by jared.o.beck:

And don't try to use the British spelling "licence"!  It's definitely an "s" :)

@ceh
Copy link
Contributor

ceh commented Aug 27, 2013

Comment 14:

Proposal: remove installation of Xcode files from the binary distribution.
Reasoning:
If most people are using Xcode 4+ nowadays, there's no compelling reason to copy the
files in mist/xcode/4 since it makes no difference to the environment. (The go4xcode.sh
script must be run.)
Will Xcode 5 bring more breakage? It would be nice if the go1.2 binary distribution just
works, even when Xcode 5 has been released.
Basically: https://golang.org/cl/12858049/

@adg
Copy link
Contributor

adg commented Aug 27, 2013

Comment 15:

Does the CL fix the issue, though? I don't see why the shell script should exit with a
nonzero exit code, even if the xcode stuff fails.

@ceh
Copy link
Contributor

ceh commented Aug 27, 2013

Comment 16:

Need to look at the postinstall for go1.1.2:
https://code.google.com/p/go/source/browse/misc/dist/darwin/scripts/postinstall?name=go1.1.2
Exit status of `cp $GOROOT/misc/xcode/* $XCODE_MISC_DIR` will be 1. This issue was
addressed by revision dcc14ba7a1e5.
Hence, it is fixed in tip and ready for go1.2. I'd consider removing the Xcode files
altogether though, as per comment #14.
Need to apply revision dcc14ba7a1e5 to go1.1.2 and create a new package to resolve issue
for go1.1.2.

@adg
Copy link
Contributor

adg commented Aug 28, 2013

Comment 17:

Why remove the xcode file installation step?

@ceh
Copy link
Contributor

ceh commented Aug 28, 2013

Comment 18:

Remove Xcode file installation step because:
1. It makes little to no difference for Xcode 4 users to have the files from
misc/dist/xcode/4/ installed in a Xcode directory.
go4xcode.sh must be run in order to get syntax coloring to work. The user is probably
more likely to find $GOROOT/misc/dist/xcode/4/go4xcode.sh rather than the same file
placed in an Xcode library.
It makes sense to copy the files for Xcode 3, where it's just a matter of copying the
files into the right location to make syntax coloring available in the IDE.
However, most people use Xcode 4 instead of 3 now? (soon 5?)
2. The user gets no choice of whether to install these files or not. It's like saying
"We've detected that vim is available on your system. Lets automagically setup syntax
coloring for you! [copying files ...]"

@adg
Copy link
Contributor

adg commented Aug 29, 2013

Comment 19:

Okay, I agree. Please mail your CL.

@adg
Copy link
Contributor

adg commented Aug 30, 2013

Comment 20:

This issue was closed by revision 8869cc1.

Status changed to Fixed.

@adg
Copy link
Contributor

adg commented Sep 4, 2013

Comment 21:

Issue #6316 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

Comment 22 by clive.boulton:

For newbies (like me). 
Execute .pkg installer for Go v1.1.2 (on a machine with v.1.1.1 installed and working)
fails on OSX 10.8.5 
To resolve on OSX 10.8.5 the latest XCode installation is not complete. Run XCode and
install 5 remaining tools. Now the .pkg installer for Go v1.1.2 will successfully
complete.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned adg Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ExpertNeeded FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants