Building OpenJDK on Mavericks (OS X 10.9)
Weijun Wang
weijun.wang at oracle.com
Wed Dec 11 17:02:47 PST 2013
james.laskey at oracle.com has a solution to it:
>
> Everything built except for one Apple header.
>
> /System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSUserNotification.h:16
>
> NSUserNotificationActivationTypeReplied NS_AVAILABLE(10_9, NA) = 3
>
> I changed to
>
> NSUserNotificationActivationTypeReplied /* NS_AVAILABLE(10_9, NA) */ = 3
>
> Otherwise we get a __attribute__ instead of ',' or '}' error.
>
> Everything ran fine after that.
>
> Cheers,
>
> -- Jim
On 12/12/2013 2:59, William Moore wrote:
> Yes it does. Unfortunately it didn’t work for me:
>
>> /Users/william/Programming/Java/jdk8/jdk/src/solaris/native/common/jni_util_md.c:51: warning: incompatible implicit declaration of built-in function 'strcat'
>> In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:162,
>> from /Users/william/Programming/Java/jdk8/jdk/src/solaris/native/java/lang/java_props_macosx.c:35:
>> /System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected ',' or '}' before '__attribute__'
>> In file included from /Users/william/Programming/Java/jdk8/jdk/src/solaris/native/java/lang/java_props_macosx.h:27,
>> from /Users/william/Programming/Java/jdk8/jdk/src/solaris/native/java/lang/java_props_macosx.c:37:
>> /Users/william/Programming/Java/jdk8/jdk/src/share/native/java/lang/java_props.h:123: warning: no semicolon at end of struct or union
>> make[2]: *** [/Users/william/Programming/Java/jdk8/build/macosx-x86_64-normal-server-release/jdk/objs/libjava/java_props_macosx.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[1]: *** [libs-only] Error 2
>> make: *** [jdk-only] Error 2
>
> I don’t understand why it is trying to compile Solaris files but I have to go and do some other things now, so I’ll come back and look at it again later.
>
> Thank you all for your help.
>
> William
>
> On 11 Dec 2013, at 7:49pm, David DeHaven <david.dehaven at oracle.com> wrote:
>
>>
>> That seems to be the best solution if you have Xcode 5 installed, just using xcode-select doesn't always work.
>>
>> -DrD-
>>
>>> What I did is to save a copy of usr dir inside Xcode 4 and run
>>>
>>> bash configure --with-tools-dir=/saved/xcode4/usr/bin/ ...
>>>
>>> --Max
>>>
>>> On 12/10/13, 22:38, Staffan Larsen wrote:
>>>>
>>>> On 10 dec 2013, at 14:48, William Moore <wmoore40 at gmail.com> wrote:
>>>>
>>>>> Thanks David
>>>>>
>>>>> Maybe I can do something with Mountain Lion running in a virtual machine. I’ll investigate that.
>>>>
>>>> Having multiple XCode versions installed is also a work-around.
>>>>
>>>> /Staffan
>>>>
>>>>>
>>>>> William
>>>>>
>>>>> On 9 Dec 2013, at 6:26pm, David DeHaven <david.dehaven at oracle.com> wrote:
>>>>>
>>>>>>
>>>>>>> Back in September when I had Mountain Lion (OS X 10.8) I was able to build my own version of OpenJDK 7 Update 40.
>>>>>>>
>>>>>>> Now I have Mavericks (OS X 10.9) and it fails to build Hotspot with the error:
>>>>>>>
>>>>>>>> clang: error: argument unused during compilation: '-fcheck-new’
>>>>>>>
>>>>>>> If I comment out the setting of this value in hotspot/make/bsd/makefiles/gcc.make I get other errors like:
>>>>>>>
>>>>>>>> hotspot/src/share/vm/adlc/archDesc.cpp:335:35: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
>>>>>>>
>>>>>>> What do I have to do to make this compile?
>>>>>>>
>>>>>>> I know very little about C programming. Any help will be greatly appreciated.
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> William
>>>>>>
>>>>>> Building JDK 8 with Xcode 5 is still a work in progress, I don't expect that effort to be backported to 7u so you might need to scrape up a copy of Xcode 4.6 to build with. The big issue is Xcode 5 does not include gcc and 7u does not build with clang without significant changes.
>>>>>>
>>>>>> -DrD-
>>>>>>
>>>>>
>>>>
>>
>
More information about the macosx-port-dev
mailing list