Adium

Ticket #10308 (new defect)

Opened 5 months ago

Last modified 4 months ago

Cannot build with gcc 4.2

Reported by: rgovostes Assigned to: nobody
Priority: normal Milestone: Waiting on Apple
Component: Adium Core Version: 1.2.5
Severity: normal Keywords:
Cc: Patch: Initially Included
Pending: 0

Description

The 10.4u and 10.5 SDKs do not include headers required to build FriBidi, JSON, and RBSplitView, required components of Adium with gcc version 4.2.1, which is default on some systems.

You can determine which version of gcc is default by opening Terminal and typing gcc --version:

i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5564)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Workaround A

You can configure these projects to use GCC 4.0. See the attached patch to take care of this for you.

Workaround B

If you are on Mac OS X 10.5 "Leopard", you may become a registered iPhone developer and download the iPhone SDK. Then change the projects above to use the 10.5 SDK.

Workaround C

This may have unintended consequences but is easy to revert: You can make a link within your 10.4u SDK to use the headers in another SDK. For instance, if you have the iPhone SDK installed as above, you could run (substituting darwin9 with the release of your kernel):

sudo ln -s /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1 /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1
sudo ln -s /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.2.1 /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.2.1

Or, if you do not have the iPhone SDK, you may simply use the 4.0.1 headers:

sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1

Attachments

use-gcc-4.0.diff (11.4 kB) - added by rgovostes on 07/01/2008 10:49:15 PM.

Change History

07/01/2008 10:49:15 PM changed by rgovostes

  • attachment use-gcc-4.0.diff added.

07/01/2008 11:37:59 PM changed by rgovostes

If you are compiling dependencies via the build scripts in Utilities/dep-build-scripts/, you may want to force it to use gcc 4.0.1 rather than 4.2.1. Edit the common.sh script, and find the line

SDK_ROOT="/Developer/SDKs/MacOSX10.4u.sdk"

Above it, add,

export CC=/usr/bin/gcc-4.0

07/31/2008 01:45:12 AM changed by rgovostes

  • summary changed from Cannot build Deployment-Debug with gcc 4.2 to Cannot build with gcc 4.2.