[darwinbuild-dev] -arch ppc
William Siegrist
wsiegrist at apple.com
Tue Aug 12 18:27:18 PDT 2008
On Aug 11, 2008, at 1:33 PM, Charles Darwin wrote:
>
> On 11-Aug-08, at 4:21 PM, William Siegrist wrote:
>
>>
>> On Aug 11, 2008, at 1:12 PM, Charles Darwin wrote:
>>
>>>
>>> On 11-Aug-08, at 3:25 PM, William Siegrist wrote:
>>>
>>>> On Aug 9, 2008, at 12:48 PM, Charles Darwin wrote:
>>>>
>>>>>
>>>>> On 1-Aug-08, at 12:12 PM, William Siegrist wrote:
>>>>>
>>>>>>
>>>>>> On Aug 1, 2008, at 4:43 AM, Charles Darwin wrote:
>>>>>>
>>>>>>>
>>>>>>> On 1-Aug-08, at 12:35 AM, William Siegrist wrote:
>>>>>>>
>>>>>>>> On Jul 31, 2008, at 6:50 PM, Charles Darwin wrote:
>>>>>>>>
>>>>>>>>> How do I build for ppc only?
>>>>>>>>>
>>>>>>>>
>>>>>>>> The overall idea is to set the RC_ARCHS environment variable.
>>>>>>>> But you cant just export it, because its specified in the
>>>>>>>> build plists. So here's 2 ways to do it:
>>>>>>>>
>>>>>>>> 1. The maintainable/proper way.... Make a new plist that has
>>>>>>>> an environment key and a RC_ARCHS value. See 9A581.plist for
>>>>>>>> an example of the environment variables. You only need to
>>>>>>>> specify what you need to override, so you dont need keys for
>>>>>>>> projects, macosx, darwin, whatever. You should just need the
>>>>>>>> build, inherits, and environment keys. Use "darwinxref
>>>>>>>> loadIndex path/to/new.plist" to load it. Use "darwinbuild -
>>>>>>>> build=<build> <project>" to build. You can see the value of
>>>>>>>> RC_ARCHS scroll by during the build process.
>>>>>>>
>>>>>>> I am going with this one.
>>>>>>> Did this first:
>>>>>>> $ curl -O http://svn.macosforge.org/repository/darwinbuild/trunk/plists/9A581.plist
>>>>>>>
>>>>>>> Changed this line:
>>>>>>> RC_ARCHS=ppc # at the top (`grep i386 9A581.plist' returns
>>>>>>> 132 results though but I pretend not to see, or should I? My
>>>>>>> understanding is that's why we are doing it this way and not
>>>>>>> the quick/dirty way(?))
>>>>>>>
>>>>>>> <http://svn.macosforge.org/repository/darwinbuild/trunk/
>>>>>>> README> says something about RC_ppc but I can't find it.
>>>>>>>
>>>>>>> I found some other interesting stuff here too:
>>>>>>> What would happen if I removed individual projects from
>>>>>>> 9A581.plist? Can I finally get rid of AppleTalk and Chess?
>>>>>>> How about AppleRAID? (and where is bluetooth?)
>>>>>>>
>>>>>>> What if I changed source_sites from
>>>>>>> http://src.macosforge.org/Projects/
>>>>>>> to
>>>>>>> http://www.opensource.apple.com/darwinsource/Current/
>>>>>>> Would then darwinbuild do what it's supposed to do but build
>>>>>>> from Current source? How about binary_sites?
>>>>>>
>>>>>>
>>>>>> You dont need to get the plist manually. Try the following in a
>>>>>> new directory:
>>>>>>
>>>>>> $ darwinbuild -init 9A581 # this makes some directories
>>>>>> and downloads the plists
>>>>>> $ ls .build # you should see
>>>>>> a plist and the database here
>>>>>>
>>>>>> Then create a file at .build/ppc_only.plist (dont forget the
>>>>>> leading period) and put this in it:
>>>>>>
>>>>>> // !$*UTF8*$!
>>>>>> {
>>>>>> build = ppc_only;
>>>>>> darwin = "Darwin 9.0";
>>>>>> inherits = 9A581;
>>>>>> environment = {
>>>>>> INSTALLED_PRODUCT_ASIDES = YES;
>>>>>> MACOSX_DEPLOYMENT_TARGET = 10.5;
>>>>>> NEXT_ROOT = "";
>>>>>> RC_ARCHS = "ppc";
>>>>>> RC_JASPER = YES;
>>>>>> RC_NONARCH_CFLAGS = "-pipe -no-cpp-precomp";
>>>>>> RC_OS = macos;
>>>>>> RC_PRIVATE = /private;
>>>>>> RC_RELEASE = Leopard;
>>>>>> RC_XBS = YES;
>>>>>> SEPARATE_STRIP = YES;
>>>>>> UNAME_RELEASE = 9.0;
>>>>>> UNAME_SYSNAME = Darwin;
>>>>>> };
>>>>>> macosx = "Mac OS X 10.5.0";
>>>>>> }
>>>>>>
>>>>>>
>>>>>> Then load the plist and build stuff....
>>>>>>
>>>>>> $ darwinxref loadIndex .build/ppc_only.plist #
>>>>>> populates db with your custom build
>>>>>> $ darwinbuild -build=ppc_only grep #
>>>>>> builds grep for ppc only, for example
>>>>>>
>>>>>> You can make your plist inherit from whatever build you want.
>>>>>> For example, lets say you want to build 9E17 projects with only
>>>>>> ppc . And lets say you want to build zlib, and that specifies
>>>>>> 4 architectures normally (see .build/5A581.plist), you would
>>>>>> have a plist like this to override that:
>>>>>>
>>>>>> // !$*UTF8*$!
>>>>>> {
>>>>>> build = ppc_only;
>>>>>> darwin = "Darwin 9.4";
>>>>>> inherits = 9E17;
>>>>>> environment = {
>>>>>> INSTALLED_PRODUCT_ASIDES = YES;
>>>>>> MACOSX_DEPLOYMENT_TARGET = 10.5;
>>>>>> NEXT_ROOT = "";
>>>>>> RC_ARCHS = "ppc";
>>>>>> RC_JASPER = YES;
>>>>>> RC_NONARCH_CFLAGS = "-pipe -no-cpp-precomp";
>>>>>> RC_OS = macos;
>>>>>> RC_PRIVATE = /private;
>>>>>> RC_RELEASE = Leopard;
>>>>>> RC_XBS = YES;
>>>>>> SEPARATE_STRIP = YES;
>>>>>> UNAME_RELEASE = 9.0;
>>>>>> UNAME_SYSNAME = Darwin;
>>>>>> };
>>>>>> macosx = "Mac OS X 10.5.4";
>>>>>> projects = {
>>>>>> zlib = {
>>>>>> environment = {
>>>>>> RC_ARCHS = "ppc";
>>>>>> };
>>>>>> };
>>>>>> };
>>>>>> }
>>>>>>
>>>>>> Remember to reload your plist if you make changes to it with
>>>>>> the loadIndex command above. The RC_ppc variable is set
>>>>>> automatically based on RC_ARCHS, so you shouldnt have to worry
>>>>>> about it. As for src.macosforge.org versus
>>>>>> opensource.apple.com, I run both servers and put the source on
>>>>>> both at the same time. If something is missing, let me know
>>>>>> since its probably just an error on my part. The binary_sites
>>>>>> URL is used for downloading Roots and BinaryDrivers. If you
>>>>>> have a specially built root hosted somewhere, you could use
>>>>>> those keys to "darwinbuild -load <project>" and populate your
>>>>>> build tree with your root.
>>>>>>
>>>>>>
>>>>>> -Bill
>>>>>>
>>>>>>
>>>>>
>>>>> I did all of the above and whatever was in the README then ran
>>>>> this:
>>>>>
>>>>> ibook-g4:Build9E17 root# darwinbuild -build=ppc_only xnu # but
>>>>> `ctfconvert' seems to be missing.
>>>>
>>>>> /bin/sh: /usr/local/bin/ctfconvert: No such file or directory #
>>>>> so build fails. Then I tried this:
>>>>>
>>>>
>>>> I get the same error, but my build continues and succeeds, so I
>>>> dont think this is your problem.
>>>>
>>>>
>>>>
>>>>
>>>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>> +++++++++++++++
>>>>> BUILD TIME: 0h 25m 49s
>>>>> EXIT STATUS: 2
>>>>>
>>>>> # Then I tried this:
>>>>> ibook-g4:Build9E17 root# darwinbuild -build=ppc_only dtrace
>>>>>
>>>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>> +++++++++++++++
>>>>> xcodebuild install "SRCROOT=/SourceCache/dtrace/dtrace-48"
>>>>> "OBJROOT=/private/var/tmp/dtrace/dtrace-48.obj" "SYMROOT=/
>>>>> private/var/tmp/dtrace/dtrace-48.sym" "DSTROOT=/private/var/tmp/
>>>>> dtrace/dtrace-48.root" "RC_ProjectName=dtrace"
>>>>> "RC_ProjectSourceVersion=48"
>>>>> "RC_ProjectNameAndSourceVersion=dtrace-48"
>>>>> "RC_ProjectBuildVersion=1" "INSTALLED_PRODUCT_ASIDES=YES"
>>>>> "MACOSX_DEPLOYMENT_TARGET=10.5" "NEXT_ROOT=" "RC_ARCHS=ppc ppc64
>>>>> i386 x86_64" "RC_CFLAGS=-pipe -no-cpp-precomp -arch ppc -arch
>>>>> ppc64 -arch i386 -arch x86_64" "RC_JASPER=YES"
>>>>> "RC_NONARCH_CFLAGS=-pipe -no-cpp-precomp" "RC_OS=macos"
>>>>> "RC_PRIVATE=/private" "RC_RELEASE=Leopard" "RC_XBS=YES"
>>>>> "RC_i386=YES" "RC_ppc=YES" "RC_ppc64=YES" "RC_x86_64=YES"
>>>>> "SEPARATE_STRIP=YES" "UNAME_RELEASE=9.0" "UNAME_SYSNAME=Darwin"
>>>>> < /dev/null
>>>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>> +++++++++++++++
>>>>>
>>>>> Build log begins here:
>>>>>
>>>>> Error: /usr/bin/xcode-select not found.
>>>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>> +++++++++++++++
>>>>> BUILD TIME: 0h 0m 0s
>>>>> EXIT STATUS: 1
>>>>> ibook-g4:Build9E17 root# which xcode-select # but xcode-select
>>>>> is there
>>>>> /usr/bin/xcode-select
>>>>>
>>>>
>>>>
>>>> DarwinBuild runs in a chroot, so you really need to look for ./
>>>> BuildRoot/usr/bin/xcode-select.
>>>
>>> root# ls ./BuildRoot/usr/bin/xcode-select
>>> ls: ./BuildRoot/usr/bin/xcode-select: No such file or directory
>>> root# pwd
>>> /Volumes/Builds/Build9E17
>>>
>>>> That file should be copied into your buildroot when DarwinBuild
>>>> first tried to build an xcode project. Do you have Xcode
>>>> installed on your host OS?
>>>
>>> Yes I do.
>>> root# cat /Developer/Applications/Xcode.app/Contents/version.plist
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
>>> ">
>>> <plist version="1.0">
>>> <dict>
>>> <key>BuildVersion</key>
>>> <string>1</string>
>>> <key>CFBundleShortVersionString</key>
>>> <string>3.1</string>
>>>
>>
>> Xcode 3.1? I havnt had a chance to work on 3.1 compatibility, so
>> all I can suggest is try copying xcode-select from your host's
>> partition into your buildroot. You may need to copy supporting
>> libraries and frameworks as well. DarwinBuild should have ran the
>> Xcode 3.0 "install", which does include xcode-select, so something
>> changed enough in 3.1 to break that.
>>
>
> Xcode 3.0 is being downloaded right now. I'm going to give it a spin
> and see how it goes. I will post back the results here. Thanks for
> your time and info.
>
I noticed that the missing dependencies you get for dsymutil when
using Xcode 3.1 look a lot like Xcode's (CF.framework, ICU, etc), so I
tried the quick workaround of running installXcode, and it works. Xnu
doesnt actually use xcodebuild, but it uses dsymutil which has some
matching dependencies.
I also just committed a fix to installXcode so it detects Xcode 3.1.
This is by no means "proper Xcode 3.1 support" since I need to update
the list of dependencies, but to build xnu (with Xcode 3.1 installed)
right now, do the following:
1. checkout/update latest darwinbuild source
2. sudo make install
3. /usr/local/share/darwinbuild/installXcode <path to buildroot>
4. cd into darwinbuild environment
5. darwinbuild xnu
You still get the ctfconvert errors, but they are ignorable as far as
I can tell. Let me know if this works for you.
-Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2421 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/darwinbuild-dev/attachments/20080812/205e9343/attachment.bin
More information about the darwinbuild-dev
mailing list