Skip to content

Commit

Permalink
darwin.libSystem: fix intermittent impurity bug
Browse files Browse the repository at this point in the history
If you've seen issues with libsystem_symptoms.dylib,
this should fix that.
(cherry picked from commit d93f2c3)
  • Loading branch information
copumpkin authored and shlevy committed Apr 25, 2017
1 parent ad0a973 commit 232e8a9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
Expand Up @@ -76,7 +76,11 @@ appleDerivation rec {
/usr/lib/libSystem.dylib \
-reexported_symbols_list ${./system_symbols}
libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
# We used to determine these impurely based on the host system, but then when we got some 10.12 Hydra boxes,
# one of them accidentally built this derivation, referenced libsystem_symptoms.dylib, which doesn't exist on
# 10.11, and then broke all subsequent builds on 10.11. By picking a 10.11 compatible subset of the libraries,
# we avoid scary impurity issues like that.
libs=$(cat ${./reexported_libraries} | grep -v '^#')
for i in $libs; do
if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then
Expand Down
@@ -0,0 +1,41 @@
# These are generated with otool -L /usr/lib/libSystem.dylib on a 10.11 machine
/usr/lib/system/libcache.dylib
/usr/lib/system/libcommonCrypto.dylib
/usr/lib/system/libcompiler_rt.dylib
/usr/lib/system/libcopyfile.dylib
/usr/lib/system/libcorecrypto.dylib
/usr/lib/system/libdispatch.dylib
/usr/lib/system/libdyld.dylib
/usr/lib/system/libkeymgr.dylib
/usr/lib/system/liblaunch.dylib
/usr/lib/system/libmacho.dylib
/usr/lib/system/libquarantine.dylib
/usr/lib/system/libremovefile.dylib
/usr/lib/system/libsystem_asl.dylib
/usr/lib/system/libsystem_blocks.dylib

# We handle this specially in the expression
# /usr/lib/system/libsystem_c.dylib

/usr/lib/system/libsystem_configuration.dylib
/usr/lib/system/libsystem_coreservices.dylib
/usr/lib/system/libsystem_coretls.dylib
/usr/lib/system/libsystem_dnssd.dylib
/usr/lib/system/libsystem_info.dylib

# We handle this specially in the expression
# /usr/lib/system/libsystem_kernel.dylib

/usr/lib/system/libsystem_m.dylib
/usr/lib/system/libsystem_malloc.dylib
/usr/lib/system/libsystem_network.dylib
/usr/lib/system/libsystem_networkextension.dylib
/usr/lib/system/libsystem_notify.dylib
/usr/lib/system/libsystem_platform.dylib
/usr/lib/system/libsystem_pthread.dylib
/usr/lib/system/libsystem_sandbox.dylib
/usr/lib/system/libsystem_secinit.dylib
/usr/lib/system/libsystem_trace.dylib
/usr/lib/system/libunc.dylib
/usr/lib/system/libunwind.dylib
/usr/lib/system/libxpc.dylib

0 comments on commit 232e8a9

Please sign in to comment.