Francis Devereux

October 29, 2008

Installing gcc 3.3 on Mac OS X Leopard/Intel

Filed under: Computers, Mac OS X, Software Development — frankoid @ 5:01 pm

In order to build applications that run on Mac OS versions prior to 10.3.9, you need to use gcc 3.3 (see this Apple documentation for details). This is a problem if you have an Intel Mac running Leopard, because the Xcode 2.5 installer will only allow you to install gcc 3.3 on Tiger. However, there is a way to get it to install anyway… Be warned that Apple probably had a good reason to prevent gcc 3.3 from being installed on Leopard, so this may break your system and/or the binaries that you compile. However, it did work for me and allowed me to compile a small application that ran OK on OS X 10.3.7/PPC. Here’s how to do it:

  1. Install Xcode 2.5, including the 10.3.9 SDK.
  2. Copy gcc3.3.pkg from the Packages/Packages directory in the Xcode Tools disk image to your desktop.
  3. Open the copy of gcc3.3.pkg (right click it and choose “Show Package Contents”).
  4. Open gcc3.3.pkg/Resources/VolumeCheck in a text editor.
  5. Change if( CheckVersion("$SYSTEM_VERS", "10.5", "ProductVersion", ">=" )) to if( CheckVersion("$SYSTEM_VERS", "10.6", "ProductVersion", ">=" )) and save the file.
  6. Double-click on your modified copy of gcc3.3.pkg. You will now be able to install it like any standard Installer package.
  7. “If it breaks you get to keep both pieces.”
Advertisements

1 Comment »

  1. I like number 7 😉

    Comment by Tim — March 30, 2009 @ 7:05 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: