macosforge / darwinbuild

Darwinbuild is a collection of tools that assist compilation of the many projects contained in Darwin, the open source base of Apple's macOS operating system.
https://macosforge.github.io/darwinbuild/
Other
128 stars 54 forks source link

CFOpenDirectory binary root incomplete #48

Open macosforgebot opened 15 years ago

macosforgebot commented 15 years ago

probono@… originally submitted this as ticket:50


The OpenDirectory framework depends on the CFOpenDirectory framework:

$ otool -L OpenDirectory.root/System/Library/PrivateFrameworks/OpenDirectory.framework/Versions/A/OpenDirectory  | grep CFOpenDirectory
    /System/Library/PrivateFrameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory (compatibility version 1.0.0, current version 1.0.0)

However, the CFOpenDirectory binary root does not contain that file.

macosforgebot commented 15 years ago

stuart@… originally submitted this as comment:1:⁠ticket:50


Replying to probono@…:

However, the CFOpenDirectory binary root does not contain that file.

This may be caused by CFOpenDirectory failing to build, in turn caused by its reliance on <CoreFoundation/CFRuntimePriv.h>. This header is not currently distributed with CFLite (source or root).

Further, I'd guess that CFRuntimePriv.h #defines the CF_IS_OBJC, CF_OBJC_CALL, CF_OBJC_VOIDCALL and CF_OBJC_FUNCDISPATCH macros, and that their absence is causing build to fail.

One possible solution which has worked for me (in XCode) is to locally define CF_IS_OBJC as (FALSE) and the others as no-ops (eg. do { } while(0)). This is the approach adopted in demilitarising CFLite. After this, compile succeeds.