-
Notifications
You must be signed in to change notification settings - Fork 785
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
Building requires Xcode Command Line Tools to be selected #2287
Comments
I am unable to reproduce this issue with ruby-build 20231025 and the following combinations on macOS Sonoma on an M1 Mini:
Also, the minimum Xcode/CLT version you can use on Sonoma is 15.0, so I think it was a mistake when you included 14.3.1 in the list. Have you tried opening a new terminal tab after switching to Xcode, and what does And when you updated Xcode from 15.0 to 15.0.1, did you launch Xcode and then click "Install" when prompted to choose the platforms you want to develop for? Another thing to check is that when you launch the Xcode app and go to its Preferences, and then the Locations tab, what is listed in the Command Line Tools dropdown? Are you setting any environment variables in your shell startup files that could affect Ruby installation? This is a common cause of failures, although I would expect this to fail with the CLT as well. Another thing I would try is to completely uninstall all Xcode apps and reinstall just 15.0.1, then launch it, and click Install when prompted. |
I have never use Xcode for anything other than having it install its Command Line Tools, and I'm wondering, what is the use-case for selecting a version of Xcode using |
Yes, certain projects that require the use of the Xcode app also require that One way to check whether or not this is specific to ruby-build is to try the same thing with a different Ruby installation tool, or compiling from source. |
Thank you both for the detailed questions/comments/ideas!
According to Apple, yes, but you can still install it and use it from the command-line. I only tried it because I was trying to figure this issue out.
Yes.
Nothing sticks out to me as ruby-related in my list of env vars. 🤔 Anything specific I should look for?
Haven't tried this one yet, but I can soon and update on if it changed anything.
I'd be willing to try that. I've only ever tried building with ruby-build though. Any advice on other builders to try? Or a guide on how to build from source? One question I have: Does the error message I get about
|
Another report of a person needing to do I suggest that within BUILD FAILED reports ruby-build prints a suggestion for macOS users that they could try |
Seems reasonable to me! |
Ever since updating to macOS Sonoma, I've been unable to build Ruby using
ruby-build
as normal. After much troubleshooting, I determined that I needed to explicitly select the Xcode Command Line Tools as the active developer directory prior to running the command, it doesn't seem to work if a copy of Xcode is selected.(I also have to explicitly point to the homebrew-installed version of openssl, but I believe this is likely a separate issue.)
Here are some various permutations I've tested with the same or similar results:
Steps to reproduce the behavior
xcode-select
Expected vs. actual behavior
Logs
I got an error when I tried to include the verbose logs pasted here into this Issue, so I'll attach them here as txt files instead:
Failing Build
These are the logs from a failing build, after selecting
/Applications/Xcode-15.0.1.app/Contents/Developer/
as the active developer directory:Successful Build
These are the logs from a successful build, after selecting
/Library/Developer/CommandLineTools
as the active developer directory:The text was updated successfully, but these errors were encountered: