Cross-compiling from 10.8 to 10.7

Scott Kovatch scott.kovatch at oracle.com
Mon Sep 10 10:47:03 PDT 2012


On Sep 10, 2012, at 9:57 AM, Mike Swingler <swingler at apple.com> wrote:

> On Sep 10, 2012, at 9:28 AM, Scott Kovatch <scott.kovatch at oracle.com> wrote:
> 
>> Folks,
>> 
>> I think we need to make some changes to the compiler options on the Mac. I'm finding that if you build the entire JDK as it is now on 10.8 with Xcode 4.4.1 it won't work when you drag the JDK or JRE back to a 10.7 machine.
>> 
>> The official build machines are still on 10.7.4, and that's fine, but it would be good if we didn't have to make a local change to get a compatible build. And as new build machines become available, and have 10.8 pre-installed, this will become a problem.
>> 
>> I'll try to address this sometime this week. I don't think it will be that tough, but if anyone has some spare cycles and a 10.8 and 10.7 system and would be willing to tackle it I'll happily review the patch. We know from appbundler and deploy that the only change needed is to add
>> 
>> -mmacosx-version-min=10.7
>> 
>> to CFLAGS, but there are a couple of places (I think) where the base compiler options are set. We may also need
>> 
>> -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
>> 
>> but I'm not convinced yet.
> 
> -isysroot should not be necessary.

Okay. I found that out the hard way. :-\ 

libdeploy is linked with /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork, which doesn't exist in 10.7. I haven't figured out why, as I don't explicitly link to it with -F. We use SystemConfiguration.framework; I'm not sure if that pulls it in or not.

-- Scott K.

----------------------------------------
Scott Kovatch
scott.kovatch at oracle.com
Santa Clara/Pleasanton, CA





More information about the macosx-port-dev mailing list