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

Please give command-line developer tools instructions. #43

Open
Poikilos opened this issue Sep 1, 2023 · 1 comment
Open

Please give command-line developer tools instructions. #43

Poikilos opened this issue Sep 1, 2023 · 1 comment

Comments

@Poikilos
Copy link

Poikilos commented Sep 1, 2023

The MacBook Air "13-inch Mid 2012" (A1466) takes many hours to install and download command-line developer tools and Xcode. After over a day of downloading and extracting Xcode it still didn't work. The Xcode icon appears, I got the one (12.4) that said it was compatible with 10.15.7 on the apple website, but it says the app is corrupted and has the "🚫" symbol on it.

In its current state even "git clone" fails with: "xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun"

...even though before I installed Xcode, the command-line developer tools installed fine.

:edit: I confirmed that after dragging the Xcode (that had 🚫 symbol on it) app to trash and waiting quite a while, git works again.

I have to wait hours just to open Finder, then more to click Applications then more to uninstall the app and hope the command line tools will start working again.

CPU:

% sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz

I know this is Apple's fault due to throttling with my end-of-life battery but your program is recommended as the way to solve the problem so I wish it were a bit easier to compile. Every time I click anything in macOS it takes several minutes or hours.

I already reset the SMC and PRAM.

Many other people have the same problem of outrageous slowness due to Apple throttling when the battery is end-of-life or even disconnected completely. They were sued over gradually slowing down the iPhone as the battery got older supposedly to save battery.

Please, is there any way to compile with the command line?

@Poikilos
Copy link
Author

Poikilos commented Sep 4, 2024

Here is some info related to extracting an Xcode xip and it taking long:

Installed Macs Fan Control and verified that the fan works (I can hear it if I turn it up to 5000 RPM, and feel the left edge of the top of the hinge blowing on my eye if I put it close, though I am pretty much unable to tell any other way). A forum said that there is only one fan on MacBook Air Mid 2012 13-inch, so it is ok for other fan to read -1 though I didn't notice another fan sensor anyway.

Instructions:

  • Apple menu, System Preferences, Power, set Sleep to: Never
  • Go to Terminal and type: cd /Applications && sudo xip -x /home/redacted/Downloads/Xcode_12.4.xip
cd /Applications && sudo xip -x ~/Downloads/Xcode_12.1.xip
# or from a flash drive (wildcard `*` for any name works fine if you only have the file on one drive):
# cd /Applications && sudo xip -x /Volumes/*/Xcode_12.1.xip
  • Choose the Xcode version that has the SDK for your macOS version: I had to do the whole process over again below because Xcode 12.4 is listed as "Minimum OS" Catalina at https://developer.apple.com/support/xcode/, but if you read the fine print it has the SDK for 11.1 (Big Sur)! Therefore it wouldn't compile. It said it finished build successfully, but had warnings about different SDK version than target macOS version (You must change the target version to match yours or one compatible with yours, but my target version has to be 10.15 since I have Catalina). Therefore I did the whole thing over again (This time downloading it on Linux then using a flash drive).
  • It took over 24 hrs to extract the xip (again, after the failed attempt), but worked this time. Xcode icon looks normal (I didn't even have to re-download the xip file, just try again to extract...). Typing most of this paragraph on that mac, letters appear only every second or so per letter, no matter how fast I type.
  • Follow instructions in the readme in this repo before continuing.
  • sudo xcodebuild -license accept Open Xcode icon, wait overnight for "Agree" to appear. Click "Agree", wait about 1hr. Failed to load first time (After waiting a long time, the window just vanished)...I tried again this time clicking the Xcode icon from the dock and after a long time it opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant