Can't launch clang on MacBook M2 Pro running 13.5.2
I'm using a MacBook Pro with Apple M2 Pro, running Ventura 13.5.2. I expect there to be a working C compiler available. When I try to launch clang I get:
$ clang --version
xcrun: error: unable to load libxcrun (dlopen(/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib, 0x0005): tried: '/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need ''))).
$ file `which clang`
/usr/bin/clang: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/clang (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/clang (for architecture arm64e): Mach-O 64-bit executable arm64e
What am I doing wrong, or what is missing? Why does it not seem to know the architecture that is needed ("...need ' ' ")? I have an old version of Xcode that migrated over from my previous Intel MacBook, but it is grayed out with a prohibition sign. Is it getting in the way; should I uninstall it (how?)? Do I need (a new version of) Xcode to run clang? Does my executable search path need to be modified? Does my library search path need to be modified? (I do not have Rosetta installed and would prefer not to.)
What is the name of the ISA for M2 Pro? Is it "arm64e"? I thought that was the iPhone A12 silicon, or something like that.
Thanks in advance.
MacBook Pro 13″, macOS 10.12