[darwinbuild-dev] -arch ppc
Charles Darwin
darwinskernel at gmail.com
Sat Aug 9 12:48:25 PDT 2008
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:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++
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
Any help is highly appreciated.
Charles
More information about the darwinbuild-dev
mailing list