OpenJDK 7 build fails on Snow Leopard

Greg Lewis glewis at eyesbeyond.com
Sun Oct 18 13:06:36 PDT 2009


G'day John,

On Fri, Oct 02, 2009 at 06:06:01PM -0700, John Rose wrote:
> With the current bsd-port plus unrelated MLVM patches I got a clean  
> Snow Leopard build.  It passed the MLVM regression tests.
> 
> I had to use GCC 4.0 as Michael suggested.
> 
> The 4.2 compiler is offering some porting resistance.  I put a patch  
> into MLVM which copes with the new "printf" warnings it generates:
>    http://hg.openjdk.java.net/mlvm/mlvm/hotspot/raw-file/f9a6cda5b465/snowleopard.patch

Looking at the patch, it defines FORMATL32_MODIFIER for all gcc >= 4.2.
Interestingly, FreeBSD (7.x) uses gcc 4.2.1 and doesn't have any problem
compiling HotSpot (its my main platform).  So perhaps this is overly
broad?  I'll give the patch a try and see if it causes any compile
problems.  If so then we probably want to restrict this to just MacOS X
and not all platforms in general.

I'd like to push this in before I start the b74 merge (just pushing the
b73 merge now).

> This patch is a bunch of lint-type fixes, and works fine on GCC 4.0.   
> (Haven't tested on Solaris, etc, but s.b. OK.)  It's probably not  
> worth the effort of pushing this patch upstream until we have a  
> working GCC 4.2 build.
> 
> The current problem with GCC 4.2 is that when I build on x86_32, the  
> JVM crashes in at least two places:  Under -Xint mode, the JVMG mode  
> throws an assert on exit, and otherwise it throws asserts or crashes  
> in compiler-related code.  The 64-bit version of the JVM appears to  
> work, but I haven't exercised it much.

FreeBSD 7.x/i386 doesn't exhibit these problems with gcc 4.2.1, so it
seems to be something specific to either MacOS X or Apple's version of
gcc 4.2.

> Since I'm chasing other problems, I'm going to leave GCC 4.2 alone for  
> now.  If anyone wants to pick up this issue, help yourself to  
> snowleopard.patch above.
> 
> -- John

> 


-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the mlvm-dev mailing list