I've downloaded CoreFoundationLite - CFLite from apple open source of OSX version 10.10.5, and attempted to compile it on my own mac (I'm running 10.11.5 and Xcode 7.2.1). notice that this code compile under regular make, and doesn't use Xcode SDK ...

According the the README file, it should just require using the default makefile. However, it failed on the following issue :

/usr/bin/clang -O2 -arch i386 -arch x86_64 -c -x c -pipe -std=gnu99 
Wmost -Wno-trigraphs -Wno-deprecated -mmacosx-version-min=10.10 
-fconstant-cfstrings -fexceptions -DCF_BUILDING_CF=1 
-DVERSION=1153.18 -include CoreFoundation_Prefix.h 
-o CF-Objects/normal/CFApplicationPreferences.o

In file included from CFApplicationPreferences.c:30:
./CFInternal.h:759:10: fatal error: 'dispatch/private.h' file not found
#include <dispatch/private.h>

it seems like I'm missing dependency named libdispatch. is it because this library was removed from 10.11.5 and exist in 10.10.5 ? where can i find it (couldn't trace it on apple source code)

1 Answer 1


You can find the files you need in the libdispatch-442.1.4 download at the open source site you linked above.

And libdispatch is included with 10.11.5 as well, as you can see on this page. https://opensource.apple.com/release/os-x-10115/

I don't have a Mac here to confirm, but I assume if you haven't installed Xcode (with its accompanying SDKs) then the headers won't be installed on your Mac.

  • Hi, thanks for your response. i actually installed Xcode, but the compilation complains about missing dispatch/private.h and i don't have it on the sdk (I've looked at ./Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/dispatch) notice that i search in the sdk of version 10.10 which matches CFLite version (taken from 10.10.5 open source)
    – Zohar81
    Commented Aug 16, 2016 at 10:30
  • Fair enough. So what happens if you try to use the libdispatch-442.1.4 file from Apple's open source site? Commented Aug 16, 2016 at 11:10
  • tried that, but it failed on yet another missing header file #include <os/lock_private.h>
    – Zohar81
    Commented Aug 16, 2016 at 19:45
  • I wonder why it isn't mentioned in the project readme file, what is the required sdk suitable for compiling this code.
    – Zohar81
    Commented Aug 17, 2016 at 5:54
  • 1
    I probably should have asked this at the start, but why are you trying to compile CoreFoundation? Commented Aug 17, 2016 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .