Deploying for 10.4 or later UB, building on 10.5


#1

Hello,

I’m now building on 10.5 on an Intel using Xcode 3.1.1 using the standard xcconfig settings, i.e.:

ARCHS = i386 ppc MACOSX_DEPLOYMENT_TARGET_ppc = 10.3 MACOSX_DEPLOYMENT_TARGET = 10.4 SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk

When I build an app (e.g, the Juce Demo) on the Intel 10.5 machine, the built (Release) app fails to launch on a 10.4 PPC machine. (Double click and nothing happens.)

I tried launching the executable from the command line and the response is “Bus error”

Is anyone successfully doing this? (Perhaps I have a dodgy PPC machine, which is possible.)

Cheers,


#2

You might have better luck if you set the SDK root to the 10.4 libraries, rather than 10.5.


#3

OK I tried building the Juce libs and the app using:

ARCHS = i386 ppc MACOSX_DEPLOYMENT_TARGET_ppc = 10.3 MACOSX_DEPLOYMENT_TARGET = 10.4 SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk

Still doesn’t work on a (i.e, my) 10.4 PPC.

Strangely I tried a 10.3.9 PPC and both my app and the juce demo launch and display but some interactions (e.g., with sliders) crash in an NS routine (presumably cocoa).


#4

With the Juce tip I can now get this working i.e., building on 10.5 deploying for 10.4 or later UB. But not using the static libs.

If I build the Juce Demo on my 10.5 Intel using the default set-up using the amalgamated file I can transfer the app to my 10.4 ppc and it works.

If I reconfigure the Juce Demo to use the static libs i.e., removing the amalgamated lib and including “juce.h”, adding Juce.xcodproj to the frameworks section and libjuce.a to the link stage. It doesn’t work, again from the command line I get a “Bus error” when trying to launch the app.

I’m guessing this may be due to a difference in the way intermediate build object files are linked compared to static libs are linked. Of course, this is probably wrong and it may be simpler that this, but perhaps there is a linker setting in gcc that might help? Any ideas?


#5

Could this just be because you’ve not set up both the library and application settings to be the same?


#6

…quite possibly. I haven’t been through with a fine tooth comb yet. But the SDKs and Deployment targets are all 10.4.


#7

Well, if you’re seeing stuff like bus errors, that sounds to me like it’s not linked properly.


#8

On a problem roughly similar to this one, we resolved it by building using XCode 2.5.
It seems that even if both XCode 3 and XCode 2.5 are using GCC 4.0, somewhat the resulting app are different.


#9

I fixed this by removing the MACOSX_DEPLOYMENT_TARGET_ppc=10.3 setting and this seems to work building on Xcode 2.5 and Xcode 3.1 and deploying 10.4 UB

Sort of discussed here:

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=4055

(I was going to cross reference the threads but decided to keep the noise down!)