Mac newbie question: Compilation Errors

Hi Guys,

I’m trying to compile an application on the Mac the needs to work on both Mac OS X 10.3.9 and Mac OS X 10.4 on both Intel and PowerPC architectures.

This is my xcconfig file:

ARCHS = ppc i386
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk
GCC_VERSION_ppc = 3.3
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
OTHER_LD_FLAGS_ppc = /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/darwin/3.3/libstdc++.a
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk

But I get the following compile time error:

    cd "/Users/brad/Desktop/Matrix Mixer 14 (1.010) (J1_34)/build/macosx"
    setenv MACOSX_DEPLOYMENT_TARGET 10.3
    setenv NEXT_ROOT /Developer/SDKs/MacOSX10.3.9.sdk
    /usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -D_NDEBUG=1 -DNDEBUG=1 -fmessage-length=0 -mtune=G4 -Wno-invalid-offsetof -Wp,-header-mapfile,/Users/brad/Desktop/Matrix\ Mixer\ 14\ (1.010)\ (J1_34)/build/macosx/build/jucedemo.build/Release/jucedemo.build/jucedemo.hmap -mdynamic-no-pic -F/Users/brad/Desktop/Matrix\ Mixer\ 14\ (1.010)\ (J1_34)/build/macosx/build/Release -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks -I/juce_1_34 -I/Developer/usr/include -I/Users/brad/Desktop/Matrix\ Mixer\ 14\ (1.010)\ (J1_34)/build/macosx/build/Release/include -I/Developer/SDKs/MacOSX10.3.9.sdk/Developer/Headers/FlatCarbon -I/juce_1_34 -I/Developer/usr/include -I/Users/brad/Desktop/Matrix\ Mixer\ 14\ (1.010)\ (J1_34)/build/macosx/build/jucedemo.build/Release/jucedemo.build/DerivedSources -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 -fconstant-cfstrings -D__CONSTANT_CFSTRINGS__ -isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/3.3 -I/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/3.3/c++ -I/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/3.3/c++/ppc-darwin -isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include -c /Users/brad/Desktop/Matrix\ Mixer\ 14\ (1.010)\ (J1_34)/build/macosx/../../../Source\ Code\ 14/AudioMixer.cpp -o /Users/brad/Desktop/Matrix\ Mixer\ 14\ (1.010)\ (J1_34)/build/macosx/build/jucedemo.build/Release/jucedemo.build/Objects-normal/ppc/AudioMixer.o
In file included from /usr/include/sys/acl.h:26,
                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:61,
                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:32,
                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:81,
                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /juce_1_34/src/juce_core/basics/juce_PlatformDefs.h:72,
                 from /juce_1_34/src/juce_core/basics/juce_StandardHeader.h:105,
                 from /juce_1_34/juce.h:43,
                 from /Users/brad/Desktop/Source Code 14/AudioMixer.h:4,
                 from /Users/brad/Desktop/Source Code 14/AudioMixer.cpp:1:
/usr/include/sys/kauth.h:233: error: `user_addr_t' was not declared in this scope
/usr/include/sys/kauth.h:233: error: parse error before `,' token
	                 from /Users/brad/Desktop/Source Code 14/AudioMixer.cpp:1:
		                 from /Users/brad/Desktop/Source Code 14/AudioMixer.h:4,
			                 from /juce_1_34/juce.h:43,
				                 from /juce_1_34/src/juce_core/basics/juce_StandardHeader.h:105,
					                 from /juce_1_34/src/juce_core/basics/juce_PlatformDefs.h:72,
						                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
							                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:81,
								                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:32,
									                 from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:61,
										In file included from /usr/include/sys/acl.h:26,
											/usr/include/sys/kauth.h:233: error: `user_addr_t' was not declared in this scope
											/usr/include/sys/kauth.h:233: error: parse error before `,' token

Does anyone know how to resolve this? I’m using Xcode 2.2.1

Regards,
Philip

If you stick to the original xcconfig file, that’ll work on any version from 10.2 to 10.4. Why are you trying to change it to be explicitly 10.3?

I don’t have the SDK for 10.2

Oh, well I can’t really see what’s up with your xcconfig without trying it myself, which I’ve not got time to do right now… Probably just something simple. Trial and error is usually how I get those things to work…

I have played with the settings and complied a version of the jucedemo which I think works on both MAC OS X 10.3.9 and 10.4. I have put it at http://phil.rucus.net/jucedemo_web.zip I have MAC OS X 10.4 here with me and it works OK. I was just wondering if someone with MAC OS X 10.3.9 would be so kind as to download the demo I compiled and tell me whether it runs successfully on that version of the OS?