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

icecc-create-env does not work on macOS Big Sur #592

Open
rubenvb opened this issue Oct 5, 2021 · 1 comment
Open

icecc-create-env does not work on macOS Big Sur #592

rubenvb opened this issue Oct 5, 2021 · 1 comment

Comments

@rubenvb
Copy link

rubenvb commented Oct 5, 2021

Big Sur introduced the dyld global cache, and removed all system libraries from /usr/lib.
See the release notes, which contain the following passage:

New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

There is no simple way to extract the actual dylib files from the cache (located at /System/Library/dyld/dyld_shared_cache_x86_64 or similar for other architectures), the only thing I could find was a glorious (but functional) hack relying on internal APIs: https://lapcatsoftware.com/articles/bigsur.html.
These dylibs are also not present inside the Xcode SDKs, so cannot be taken from there.

I don't see a simple way for one to create a standalone chroot environment as Icecream expects.
The generated chroot with current Icecream fails to work because the system libraries in question cannot be found on the client inside the icecream chroot.

Is there a way to extend the chroot with system libraries of the client for this purpose?

@rubenvb
Copy link
Author

rubenvb commented Feb 28, 2023

A possible way out would be to use a tool like this: https://github.com/keith/dyld-shared-cache-extractor

Which is able to extract the dylibs from the cache as actual files which could then be included by icecc-create-env.

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

1 participant