« July 2008 | Main | December 2008 »
October 06, 2008
Use Radmind to Manage Shared Dynamic Libraries
Mac OS X Leopard stores shared dynamic libraries at /private/var/db/dyld/. These files are updated via the update_dyld_shared_cache command. If they aren’t present, then applications will be unable to use the shared libraries, increasing virtual memory use and decreasing overall performance. When managing multiple architectures with Radmind, however, this becomes problematic. On a new, Intel Core 2 Duo system, you see this output:
root# ls -1 /var/db/dyld/ dyld_shared_cache_i386 dyld_shared_cache_i386.map dyld_shared_cache_rosetta dyld_shared_cache_rosetta.map dyld_shared_cache_x86_64 dyld_shared_cache_x86_64.map shared_region_roots
Whereas on an older, PowerPC-based system, you see this output:
root# ls -1 /var/db/dyld/ dyld_shared_cache_ppc dyld_shared_cache_ppc.map dyld_shared_cache_ppc64 dyld_shared_cache_ppc64.map shared_region_roots
Without being properly managed, you may see error messages in the system log as follows:
Jun 26 14:50:04 slc48 com.apple.dyld[354]: update_dyld_shared_cache[354] for arch=ppc failed: /var/db/dyld/shared_region_roots/ does not exist, errno=2To properly manage this with Radmind, you should do the following:
- Include the directories /private/var/db/dyld and /private/var/db/dyld/shared_region_roots in your base transcript. The items in the latter directory should also be included and managed with Radmind.
- Ensure you’re using Radmind version 1.11.0 or higher, as those versions support exclude patterns.
- Add the following lines to your command file (the comments are optional):
# Exclude prebinding cache files
# dyld_share_cache files come in i386 and powerpc flavors
x ./private/var/db/dyld/dyld_shared_cache_*
# Is there more than an *.applesaved version of this file?
x ./private/var/db/dyld/update-prebinding-paths.txt.* - Add the update_dyld_shared_cache command to your Radmind scripts to ensure that the libraries are updated when you apply system updates. This should be a post-apply script (or after lapply in your main Radmind script).
This will allow your systems to remain up-to-date and still allow you to manage them through Radmind.
Posted by slauncha at 04:41 PM | Comments (0) | TrackBack