Purge Xcode and reinstall

A problem occurred which prevent the building of the project on Ventura 13.2 Xcode 14.2 on M1.  It produced the following error output.  It is possible the last execution overran the memory area and corrupted the build tools. 

dyld[10634]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed dyld[10634]: Library not loaded: /usr/lib/libSystem.B.dylib   Referenced from: /Users/chuckh/Library/Developer/Xcode/DerivedData/antennasimulation-djqokhnfxqjiphelcizvshqlprik/Build/Products/Debug/antennasimulation   Reason: tried: '/Users/chuckh/Library/Developer/Xcode/DerivedData/antennasimulation-djqokhnfxqjiphelcizvshqlprik/Build/Products/Debug/libSystem.B.dylib' (no such file), '/usr/lib/system/introspection/libSystem.B.dylib' (no such file, no dyld cache), '/usr/lib/libSystem.B.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libSystem.B.dylib' (no such file), '/usr/lib/libSystem.B.dylib' (no such file, no dyld cache), '/usr/local/lib/libSystem.B.dylib' (no such file) (lldb)

From the support page: Uninstall Xcode.  Drag xcode.app into Trash.  Open terminal.  type: cd /Library/.  Type sudo rm -rf Developer/.   Got the following output from the terminal window.

chuckh@Windom2 /Library % sudo rm -rf Developer  Password: rm: Developer/CoreSimulator/Images/Inbox: Operation not permitted rm: Developer/CoreSimulator/Images/images.plist: Operation not permitted rm: Developer/CoreSimulator/Images/mnt: Operation not permitted rm: Developer/CoreSimulator/Images: Operation not permitted rm: Developer/CoreSimulator/Volumes: Operation not permitted rm: Developer/CoreSimulator/Caches: Operation not permitted rm: Developer/CoreSimulator: Operation not permitted rm: Developer: Operation not permitted

Didn't restore Xcode to operation after a reinstall. The code (C language) builds on a different Mac system (Intel processor). The library file libSystem.B.dylib does not exist on Mac Intel machine. How do I completely remove Xcode and restore operation on my M1?

Phew.. you got your hands full there..

by chance did you install the developer command line tools?

i know that there was a problem with the dylibs earlier last year; but I’d have to look it up to remember what it was; however, I can tell you that after reading your post it sounds like the opposite of needing to remove Xcode. It sounds like something is missing and I’d have to look this up again too; but, the example was that if you were to download all of Xcode’s sdks, like even the ones for os and kernel development like so we can make drivers, then the total size comes out to roughly forty gigs. See what I mean? I’ve usually solved these types of problems by adding languages. I feel like the worst thing you can do on an apple computer is delete stuff..

anyway, let me know if you find out any more info.

I found an article that links the dylib, here are the commands; but, if you don’t have that on your computer you actually need to keep Xcode and use it to install the LLVM compiler which you might have to do from source (which is easy) or use homebrew 😬

but i did take a minute to read over your post again and realized that seems more like the problems that I’ve been having with my m1 trying to work backwards.

im new to these forums so I’m not sure how convenient the messaging system is but I can walk you through any of this if you’ve never done it before.

i wouldn’t trip though because the compiler is easy to install and those errors look like you just need to add the LLVM and clang libs

Purge Xcode and reinstall
 
 
Q