Closed Saelyria closed 1 year ago
Hi @Saelyria
That is the error when you run?:
brew install robotsandpencils/made/xcodes
In your example above you have make install
which is how you would build from source. When you do that you need an Xcode installed on your machine.
Let me know if brew install
above works?
Thanks
Hi @MattKiazyk!
I'm also running into this issue. Here's the output of brew install robotsandpencils/made/xcodes > pbcopy
I think it's running make
because it needs to be recompiled for arm64? I can also confirm that I have Xcode installed (12.4).
==> make install prefix=/opt/homebrew/Cellar/xcodes/0.17.0
Last 15 lines from /Users/michaelmaietta/Library/Logs/Homebrew/xcodes/01.make:
2021-05-04 15:20:15 -0700
make
install
prefix=/opt/homebrew/Cellar/xcodes/0.17.0
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
make: *** [xcodes] Error 1
Do not report this issue to Homebrew/brew or Homebrew/core!
Yeah, my error output is from running brew install
when Xcode is not installed. When it is already installed (I downloaded 12.5 manually to check), I get:
==> Installing xcodes from robotsandpencils/made
==> Cloning https://github.com/RobotsAndPencils/xcodes.git
Updating /Users/Administrator/Library/Caches/Homebrew/xcodes--git
==> Checking out tag 0.17.0
HEAD is now at c9c1784 Bump version to 0.17.0
HEAD is now at c9c1784 Bump version to 0.17.0
==> make install prefix=/opt/homebrew/Cellar/xcodes/0.17.0
==> xcodes cask is installed, skipping link.
🍺 /opt/homebrew/Cellar/xcodes/0.17.0: 5 files, 7.7MB, built in 1 minute 25 seconds
so it does succeed, but it is still running make
.
@mmaietta your assumption sounds reasonable - also, to get it working with Homebrew with Xcode installed, I made sure xcode-select -p
was pointing to the Xcode install's CLT (as per this SO answer)
I can confirm that xcode-select -s <xcode developer path>
resolved the issue. Thanks @Saelyria!
Hey, I get the same error
make
install
prefix=/opt/homebrew/Cellar/xcodes/0.17.0
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
make: *** [xcodes] Error 1
when trying to run
brew install robotsandpencils/made/xcodes
without having a prior installation on my macbook pro M1.
@tylerwetrust Curious if you have Rosetta installed on that M1 yet?
Good point - just double-checked by installing via Rosetta and looks like it doesn't run make
, so is a good workaround for the time being if installing Xcode first is prohibitive.
More specifically, I:
/usr/local
for Intel emulation (just run arch -x86_64 <install command from brew.sh>
)arch -x86_64 /usr/local/bin/brew install robotsandpencils/made/xcodes
)and I get the following output:
==> Tapping robotsandpencils/made
Cloning into '/usr/local/Homebrew/Library/Taps/robotsandpencils/homebrew-made'...
remote: Enumerating objects: 83, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 83 (delta 8), reused 32 (delta 7), pack-reused 47
Receiving objects: 100% (83/83), 42.72 KiB | 540.00 KiB/s, done.
Resolving deltas: 100% (18/18), done.
Tapped 1 formula (30 files, 95.4KB).
==> Installing xcodes from robotsandpencils/made
==> Downloading https://github.com/RobotsAndPencils/xcodes/releases/download/0.17.0/xcodes-0.17.0.mojave.bottle.tar.gz
==> Downloading from https://github-releases.githubusercontent.com/171964196/753be900-7841-11eb-9635-36e1bcf2c174?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX
######################################################################## 100.0%
==> Pouring xcodes-0.17.0.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/xcodes/0.17.0: 2 files, 8MB
would still be nice to have an official M1 release :) @MattKiazyk if it's just an issue of just access to M1 hardware, if you can point me to instructions on what all needs to be done, I can do that work on the Mini I have here and open a PR.
@MattKiazyk I do not have Rosetta installed. @Saelyria thanks for the workaround, but I'm probably gonna wait for an official M1 release.
https://github.com/RobotsAndPencils/xcodes/blob/main/Makefile#L21-L25 It could be an easy change to add arm64 support? Didn't test this, just did a quick Google search
Ref: https://forums.swift.org/t/compile-packages-for-arm64-only-how/42547/2
swift build --arch arm64
andxcodebuild ... -destination "platform=macos,arch=arm64"
to build on Apple Silicon
It seems it's not possible to build for both archs at the same time, i.e. --arch arm64 --arch x86_64
. Instead lipo
must be used to stitch the two artifacts together.
Ref: https://developer.apple.com/forums/thread/672758
If it helps, here's also a sample script that uses xcodebuild
with lipo
: https://gist.github.com/madhikarma/09e553c508f870639570
with the new Macbooks coming all with M1s, might want to relook into how we can install xcodes
without installing Xcode first. If possible to share the difficulties in making it work for arm64 please do share it. This tool has been extremely helpful for me to automate intel mac machines and we are planning to integrate this into M1 machines as well.
I'm also seeing this one. The command line tools don't come with xctest
on a fresh install on an M1.
adam@MacBook-Pro ~ % brew install robotsandpencils/made/xcodes
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 4 formulae.
==> Cloning https://github.com/RobotsAndPencils/xcodes.git
Updating /Users/adam/Library/Caches/Homebrew/xcodes--git
==> Checking out tag 0.17.0
HEAD is now at c9c1784 Bump version to 0.17.0
HEAD is now at c9c1784 Bump version to 0.17.0
==> Installing xcodes from robotsandpencils/made
==> make install prefix=/opt/homebrew/Cellar/xcodes/0.17.0
Last 15 lines from /Users/adam/Library/Logs/Homebrew/xcodes/01.make:
2021-12-08 06:21:15 +0000
make
install
prefix=/opt/homebrew/Cellar/xcodes/0.17.0
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
make: *** [xcodes] Error 1
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/robotsandpencils/homebrew-made/issues
Checking for xcrun and xctest:
adam@MacBook-Pro ~ % which xcrun
/usr/bin/xcrun
adam@MacBook-Pro ~ % which xctest
xctest not found
i have the same issue on M1
xcode-select -p
/Library/Developer/CommandLineTools
Has any progress made so far?
https://github.com/apple/swift-package-manager/pull/4146 might fix it. I can test when this change is shipped.
I can confirm that this is still an issue. Trying to run brew with --force-bottle
gives this error:
Error: --force-bottle passed but robotsandpencils/made/xcodes has no bottle!
So it seems that brew
is not happy with the formula. It's not clear to me from the documentation, but the bottles don't seem to support universal binaries. You can edit the formula to include a separate entry for an arm64_mojave
bottle, but then brew
tries to download the bottle from this location, which doesn't exist:
==> Downloading https://github.com/RobotsAndPencils/xcodes/releases/download/0.20.0/xcodes-0.2
curl: (22) The requested URL returned error: 404
Error: xcodes: Failed to download resource "xcodes"
Download failed: https://github.com/RobotsAndPencils/xcodes/releases/download/0.20.0/xcodes-0.20.0.arm64_mojave.bottle.tar.gz
So to summarize, to make this work:
arm64_mojave
bottle xcodes-$VERSION.arm64_mojave.bottle.tar.gz
name@milch do you have an example of what you changed the formula to. I can easily switch to zip up multiple architecutres if that fixes it.
Based on my reading of the bottle docs I updated the bottles section in the formula to look like this:
bottle do
root_url 'https://github.com/RobotsAndPencils/xcodes/releases/download/0.20.0'
sha256 cellar: :any_skip_relocation, mojave: "acd0717e5083634c472d17d7b041265f34b197164ecfcf513b812d77ff978c6d"
+ sha256 cellar: :any_skip_relocation, arm64_mojave: "acd0717e5083634c472d17d7b041265f34b197164ecfcf513b812d77ff978c6d"
end
Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
After this xcodes CLI was installed for me.
I've added this for 1.0 release today. Seems to grab the arm64 on my m1 machine with no issues:
==> Upgrading 1 outdated package:
robotsandpencils/made/xcodes 0.20.0 -> 1.0.0
==> Downloading https://github.com/RobotsAndPencils/xcodes/releases/download/1.0.0/xcodes-1.0.0.arm64_mojave.bottle.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/171964196/d7172cf4-484d-4894-a
######################################################################## 100.0%
==> Upgrading robotsandpencils/made/xcodes
0.20.0 -> 1.0.0
==> Pouring xcodes-1.0.0.arm64_mojave.bottle.tar.gz
🍺 /opt/homebrew/Cellar/xcodes/1.0.0: 2 files, 12MB
Can confirm that this works:
$ brew install robotsandpencils/made/xcodes
xcodes 0.20.0 is already installed but outdated (so it will be upgraded).
==> Downloading https://github.com/RobotsAndPencils/xcodes/releases/download/1.0.0/xcodes-1.0.
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e6
######################################################################## 100.0%
==> Upgrading robotsandpencils/made/xcodes
0.20.0 -> 1.0.0
==> Pouring xcodes-1.0.0.arm64_mojave.bottle.tar.gz
🍺 /opt/homebrew/Cellar/xcodes/1.0.0: 2 files, 12MB
Thank you!
Can confirm as well it woks, thank you!
Hello!
I was trying to install on an M1 Mac mini via Homebrew, but I'm running into the following error:
It's a pretty close to fresh install of macOS, so Xcode is not already installed (which seems to be the root cause of the
unable to find utility "xctest"
error based on some cursory googling).Let me know if there's any other info I can provide!