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.
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.
I will try to give all of this a go on a separate installation. Thanks for the tips! In the meantime, I’ll be uploading my compressed opt directory to an S3 bucket and scripting the download and installation of it for anyone that wants to try and build TenFourFox without an existing macPorts install.

I am curious if it’ll be limited to a G4 environment since it was compiled on a G4 or if it’ll run on a G5 as well.
 
  • Like
Reactions: bobnugget
You don't need it to build TFF. It's only useful for debugging purposes.

Cheers
Makes sense. I would be interested in knowing how to set it up all the same. I am a developer, just not a C developer, so I'm interested in learning this stuff.
 
  • Like
Reactions: wicknix
In theory, saving the tree of Portfiles that built successfully would be sufficient? We can save the MacPorts pkgs at particular versions too.
 
First TenFourFox build attempt. Trying to make sense of these errors:
Code:
In the directory  /Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/dom/bindings
The following command failed to execute properly:
/opt/local/bin/g++-mp-4.8 -flax-vector-conversions -fpermissive -O3 -mcpu=7450 -mtune=7450 -falign-loops=16 -falign-functions=16 -falign-labels=16 -falign-jumps=16 -read_only_relocs suppress -mdynamic-no-pic -o UnifiedBindings18.o -c -fvisibility=hidden -fvisibility-inlines-hidden -DOS_POSIX=1 -DOS_MACOSX=1 -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/Volumes/OtherExternal/tenfourfox-master/dom/bindings -I. -I../../dist/include/mozilla/dom -I/Volumes/OtherExternal/tenfourfox-master/dom/base -I/Volumes/OtherExternal/tenfourfox-master/dom/battery -I/Volumes/OtherExternal/tenfourfox-master/dom/bluetooth/common/webapi -I/Volumes/OtherExternal/tenfourfox-master/dom/camera -I/Volumes/OtherExternal/tenfourfox-master/dom/canvas -I/Volumes/OtherExternal/tenfourfox-master/dom/geolocation -I/Volumes/OtherExternal/tenfourfox-master/dom/html -I/Volumes/OtherExternal/tenfourfox-master/dom/indexedDB -I/Volumes/OtherExternal/tenfourfox-master/dom/media/webaudio -I/Volumes/OtherExternal/tenfourfox-master/dom/media/webspeech/recognition -I/Volumes/OtherExternal/tenfourfox-master/dom/svg -I/Volumes/OtherExternal/tenfourfox-master/dom/workers -I/Volumes/OtherExternal/tenfourfox-master/dom/xbl -I/Volumes/OtherExternal/tenfourfox-master/dom/xml -I/Volumes/OtherExternal/tenfourfox-master/dom/xslt/base -I/Volumes/OtherExternal/tenfourfox-master/dom/xslt/xpath -I/Volumes/OtherExternal/tenfourfox-master/dom/xul -I/Volumes/OtherExternal/tenfourfox-master/js/xpconnect/src -I/Volumes/OtherExternal/tenfourfox-master/js/xpconnect/wrappers -I/Volumes/OtherExternal/tenfourfox-master/layout/style -I/Volumes/OtherExternal/tenfourfox-master/layout/xul/tree -I/Volumes/OtherExternal/tenfourfox-master/media/mtransport -I/Volumes/OtherExternal/tenfourfox-master/media/webrtc -I/Volumes/OtherExternal/tenfourfox-master/media/webrtc/signaling/src/common/time_profiling -I/Volumes/OtherExternal/tenfourfox-master/media/webrtc/signaling/src/peerconnection -I../../ipc/ipdl/_ipdlheaders -I/Volumes/OtherExternal/tenfourfox-master/ipc/chromium/src -I/Volumes/OtherExternal/tenfourfox-master/ipc/glue -I../../dist/include -I/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/dist/include/nspr -I/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/dist/include/nss -I/Volumes/OtherExternal/tenfourfox-master/jpeg-imageio -fPIC -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/UnifiedBindings18.o.pp -I/Volumes/OtherExternal/tenfourfox-master/jpeg-imageio -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -DNO_X11 -pipe -DNDEBUG -DTRIMMED -gdwarf-2 -O3 -Wno-uninitialized /Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/dom/bindings/UnifiedBindings18.cpp
gmake[5]: *** [/Volumes/OtherExternal/tenfourfox-master/config/rules.mk:957: UnifiedBindings18.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
gmake[5]: Entering directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/modules/modules_PCM16B'
Unified_c_webrtc_modules0.o
Unified_cpp_webrtc_modules0.o
cc1: warning: command line option '-fvisibility-inlines-hidden' is valid for C++/ObjC++ but not for C [enabled by default]
cc1: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie' or '-fPIE' [enabled by default]
cc1plus: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie' or '-fPIE' [enabled by default]
libPCM16B.a.desc
gmake[5]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/modules/modules_PCM16B'
gmake[5]: Entering directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/common_video/common_video_common_video'
Unified_cpp_webrtc_common_video0.o
cc1plus: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie' or '-fPIE' [enabled by default]
libcommon_video.a.desc
gmake[5]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/common_video/common_video_common_video'
gmake[5]: Entering directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/modules/modules_G711'
Unified_c_webrtc_modules0.o
Unified_cpp_webrtc_modules0.o
cc1: warning: command line option '-fvisibility-inlines-hidden' is valid for C++/ObjC++ but not for C [enabled by default]
cc1: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie' or '-fPIE' [enabled by default]
cc1plus: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie' or '-fPIE' [enabled by default]
libG711.a.desc
gmake[5]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/modules/modules_G711'
gmake[5]: Entering directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/common_webrtc_common'
Unified_cpp_webrtc_trunk_webrtc0.o
cc1plus: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie' or '-fPIE' [enabled by default]
libwebrtc_common.a.desc
gmake[5]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/dom/bindings'
gmake[4]: *** [/Volumes/OtherExternal/tenfourfox-master/config/recurse.mk:71: dom/bindings/target] Error 2
gmake[4]: *** Waiting for unfinished jobs....
gmake[5]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg/media/webrtc/trunk/webrtc/common_webrtc_common'
gmake[4]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg'
gmake[3]: *** [/Volumes/OtherExternal/tenfourfox-master/config/recurse.mk:33: compile] Error 2
gmake[3]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg'
gmake[2]: *** [/Volumes/OtherExternal/tenfourfox-master/config/rules.mk:547: default] Error 2
gmake[2]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master/obj-ff-dbg'
gmake[1]: *** [/Volumes/OtherExternal/tenfourfox-master/client.mk:396: realbuild] Error 2
gmake[1]: Leaving directory '/Volumes/OtherExternal/tenfourfox-master'
gmake: *** [client.mk:171: build] Error 2
 
When I upload my ports tree, should I do a port clean to clear out the distfiles or should I leave them there for the sake of having that source code from that point in time?
 
Success! I’m not sure what the build errors were about but I rerunning it a couple of times got it through. Now I’m scripting up the Macports environment I used for distribution.

First TenFourFox Build.png
 
Nice. You may have just run out of free memory during some linking stages. Rerunning probably freed up enough to get it to finish. 4gb ram is the recommended minimum to build (and more is obviously even better).

When i get some free time i'll write up a "complete" rebranding guide for you guys to use, since once the official final TFF release is done CK requests any new distributed builds be renamed and use different icons. It's a fairly long process, but my how-to should cover most every file that needs editing, and every icon that needs to be replaced. See IceWeasel-PPC as an example.

Cheers
 
@wicknix @alex_free May I get your opinions on this bit of scripting? https://github.com/llamallama/macports-tenfourfox.

It's meant to be used on a machine that doesn't have MacPorts set up yet. Othersie, it completely removes MacPorts and downloads and installs the environment I got working. I'm hosting it on an S3 bucket so it should be pretty resilient for anyone else that wants to make use of it.

I'm open to any way that I could improve the process.

Thanks again for all the help!
 
  • Like
Reactions: alex_free
@wicknix @alex_free May I get your opinions on this bit of scripting? https://github.com/llamallama/macports-tenfourfox.

It's meant to be used on a machine that doesn't have MacPorts set up yet. Othersie, it completely removes MacPorts and downloads and installs the environment I got working. I'm hosting it on an S3 bucket so it should be pretty resilient for anyone else that wants to make use of it.

I'm open to any way that I could improve the process.

Thanks again for all the help!
I think it's better to compile MacPorts itself from source in the script to a custom prefix, something like /usr/local/tff and then the user can simply run some script which downloads some tarball and extracts it to /usr/local/tff, sets the path to /usr/local/tff/bin, and then builds TFF. Definitely can help you out with the custom prefix bit if you want. Uninstalling all of MacPorts doesn't have to happen.

S3 buckets are expensive, a free alternative is to use Macintoshgarden and make a TFF Builder page. Max file size is like a DLDVD so not an issue.
 
  • Like
Reactions: wicknix
Ah, yeah. I'm on a PowerMac G4 Gigabit
Yep, that was the reason then. I've only built it on my 1.6ghz G5 which tops out at 4gb, but it was enough.

I also agree with the above... it's better to compile macports with a custom directory so that current users of macports can use it without wrecking their install. However, a quick work-a-round would be to include instructions stating that if the user already has macports installed to rename /opt/local to /opt/local.orig, then install your package. This will preserve paths and allow one to build TFF. When done, rename /opt/local to /opt/tff and rename /opt/local.orig back to /opt/local. It's not the most convenient, but it'll work without messing things up.

Cheers
 
  • Like
Reactions: alex_free
Yep, that was the reason then. I've only built it on my 1.6ghz G5 which tops out at 4gb, but it was enough.

I also agree with the above... it's better to compile macports with a custom directory so that current users of macports can use it without wrecking their install. However, a quick work-a-round would be to include instructions stating that if the user already has macports installed to rename /opt/local to /opt/local.orig, then install your package. This will preserve paths and allow one to build TFF. When done, rename /opt/local to /opt/tff and rename /opt/local.orig back to /opt/local. It's not the most convenient, but it'll work without messing things up.

Cheers
You can't rename /opt/local to /opt/local/tff without changing every single dynamic library's path from /opt/local to /opt/local/tff if you want to use your existing MacPorts installation and this thing at the same time.
 
Agree. Was just giving an alternative option rather than rebuilding 4 days worth of gcc's just to change macports working directory.

Cheers
Definitely. I've had to do this for SM64EX Leopard Compiler.

If there is a TFF Builder thing released mine as well make it the best it can be though, may look into this eventually but I need to update PPCMC7 and Links2 before any of that...
 
  • Like
Reactions: wicknix
Fwiw, MacPorts allows you to create your own binary archives, which other users can install by placing them in the incoming folder. There are advantages and downsides to this route, but might be a bit less brute-force... and now that you've got the packages built, I don't think there's any downside. You should be able to use port archive...
 
  • Like
Reactions: pipetogrep
Fwiw, MacPorts allows you to create your own binary archives, which other users can install by placing them in the incoming folder. There are advantages and downsides to this route, but might be a bit less brute-force... and now that you've got the packages built, I don't think there's any downside. You should be able to use port archive...
I’d like to go this route.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.