OpenJDK 7 build fails on Snow Leopard
Michael Franz
mvfranz at gmail.com
Sun Sep 13 05:09:39 PDT 2009
The patch is also in the change set I am using. I wonder if this is because
of an _LP64 definition in
hotspot/src/share/vm/utilities/globalDefinitions.hpp , this defines
INTX_FORMAT based on _LP64. I have seen this problem before on OS X, where
LP64 is used but works a little different on OS X.
On Sat, Sep 12, 2009 at 9:04 PM, Michael Franz <mvfranz at gmail.com> wrote:
> I am using these change sets from the bsdport repo.
> OPENJDK_CHANGESET = 428565383a55
> CORBA_CHANGESET = d78d74f54632
> JAXP_CHANGESET = 25b32432ad4c
> JAXWS_CHANGESET = d2b6b2d2581d
> JDK_CHANGESET = ac301b6fdfad
> LANGTOOLS_CHANGESET = 41a366b862a2
> HOTSPOT_CHANGESET = 4256b1662add
>
> The patch is in change set 20c6f43950b5 for the bsd-port and as far as I
> can tell should be in tip. However, I am no mercurial expert, so I could
> be wrong.
>
> Michael
>
>
> On Sat, Sep 12, 2009 at 7:53 PM, Andrew John Hughes <
> gnu_andrew at member.fsf.org> wrote:
>
>> 2009/9/12 Michael Franz <mvfranz at gmail.com>:
>> > vsrikarunyan,
>> >
>> > Did this solve your problem? It got me past the original error, but I
>> am
>> > not getting :
>> > hotspot/src/share/vm/runtime/arguments.cpp: In static member function
>> > 'static void Arguments::set_aggressive_opts_flags()':
>> > hotspot/src/share/vm/runtime/arguments.cpp:1375: warning: format '%d'
>> > expects type 'int', but argument 3 has type 'intx'
>> > make[7]: *** [arguments.o] Error 1
>> >
>> > I guess this might be a gcc 4.2 vs 4.0 issue rather than Snow Leopard
>> issue.
>> >
>>
>> This is fixed by a patch in IcedTea6,
>> patches/hotspot/default/icedtea-format.patch:
>>
>> diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp
>> openjdk/hotspot/src/share/vm/runtime/arguments.cpp
>> --- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2009-02-03
>> 18:08:09.000000000 +0000
>> +++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-02-03
>> 18:32:59.000000000 +0000
>> @@ -1361,7 +1361,7 @@
>>
>> // Feed the cache size setting into the JDK
>> char buffer[1024];
>> - sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d",
>> AutoBoxCacheMax);
>> + sprintf(buffer, "java.lang.Integer.IntegerCache.high="
>> INTX_FORMAT, AutoBoxCacheMax);
>> add_property(buffer);
>> }
>> if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
>>
>> and the same fix is in OpenJDK7 through a separate Sun changeset:
>> http://hg.openjdk.java.net/jdk7/jdk7/hotspot/rev/2328d1d3f8cf from
>> 2008.
>> So I don't know what sources you are using as this issue shouldn't
>> still exist. Merge issue maybe?
>>
>> > Michael
>> >
>> > On Tue, Sep 8, 2009 at 11:56 AM, Greg Lewis <glewis at eyesbeyond.com>
>> wrote:
>> >>
>> >> On Fri, Sep 04, 2009 at 02:57:34AM -0700, Venkateshwaralu Srikarunyan
>> >> wrote:
>> >> > I am newbie and was trying to get started with the build for the
>> OpenJDK
>> >> > 7.
>> >> > I was following the wiki by Stephen
>> >> > Bannasch<http://confluence.concord.org/display/%7Estepheneb>at
>> >> >
>> >> >
>> >> >
>> http://confluence.concord.org/display/CCTR/Build+OpenJDK+Java+1.7.0+on+Mac+OS+X+10.5
>> >> >
>> >> > But ended up facing the following build error
>> >> >
>> >> > /ucontext.h:42:2: error: #error ucontext routines are deprecated, and
>> >> > require _XOPEN_SOURCE to be defined
>> >> >
>> >> > Request for guidance from someone to help me get this build up and
>> >> > running.
>> >> > Thanks.
>> >>
>> >> You might be the first person to try the build on Snow Leopard :). It
>> >> looks like you need to insert a -D_XOPEN_SOURCE into CFLAGS for the
>> >> hotspot
>> >> build. Assuming that doesn't break the build on 10.5.x we should
>> probably
>> >> just do it for all the Mac builds. Can you try the following patch?
>> >>
>> >> --- a/make/bsd/makefiles/vm.make Mon Sep 07 10:57:43 2009 -0700
>> >> +++ b/make/bsd/makefiles/vm.make Tue Sep 08 08:55:15 2009 -0700
>> >> @@ -112,6 +112,7 @@
>> >> JVM = jvm$(G_SUFFIX)
>> >> ifeq ($(OS_VENDOR), Darwin)
>> >> LIBJVM = lib$(JVM).dylib
>> >> + CFLAGS += -D_XOPEN_SOURCE
>> >> else
>> >> LIBJVM = lib$(JVM).so
>> >> endif
>> >>
>> >>
>> >> > My Environment looks like this
>> >> >
>> >> > vsrikarunyan@~$ uname -s -r
>> >> > Darwin 10.0.0
>> >> >
>> >> > vsrikarunyan@~$ gcc --version
>> >> > i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
>> >> > Copyright (C) 2007 Free Software Foundation, Inc.
>> >> > This is free software; see the source for copying conditions. There
>> is
>> >> > NO
>> >> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> >> > PURPOSE.
>> >> >
>> >> > vsrikarunyan@~$ freetype-config --libs
>> >> > -L/app/freetype/Freetype.framework/Versions/2.3.9/lib -lfreetype -lz
>> >> > vsrikarunyan@~$
>> >> >
>> >> > --
>> >> > Regards
>> >> > vsrikarunyan
>> >>
>> >> >
>> >>
>> >>
>> >> --
>> >> Greg Lewis Email : glewis at eyesbeyond.com
>> >> Eyes Beyond Web :
>> http://www.eyesbeyond.com
>> >> Information Technology FreeBSD : glewis at FreeBSD.org
>> >>
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>> --
>> Andrew :-)
>>
>> Free Java Software Engineer
>> Red Hat, Inc. (http://www.redhat.com)
>>
>> Support Free Java!
>> Contribute to GNU Classpath and the OpenJDK
>> http://www.gnu.org/software/classpath
>> http://openjdk.java.net
>>
>> PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
>> Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20090913/2ffd5f83/attachment.html
More information about the bsd-port-dev
mailing list