[darwinbuild-dev] Modifying build dependencies, + more questions

William Siegrist wsiegrist at apple.com
Wed Jan 6 11:13:56 PST 2010


On Jan 6, 2010, at 10:29 AM, Thomas Engelmeier wrote:

> Hi, 
> 
> I have a darwinbuild derived project that crashes at the first usage of the C++ standard lib on 10.6.x if not compiled with darwinbuild. (on 10.5 it works fine). It's pretty stomping as the build options for the Xcode and darwinbuild compiles are identical.
> 
> I pimped the darwinbuild Tokend project to include my tokend. I have three associated questions, the most important one is how  to extend the build dependencies:
> 
> Q1: I extended the 10A432.plist with the additional dependency, but it does not seem the get read with a simple "darwinbuild Tokend".
> I need additionally CoreServices.framework. How can I force re-reading of the 10A432.plist? darwinxref? 
> 

You should create a new plist that inherits from one of the provided plists (see 10B504.plist for how it inherits fro 10A432.plist). Then just add the differences to your plist. In order to see CoreServices.framework during the build, you need to pass the "-nochroot" option to darwinbuild (which means nothing in BuildRoot will be used) or copy CoreServices.framework into your BuildRoot/ (this is the best approach).  If you need to reload a plist, use "darwinxref loadIndex <path-to-plist>". 


> Q2: the header <dlfcn.h> is missing in the darwinbuild environment. However, the project is dependent from the "dyld" root, which contains the header. Bug or oversight on my part? I tried to force addition of the headers with "darwinbuild -header dyld" and "darwinbuild -header libdyld" but both fail.
> 

That header is provided by libdyld. Try "darwinbuild -load libdyld" to load the full libdyld root. Doing "darwinbuild -header libdyld" says "build the installhdrs phase". Using both "-load" and "-header" says to "load the headers root", which would look like "darwinbuild -header -load libdyld". 


> Q3: How can I build a certain target of an project? "darwinbuild -target=PIV Tokend" did not work.
> 



This works for me, note that xcodebuild is passed a -target option:


# darwinbuild -target=PIV Tokend
...snip...
zlib                 -> bf9a63cca042bf6656be18a883ac0edd1f33fc35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
xcodebuild install -sdk Darwinbuild_10C540_20091207070452 -target "PIV" "SRCROOT=/Users/wms/darwin/10C540/BuildRoot/Sour...



-Bill



More information about the darwinbuild-dev mailing list