Bug 1661771 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Here's a patch to [dyld-750.5](https://opensource.apple.com/tarballs/dyld/dyld-750.5.tar.gz) that I used to build `dyld_shared_cache_util`.

I started out with Jeff Johnson's instructions from comment #3, but I ended up using a different strategy. When he encountered a missing header file, he edited the code to no longer need it. Instead I found copies of almost all the missing header files in different distros on https://opensource.apple.com/.

The strategy I used was very simple. For every missing header file I performed the following search:

        "missing_file.h" site:opensource.apple.com

Then I downloaded a copy of the most recent distro I could find that contained the missing header file.

I found `_simple.h` in [Libc-583](https://opensource.apple.com/tarballs/Libc/Libc-583.tar.gz), `libc_private.h` in [Libc-1272.250.1](https://opensource.apple.com/tarballs/Libc/Libc-1272.250.1.tar.gz), and `System/machine/cpu_capabilities.h` and `corecrypto/ccdigest.h` and friends in [xnu-6153.121.1](https://opensource.apple.com/source/xnu/xnu-6153.121.1/). The only one I didn't find (not too surprisingly) was `sandbox/private.h`. But I was able to reconstruct the necessary defines by searching around on the web.

Since this patch contains all these "extra" header files, it's quite large. But it's still only sufficient to make `dyld_shared_cache_util` build successfully. I tried it on both macOS 10.15.6 and macOS 11 Beta 5. Build it by running the following command on the command line:

        xcodebuild -target dyld_shared_cache_util
Here's a patch to [dyld-750.5](https://opensource.apple.com/tarballs/dyld/dyld-750.5.tar.gz) that I used to build `dyld_shared_cache_util`.

I started out with Jeff Johnson's instructions from comment #3, but I ended up using a different strategy. When he encountered a missing header file, he edited the code to no longer need it. Instead I found copies of almost all the missing header files in different distros on https://opensource.apple.com/.

The strategy I used was very simple. For every missing header file I performed the following search:

        "missing_file.h" site:opensource.apple.com

Then I downloaded a copy of the most recent distro I could find that contained the missing header file.

I found `_simple.h` in [Libc-583](https://opensource.apple.com/tarballs/Libc/Libc-583.tar.gz), `libc_private.h` in [Libc-1272.250.1](https://opensource.apple.com/tarballs/Libc/Libc-1272.250.1.tar.gz), and `System/machine/cpu_capabilities.h` and `corecrypto/ccdigest.h` and friends in [xnu-6153.121.1](https://opensource.apple.com/source/xnu/xnu-6153.121.1/). The only one I didn't find (not too surprisingly) was `sandbox/private.h`. But I was able to reconstruct the necessary defines by searching around on the web.

Since this patch contains all these "extra" header files, it's quite large. But it's still only sufficient to make `dyld_shared_cache_util` build successfully. I tried it on both macOS 10.15.6 and macOS 11 Beta 5. Build it by running the following command on the command line:

        xcodebuild -target dyld_shared_cache_util

Edit: These instructions no longer work on XCode 13 and up -- XCode has gotten pickier. At some point I'll do something about this, but I'm not in a hurry.
Here's a patch to [dyld-750.5](https://opensource.apple.com/tarballs/dyld/dyld-750.5.tar.gz) that I used to build `dyld_shared_cache_util`.

I started out with Jeff Johnson's instructions from comment #3, but I ended up using a different strategy. When he encountered a missing header file, he edited the code to no longer need it. Instead I found copies of almost all the missing header files in different distros on https://opensource.apple.com/.

The strategy I used was very simple. For every missing header file I performed the following search:

        "missing_file.h" site:opensource.apple.com

Then I downloaded a copy of the most recent distro I could find that contained the missing header file.

I found `_simple.h` in [Libc-583](https://opensource.apple.com/tarballs/Libc/Libc-583.tar.gz), `libc_private.h` in [Libc-1272.250.1](https://opensource.apple.com/tarballs/Libc/Libc-1272.250.1.tar.gz), and `System/machine/cpu_capabilities.h` and `corecrypto/ccdigest.h` and friends in [xnu-6153.121.1](https://opensource.apple.com/source/xnu/xnu-6153.121.1/). The only one I didn't find (not too surprisingly) was `sandbox/private.h`. But I was able to reconstruct the necessary defines by searching around on the web.

Since this patch contains all these "extra" header files, it's quite large. But it's still only sufficient to make `dyld_shared_cache_util` build successfully. I tried it on both macOS 10.15.6 and macOS 11 Beta 5. Build it by running the following command on the command line:

        xcodebuild -target dyld_shared_cache_util

Edit: These instructions no longer work on XCode 13 and up -- XCode has gotten pickier. I've now updated my patch for the current `dyld` source distro. See comment #24 and comment #25 below.

Back to Bug 1661771 Comment 7