Not working with Big Sur?
jean-philippe-martin opened this issue · comments
I'm not sure whether this is a mistake on my side or a missing feature.
I have Big Sur (11.5.1) and when trying to run some cargo-instruments it fails saying "xctrace" is missing. Indeed, I can't find that binary.
% xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
% brew install cargo-instruments
Warning: cargo-instruments 0.4.1 is already installed and up-to-date.
% cargo instruments -t Allocations
Failed instruments errored: xcrun: error: unable to find utility "xctrace", not a developer tool or in PATH
% ls /Library/Developer/CommandLineTools/usr/bin/xtr*
zsh: no matches found
Is there something I can do to run cargo-instruments on this machine (it's an Intel machine, not M1).
hmm, I'm really not sure what's going on here. I assume you also can't run xcrun xctrace
manually from the command line?
Indeed, it says it's not found:
% xcrun xctrace
xcrun: error: unable to find utility "xctrace", not a developer tool or in PATH
This link solved this problem for me.
https://apple.stackexchange.com/a/336589
Now I get the following error:
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Profiling target/debug/feophant-server with template 'Allocations'
Failed instruments errored: [ERROR] Run issues detected (trace is still ready to be viewed):
* Failed to gain authorization
I'm looking at #40 to see if I can implement that solution.
Running into the same issue with xctrace
not found:
❯ xcrun xctrace
xcrun: error: unable to find utility "xctrace", not a developer tool or in PATH
I'm on Catalina (10.15.7) and have the xcode command line tools installed. I also have instruments installed - could we add a command line argument for overriding the automatic detection with a user-provided value? Or maybe change the detection to check that we can run xcrun xctrace
successfully before resolving to XcodeInstruments::Xctrace
?
I'll try to get a PR up that works for me..
EDIT: Alright, I tried falling back to instruments and it required Xcode to be installed which is not the simple solution I was hoping for.
I'm running Big Sur 11.6 on an M1 Air. I have /usr/bin/instruments and also 'xcrun xctrace' works. But it still tells me Instruments is not installed:
$ cargo instruments -t Allocations
Xcode Instruments is not installed. Please install the Xcode Command Line Tools.
@GregoryTravis try xcode-select --install
, does it tell you command line tools are installed already, or does it prompt you to install them? (If prompted install and this should work, if not I'm confused)
Yes, that did it. I already had the cli tools installed (I could run gcc/clang) but I guess this updated it. Is Instruments a recent addition?
Nope, but sometimes the path to the tools can be unset, or need to be updated after a new Xcode release? I'm not really sure of all the failure conditions, I just know this happens sometimes 🤷
Maybe the CLI tools are now insufficient? I'm on Monterey (12.4), and attempting to run /usr/bin/xctrace
yields:
xcode-select: error: tool 'xctrace' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
hmm, perhaps? I haven't ever not had Xcode installed.