Why are my system libraries and frameworks not visible in macOS Monterey?

4.4k views Asked by At

I was checking some dependencies with otool -L on a dylib I just built, and got the following system dependencies:

/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1853.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)

The library is working fine on my system (macOS 12.0.1 on a macbook air m1) but to my great surprise when I tried to check those 4 libraries, they seems to be absent from my system. /usr/lib does not contain libc++.1.dylib and libSystem.B.dylib, and /System/Library/Frameworks seems to contain mostly empty structures for Accelerate and CoreFoundation frameworks, without the libraries themselves. And yet my dylib is perfectly working, which I cannot explain.

When I check an older system such as macOS 10.14 I can see those 4 libraries and frameworks where expected.

Did something change recently in macOS that somehow hides those system libraries or silently route them elsewhere ? How/where can I see them ?

1

There are 1 answers

1
Robin Lobel On

The reason is explained here: https://developer.apple.com/forums/thread/655588 Since Big Sur, it somehow all became virtual. I still don't understand how it works though, but it works...