OpenJDK 7 build fails on Snow Leopard

Andrew John Hughes gnu_andrew at
Mon Oct 19 01:59:51 PDT 2009

2009/10/19 Greg Lewis <glewis at>:
> G'day John,
> On Sun, Oct 18, 2009 at 01:06:36PM -0700, Greg Lewis wrote:
>> 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:
>> >
>> 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.
> Following up my own email...
> I did do a test compile without any problems on FreeBSD.  Looking further
> at the patch I have to wonder why the OpenJDK code is essentially doing a
> mini version of the printf defines from <inttypes.h>.  Thats a standard
> C99 header file, so why not just use the defines there?  E.g. just use
> PRIdPTR instead of the JVM defining its own PTR_FORMAT.
> --
> Greg Lewis                          Email   : glewis at
> Eyes Beyond                         Web     :
> Information Technology              FreeBSD : glewis at

I know, from recent discussions, that C99 has been avoided in some
cases because the Windows compiler doesn't support it, resulting in
similar local definitions and hacks.  This may also be the case here.
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (

Support Free Java!
Contribute to GNU Classpath and the OpenJDK

PGP Key: 94EFD9D8 (
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

More information about the bsd-port-dev mailing list