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

Not working with Big Sur? #42

Open
jean-philippe-martin opened this issue Aug 12, 2021 · 10 comments
Open

Not working with Big Sur? #42

jean-philippe-martin opened this issue Aug 12, 2021 · 10 comments

Comments

@jean-philippe-martin
Copy link

jean-philippe-martin commented Aug 12, 2021

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).

@cmyr
Copy link
Owner

cmyr commented Aug 13, 2021

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?

@jean-philippe-martin
Copy link
Author

Indeed, it says it's not found:

% xcrun xctrace
xcrun: error: unable to find utility "xctrace", not a developer tool or in PATH

@chotchki
Copy link

chotchki commented Aug 15, 2021

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.

@DarrenTsung
Copy link

DarrenTsung commented Nov 4, 2021

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.

@GregoryTravis
Copy link

GregoryTravis commented Mar 8, 2022

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.

@cmyr
Copy link
Owner

cmyr commented Mar 10, 2022

@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)

@GregoryTravis
Copy link

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?

@cmyr
Copy link
Owner

cmyr commented Mar 10, 2022

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 🤷

@trombonehero
Copy link

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

@cmyr
Copy link
Owner

cmyr commented Jun 6, 2022

hmm, perhaps? I haven't ever not had Xcode installed.

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

6 participants