Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
Get rid of tigerports/leopardports. It's not part of the original how to build wiki. That's all I can think of. I never knew they existed or used them to build anything.

Cheers
 
  • Like
Reactions: pipetogrep
Currently stuck on building a dependency for gcc48 'ccloog'. I've attached the build log. The steps I've taken so far are above in the first post.
Hmmmm.... Is this a make issue? Try

mv /usr/bin/make /usr/bin/make-old
ln -s /opt/local/bin/gmake /usr/bin/make

(after trying, to revert):
mv /usr/bin/make-old /usr/bin/make

Also, gcc7 or gcc49 *probably* works fine for TFF and I'm pretty sure that has no issues.
 
libgcc7 builds fine on standard MacPorts, just not gcc7 itself AFAIK.
I built gcc7 from standard MacPorts on my G5, the exact compiler version is 7.5.0. There may have been some small hiccup in build process but nothing that required actual patching and/or debugging. Possibly had to deactivate some port or something.
 
Still struggling with libgcc7. It was going for two days but completely stopped logging to main.log for over 24 hours. I didn't know if it was stuck in some infinite loop or what. I've started the process over and am keeping a closer watch on the log output.

Is there anything I should know to make compiling libgcc7 easier (besides throwing more processors at it)?
 
Alright, libgcc7 finished compiling, but now I'm stuck on libgcc6 which is also a dependency for gcc48. I've attached the full log. Short story is it fails on:

Code:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/.tmp/ccRorGqP.s:10659:Bignum number illeg
al. Absolute 0 assumed.
:info:build make[3]: *** [data-streamer.o] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build /bin/sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/gcc-6.5.0/gcc/../move-if-change t
mp-automata.c insn-automata.c
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build echo timestamp > s-automata
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build rm gcc.pod
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/build/gcc'
:info:build make[2]: *** [all-stage1-gcc] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/build'
:info:build make[1]: *** [stage1-bubble] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/build'
:info:build make: *** [bootstrap-lean] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/work/build" && /usr/bin/m
ake -j2 -w bootstrap-lean
:info:build Exit code: 2
:error:build Failed to build libgcc6: command execution failed
:debug:build Error code: CHILDSTATUS 2972 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc6/libgcc6/main.log for details.
 

Attachments

  • libgcc6.log.zip
    36.7 KB · Views: 89
Well...I ran it again and now it's gotten further. I guess this whole process is just fragile and prone to weird sporadic errors. 🤷‍♂️
 
Still struggling with libgcc7. It was going for two days but completely stopped logging to main.log for over 24 hours. I didn't know if it was stuck in some infinite loop or what. I've started the process over and am keeping a closer watch on the log output.

Is there anything I should know to make compiling libgcc7 easier (besides throwing more processors at it)?
I’m pretty sure last time I compiled it for SM64EXLC it took even longer then 24 hours. I compiled MacPorts from source, installed LeopordPorts, and it eventually finished. This was not that long ago that I did this on the Mac mini G4. Are you installing with the -d debug flag? Not that it would fix an issue, but it provides constant output.
 
Well...I ran it again and now it's gotten further. I guess this whole process is just fragile and prone to weird sporadic errors. 🤷‍♂️
Honestly very strange, I had almost no issues on Leopard but I realize now that your on Tiger which is even less supported nowadays...
 
Fwiw, I have seen macports gcc builds fail on ppc when disk space is low - maybe 6GB or less. It seems to need a lot of elbow room during the build.
 
  • Like
Reactions: alex_free
I got through libgcc7, libgcc6, and gcc48. Now it's compiling gcc7. I failed once but I ran it again and it's continuing to build. I wonder if there's some kind of race condition going on that I keep hitting.
 
Fwiw, I have seen macports gcc builds fail on ppc when disk space is low - maybe 6GB or less. It seems to need a lot of elbow room during the build.
Good to know.

Code:
powermac-g4:~ chris$ df -h
Filesystem                Size   Used  Avail Capacity  Mounted on
/dev/disk0s12              80G    26G    54G    32%    /

Looks like I'm good for now but I'll definitly look out for it in the future.

Thanks!
 
  • Like
Reactions: alex_free
Progress!!!

Code:
sudo port install libidl autoconf213 gmake python27 gcc48 freetype

completed with no errors after nearly four days of compiling. Is there any way I can snapshot this macports environment for others to use?
 
I would just archive your whole /opt directory for back up purposes. After that I suppose you could also share it. In theory i think the only thing someone else would have do is add /opt/local/bin and /opt/local/sbin to their path for it to work.

Cheers
 
Progress!!!

Code:
sudo port install libidl autoconf213 gmake python27 gcc48 freetype

completed with no errors after nearly four days of compiling. Is there any way I can snapshot this macports environment for others to use?
I figured out how to do this “the proper way” when creating
MacPorts GCC 4.9 Installer. It’s 4 hours (mostly because of the local ports tree sync, if you don’t do this then MacPorts might update the package versions before you run your script and when it does not find the binary package for the latest version it will either error out or start compiling the new source depending on what your doing. This could possibly be optimized by syncing a limited ports tree, with only the required port files but I have not tried that.) vs days on my Mac mini G4. You have to sync a local ports tree, setup a local repo, disable the internet repos temporarily and install packages in binary mode, then revert all those changes (which is what the install script does if you want to see how I attempted this issue).

Just compressing /opt also works, much faster as well but if someone has an existing MacPorts installation their installed packages list might get screwed up.

You could create an arbitrary location to compile to (like I do for SM64EXLC (compile MacPorts from source but with a specified prefix like /Applications/SM64EXLC.app in this case). Then you can run a script to compile whatever you need consistently without requiring MacPorts installed or even Xcode depending on what your doing (but TFF probably requires Xcode).

Perhaps I should make something that can do this easily with good UX.
 
Last edited:
  • Like
Reactions: pipetogrep
I would just archive your whole /opt directory for back up purposes. After that I suppose you could also share it. In theory i think the only thing someone else would have do is add /opt/local/bin and /opt/local/sbin to their path for it to work.

Cheers
How portable is this between G4 and G5 processors and multiple G4 versions?
 
So I'm stuck on this part
Finally, you must install the TenFourFox debugger, because the gdb available with any PowerPC Xcode does not properly grok debugging symbols generated by later gcc versions. At least patchlevel 2 is required for the current version of 10.4Fx. Decompress and copy the binary to /usr/local/bin/gdb7 or wherever it is convenient. Although you can use it to replace your current gdb, it's probably safer that you do not. You can also get it from SourceForge.
I've downloaded gdb from sourceforge but I don't see a precompiled binary. Do I need to build it first?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.