jdk8 and MacOSX Mavericks XCode gcc

Bob Vandette bob.vandette at oracle.com
Thu Oct 24 09:58:10 PDT 2013


I'm not trying to do a complete OSX build but here's my experience trying to build the JDK8
sources with Xcode 5 which has removed the gcc compilers in favor of llvm.  They
do have some gcc compatibility commands which help but you need to install Command Line
Tools.

1. Installed the Command Line Tools optional package.

2. Had to disable GCC compiler check in toolchain.m4 and run autogen.sh
Was complaining since gcc --version doesn't provide expected output.

3. Compiler options ignored messages.  We'll need to remove these options.
-fcheck-new
-fpch-deps

4. Lots of warnings of unused enum in switch.  May need to add -Wswitch as a temp work-around until
    we figure out if these need to be fixed.  

   Lots of warnings of un-used parameter.  May need to add -Wunused-parameter as a temp work-around
   until we figure out if these need to be fixed.  

5. No X11 header files causes compilation problems with AWT files.

/jdk/src/solaris/native/sun/awt/utility/rect.h: fatal error: 'X11/Xlib.h' file not found
jdk/src/solaris/native/sun/awt/awt.h:38:10: fatal error: 'X11/Intrinsic.h' file not found

Ended up putting X11 header files path in MY_CFLAG via -I option in my build script temporarily.
You could probably install the header files in /usr/include/X11 or in the toolchain header path
until we eliminate X11 dependencies for MacOSX builds.  I'm building without any GUI but
the build still needs the header files to compile a few files.

Bob Vandette


On Oct 24, 2013, at 12:39 PM, Georges Saab <georges.saab at oracle.com> wrote:

> There is a currently a discussion of this going on at build-dev at openjdk.java.net
> 
> (short answer -- yes, there are issues)
> 
> 
> On Oct 24, 2013, at 9:29 AM, René Jansen <rvjansen at xs4all.nl> wrote:
> 
>> It appears that the recent update keeps me from doing builds from source on above combination. Did anyone confirm/solve this?
>> 
>> best regards,
>> 
>> René Jansen.
> 



More information about the jdk8-dev mailing list