First I cloned
because otherwise darwinbuild-legacy was not installable on Leopard/ppc (10.5.8)
I switched branch
git branch -r
git checkout -b darwin_9 origin/Darwin9
then patched build like in ppcports for non-legacy darwinbuild.
attached my local hack, not git patch, just plain patch over darwinbuild git sources (darwin9 branch)
credit to @barracuda156 for figuring out hard part and hosting plists and stuff.
There are two parts of problem, source tarballs/tree and Roots (precompiled binaries libs and headers for chroot env where darwinbuild normally operates).
They used to be on http server but now you need to download them from archive.org and/or https://macos-powerpc.org/darwinbuild/
After installing patched darwinbuild I created directory for 9L30 (10.5.8) as darwinbuild README instruct:
I did this and meet fact that darwinbuild loads plists over net, and they still not patched.
fixed this as root by putting my patched plists in
directory in my 9L30 folder.
Now I downloaded bunch of release tarballs into Sources Subfolder also in my main 9L30 folder:
For Roots I used similar wget command, but with this url:
note that I also downloaded all files from subfolders here, and put them in
all in same folder, no subfolders.
Not sure if I did this correctly, from darwinbuild script sources it should accept just plain unpacked source tree in Sources so may be cloning this repo will work too?
but it will take more space on hdd (download size 1.78 Gb for git folder alone, 34 Gb unpacked)
Now as root [be sure you are in your initialized project folder after sudo -s, use pwd and ls if unsure) something like
should work, but for me it ends up in error:
WIP due to this, need to figure out build order.
For listing all project with versions
For removing BuildRoot (mounted as sparse bundle by darwinbuild) and darwinxref database:
for example. (use your volume name of course, is time dependent as you can see. Use mount command to see what mounted on your system)
I tried to put only files from
roots folders downloaded from Archive.org (I created folder for downloads, manually created numbered dirs there, cd into each dir in Terminal, click on corresponding link in web browser, use wget -i $url in each folder, so files with same name do not mix; added files into .DownloadCache starting with 9A folder and adding missing pieces from other folderswithout overwriting earlier files OK, overwriting them seems to lead to better results.) but something still not right,
darwinbuild xnu
ends in same
Victory!
Editing /usr/bin/arch in chroot like this:
fixed cctools and xmu build!
After installing TargetConfig I get some error about tconf unable to find configuration. Googled myself back to this forum, and implemented this solution:
fix for diskdev_cmds:
So for now I have this list of compiled projects:
Code:
https://github.com/macosforge/darwinbuild/
because otherwise darwinbuild-legacy was not installable on Leopard/ppc (10.5.8)
Code:
https://trac.macports.org/ticket/64830#comment:3
I switched branch
git branch -r
git checkout -b darwin_9 origin/Darwin9
then patched build like in ppcports for non-legacy darwinbuild.
attached my local hack, not git patch, just plain patch over darwinbuild git sources (darwin9 branch)
credit to @barracuda156 for figuring out hard part and hosting plists and stuff.
There are two parts of problem, source tarballs/tree and Roots (precompiled binaries libs and headers for chroot env where darwinbuild normally operates).
They used to be on http server but now you need to download them from archive.org and/or https://macos-powerpc.org/darwinbuild/
After installing patched darwinbuild I created directory for 9L30 (10.5.8) as darwinbuild README instruct:
Code:
2.1 Creating the Build Directory
After installation, you must initialize the build directory using darwinbuild. Assuming you wanted to build projects from 9G55 in your home directory:
# mkdir ~/9G55
# cd ~/9G55
# sudo -s
# darwinbuild -init 9G55
I did this and meet fact that darwinbuild loads plists over net, and they still not patched.
fixed this as root by putting my patched plists in
Code:
.build/
directory in my 9L30 folder.
Now I downloaded bunch of release tarballs into Sources Subfolder also in my main 9L30 folder:
Code:
wget -A "*.tar.gz" -i \
https://web.archive.org/web/20110723212952/http://www.opensource.apple.com/release/mac-os-x-1058/
For Roots I used similar wget command, but with this url:
Code:
https://web.archive.org/web/20110226233902/http://src.macosforge.org/Roots/
note that I also downloaded all files from subfolders here, and put them in
Code:
Roots/.DownloadCache/
all in same folder, no subfolders.
Not sure if I did this correctly, from darwinbuild script sources it should accept just plain unpacked source tree in Sources so may be cloning this repo will work too?
Code:
git clone https://github.com/mattl/opensource.apple.com/
but it will take more space on hdd (download size 1.78 Gb for git folder alone, 34 Gb unpacked)
Now as root [be sure you are in your initialized project folder after sudo -s, use pwd and ls if unsure) something like
Code:
darwinbuild network_cmds
should work, but for me it ends up in error:
Code:
...
/usr/bin/cc -arch ppc -arch i386 -g -Os -pipe -mdynamic-no-pic -dead_strip -I/System/Library/Frameworks/System.framework/PrivateHeaders -pipe -no-cpp-precomp -arch ppc -arch i386 -I/private/var/tmp/network_cmds/network_cmds-307.1.1.obj/routed -c -o /private/var/tmp/network_cmds/network_cmds-307.1.1.obj/routed/trace.o trace.c
In file included from trace.c:65
In file included from trace.c:65: /System/Library/Frameworks/System.framework/PrivateHeaders/sys/stat.h:75:26: error: : /System/Library/Frameworks/System.framework/PrivateHeaders/sys/stat.h:75:26: error: Availability.h: No such file or directory
Availability.h: No such file or directory
In file included from trace.c:65:
WIP due to this, need to figure out build order.
Code:
bash-3.2# darwinxref dependencies -header bootstrap_cmds
Libc_headers
Libinfo
architecture
gcc
xnu
For listing all project with versions
Code:
darwinxref version \* | less
For removing BuildRoot (mounted as sparse bundle by darwinbuild) and darwinxref database:
Code:
hdiutil detach /Volumes/BuildRoot_9L30_20260721151829/
rm .build/xref.db
rm BuildRoot
for example. (use your volume name of course, is time dependent as you can see. Use mount command to see what mounted on your system)
I tried to put only files from
Code:
9A581
9B18
9C31
9F33
9G55
9J61
roots folders downloaded from Archive.org (I created folder for downloads, manually created numbered dirs there, cd into each dir in Terminal, click on corresponding link in web browser, use wget -i $url in each folder, so files with same name do not mix; added files into .DownloadCache starting with 9A folder and adding missing pieces from other folders
darwinbuild xnu
ends in same
Code:
/bin/sh: line 1: 85549 Bus error /usr/bin/dsymutil
Victory!
Editing /usr/bin/arch in chroot like this:
Code:
bash-3.2# cat BuildRoot/usr/bin/arch
#!/bin/sh
#uname -m
echo ppc
fixed cctools and xmu build!
After installing TargetConfig I get some error about tconf unable to find configuration. Googled myself back to this forum, and implemented this solution:
Code:
cp -p
BuildRoot//usr/local/share/TargetConfigs/MacOSX.plist BuildRoot//usr/local/share/TargetConfigs/Default.plist
fix for diskdev_cmds:
Code:
cp -p /Developer//SDKs/MacOSX10.5.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/storage/IOBDMedia.h BuildRoot//System/Library/Frameworks/IOKit.framework/Versions/A/Headers/storage/
So for now I have this list of compiled projects:
Csu
SystemStubs
OpenSSL
adv_cmds
bsdmake
text_cmds
libutil
bzip2
zlib
jam
zip
system_config
misc_cmds
man
bootstrap_cmds
developer_cmds
doc_cmds
file_cmds
shell_cmds
files
passwordserver_sasl
mDNSResponderSystemLibraries
autoconf
architecture
CoreOSMakefiles
Libc_headers
pb_makefiles
tcp_wrappers
pbx_jamfiles
netcat
TargetConfig
extenTools
keymgr
Librpcsvc
Libstreams
CF
crontabs
automake
basic_cmds
expat
file
flex
bc
apr
bison
bash
cscope
glibtool
gm4
gnudiff
uucp
pdisk
removefile
srm
patch_cmds
neon
ncurses
nasm
nano
lsof
libiconv
libmd
less
gpt
gperf
gnumake
gcc_select
Liby
pam
bsm
libresolv
libpcap
texi2html
xelf
vim
texinfo
tcsh
sudo
BootX
<--- here I fixed /usr/bin/arch -->
cctools
xnu
cctools_ofiles
hfs
pdisk
xar
diskdev_cmds
zsh
rsync
portmap
notify
mail_cmds
libfs
cron
ld64
awk
Libnotify
Libmx
Libm
Libcpp_kext
libstdcxx
openmpi
SystemStubs
OpenSSL
adv_cmds
bsdmake
text_cmds
libutil
bzip2
zlib
jam
zip
system_config
misc_cmds
man
bootstrap_cmds
developer_cmds
doc_cmds
file_cmds
shell_cmds
files
passwordserver_sasl
mDNSResponderSystemLibraries
autoconf
architecture
CoreOSMakefiles
Libc_headers
pb_makefiles
tcp_wrappers
pbx_jamfiles
netcat
TargetConfig
extenTools
keymgr
Librpcsvc
Libstreams
CF
crontabs
automake
basic_cmds
expat
file
flex
bc
apr
bison
bash
cscope
glibtool
gm4
gnudiff
uucp
pdisk
removefile
srm
patch_cmds
neon
ncurses
nasm
nano
lsof
libiconv
libmd
less
gpt
gperf
gnumake
gcc_select
Liby
pam
bsm
libresolv
libpcap
texi2html
xelf
vim
texinfo
tcsh
sudo
BootX
<--- here I fixed /usr/bin/arch -->
cctools
xnu
cctools_ofiles
hfs
pdisk
xar
diskdev_cmds
zsh
rsync
portmap
notify
mail_cmds
libfs
cron
ld64
awk
Libnotify
Libmx
Libm
Libcpp_kext
libstdcxx
openmpi
Attachments
Last edited: