Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [jna-users] Java 5 dependency on OSX



On 30-Jul-07, at 2:34 PM, Timothy Wall wrote:

On Jul 30, 2007, at 3:57 PM, Doug Zwick wrote:

FYI my makefile places no -l terms in the link statement, only - framework terms:

/usr/bin/gcc-3.3 -arch ppc -pipe -fmessage-length=0 -L/Developer/ SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/darwin/ -F/Developer/SDKs/ MacOSX10.3.9.sdk/System/Library/Frameworks -framework JavaVM - framework ApplicationServices -framework Foundation -dynamiclib - Wl,-single_module -compatibility_version 1 -current_version 1 - mmacosx-version-min=10.2 -Wl,-syslibroot,/Developer/SDKs/ MacOSX10.3.9.sdk ppc/xxx.o -lstdc++ -install_name libxxx.jnilib -o ppc/libxxx.jnilib

/usr/bin/gcc-4.0 -arch i386 -pipe -fmessage-length=0 -L/Developer/ SDKs/MacOSX10.4u.sdk/usr/lib/gcc/darwin/ -F/Developer/SDKs/ MacOSX10.4u.sdk/System/Library/Frameworks -framework JavaVM - framework ApplicationServices -framework Foundation -dynamiclib - Wl,-single_module -compatibility_version 1 -current_version 1 - mmacosx-version-min=10.4 -Wl,-syslibroot,/Developer/SDKs/ MacOSX10.4u.sdk x86/xxx.o -lstdc++ -install_name libxxx.jnilib - o x86/libxxx.jnilib

We have different SDK requirements for PPC and x86 jnilibs, hence the architecture-specific builds with different tool sets (one for ppc w/GCC 3 and one for x86 w/GCC 4).

The original poster was trying to build JNA with OSX 10.3 compatibility (which is only for PPC, right?).

10.3 is PPC only. Building for Intel (Universal or x86-only) requires the use of the 10.4u SDK (or its successors). Such a lib may or may not run under 10.3, depending on what the native code does. If you require the 10.3 SDK to build for 10.3, you wind up with a PPC-only library. We build separate libs for 10.2.8+ on PPC, and 10.4+ on x86, and distribute only the lib required for the running platform (via JWS). The independent libs can also be bound together into a Universal Binary using lipo as an additional build step, which would make sense for an Application Bundle distribution. I think 10.3 also requires use of GCC 3.3 or older (it lacks the runtime support libraries for GCC 4.0, so I suppose you could do static linking tricks to bind them into your JNI library, but I've never tried that on OS X).


One note is that the 10.2.8 SDK includes only a 1.3.1 JVM, even though 1.4.1 is available after about 10.2.4. You cannot link JAWT code using the 10.2.8 SDK. You need to get the 1.4.1 framework version from a live 10.2.4+ system and update the 10.2.8 SDK with it in order to build for 10.2.8 SDK. We build our lib against the 10.3 SDK, and know it will run in 10.2.8 because the library only uses 10.2.8 features (but there is no compile-time support for this).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden


This email sent to email@hidden
References: 
 >Re: Fwd: [jna-users] Java 5 dependency on OSX (From: Doug Zwick <email@hidden>)
 >Re: [jna-users] Java 5 dependency on OSX (From: Timothy Wall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.