[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-dev
Subject:    RFR (S): 7125793: MAC: test_gamma should always work
From:       james.melvin () oracle ! com (James Melvin)
Date:       2011-12-31 16:43:50
Message-ID: 4EFF3BC6.3060407 () oracle ! com
[Download RAW message or body]

Hi,

This change fixes the 'gamma' simple launcher for HotSpot on Mac OS X.
There were 3 primary changes required to re-enable gamma...

1) Statically link with CoreFoundation framework to resolve symbols

The gamma launcher dlopen()s libjava.dylib from $JAVA_HOME/jre/lib.
Because Mac OS X files are case-insensitive by default, we collide on
$FRAMEWORK/libJPEG.dylib and ${JAVA_HOME}/jre/lib/libjpeg.dylib. This
resulted in unresolved symbols in the Mac OS X framework libraries. The
solution for gamma was to statically link with CoreFoundation framework
to properly resolve framework symbols and allow gamma to successfully
dlopen() libjava.dylib.

2) Adjust various paths to reflect no arch subdirs

On Mac OS X, there are no arch subdirs, e.g jre/lib vs jre/lib/<arch>.
Instead, one can use universal binaries to package multiple
architectures in a single binary. At the moment though, we are only
building 64-bit non-universal binaries. Note, the test_gamma script
assumes an Oracle JDK layout for JAVA_HOME, derived from ALT_BOOTDIR.
Using an Apple JDK for ALT_BOOTDIR will fail the test_gamma script
gracefully, as libjava.dylib is in a different, unexpected place.

3) Modify test_gamma script to set library path only for gamma launch

Setting DYLD_LIBRARY_PATH adversely affects the real java launcher(s).
Instead, set this later in the script only for the gamma launcher test
run. While in there, I took the liberty of decrypting the script to make
it more maintainable and more easily merged whenever we reconcile the
unix ports into a single codebase. There is no change to the script output.

Feedback welcome...

WEBREV:
   http://cr.openjdk.java.net/~jmelvin/7125793/webrev.00

TESTS RUN:
   JPRT  2011-12-31-061123.jmelvin.7125793
   local Mac OS X builds/tests


Thanks and Happy New Year!

Jim

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic