Building openjdk 8 on Mac OS X

David DeHaven david.dehaven at oracle.com
Tue Jun 9 21:19:05 UTC 2015


>> 2.  Make a link form Xcode.4 lipo to /usr/bin/lipo

You don't need to do this with the current command line tools, they've fixed the problem. If unsure, run "sudo xcode-select -switch /path/to/Xcode4.app" and then try running lipo with no args, if it deadlocks then it's still broken and you'll need to work around it.

BUT with current JDK 8u you don't need to set Xcode 4 as the active Xcode, just pass --with-xcode-path=/path/to/Xcode4.app and it will figure everything out for you, including the lipo thing. Current jdk8u/dev should be buildable on Yosemite.

I believe I also removed the need for lipo, it was never necessary. That might've been done for 9 only though.


The configure args ONLY needs --with-xcode-path, don't pass the --with-extra-cflags args.

You should see some lines like:
checking Determining if we need to set DEVELOPER_DIR... yes (/path/to/Xcode4.app/Contents/Developer)
checking for xcodebuild... /usr/bin/xcodebuild
checking Determining Xcode SDK path... /path/to/Xcode4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

If you see that, you should be good to go.

-DrD-

> On Jun 9, 2015, at 1:20 PM, mikhail cherkasov <mikhail.cherkasov at oracle.com> wrote:
> 
> Hi Denis,
> 
> I applied you instruction, but I still have an error during configuration:
> 
> configure:21029: /usr/bin/gcc --version >&5
> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
> 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.
> 
> couldn't understand kern.osversion `14.1.0'
> ....
> 
> configure:21131: error: C compiler cannot create executables
> 
> I also attached config.log.
> 
> Do you still can build jdk  on macosx 10.10 ? Can you advise how to fix build in my environment?
> 
> Thanks,
> Mikhail.
> 
> On 11/26/2014 4:30 PM, Denis Fokin wrote:
>> Hi guys,
>> 
>> good news. I am able to build open jdk8 on Yosemite (thanks to Anton Tarasov for his script to build on 10.9)
>> 
>> Steps:
>> 
>> 1.  Download and save in some secure place Xcode4.6
>> 2.  Make a link form Xcode.4 lipo to /usr/bin/lipo
>> 3.  Set MACOSX_DEPLOYMENT_TARGET enviroment variable to 10.8
>> 4.  Execute  configure like this
>> 
>> sh configure --with-freetype=/Volumes/HD-PATU3/tools/freetype-2.4.0/  --with-extra-cflags="-isysroot /Applications/Xcode4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -F/Applications/Xcode4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks" --with-extra-cxxflags="-isysroot /Applications/Xcode4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -F/Applications/Xcode4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks" --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/
>> 
>> Thank you,
>>    Denis.
>> 
>> 
>> 
>>> On 12 Nov 2014, at 20:29, David DeHaven <david.dehaven at oracle.com> wrote:
>>> 
>>> 
>>> Not 8, 9...
>>> 
>>> -DrD-
>>> 
>>>> Hi Wang
>>>> 
>>>> You were able to compile openjdk8 on Yosemite!! Can you please look into the error faced by me (first post in the thread; posted below as well) and figure out the problem(s)?
>>>> 
>>>> Regards,
>>>> Manas
>>>> 
>>>> 
>>>> 
>>>>> Yes, I can compile the whole mess on Yosemite/Xcode 6.1. There was an issue with FreeType when building OpenJDK, but it looks like that's been resolved now.
>>>>> 
>>>>> -DrD-
>>>>> 
>>>> Compiling /Users/manas/Desktop/Software/openjdk/sources/openjdk8/hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp
>>>> Making signal interposition lib...
>>>> couldn't understand kern.osversion `14.0.0'
>>>> warning: (x86_64) /var/folders/16/5m_yzyd961b3l31crzg2hsl40000gp/T//ccEmbC6U.o unable to open object file
>>>> warning: no debug symbols in executable (-arch x86_64)
>>>> Making SA debugger back-end...
>>>> couldn't understand kern.osversion `14.0.0'
>>>> In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:55,
>>>>               from /System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:12,
>>>>               from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80,
>>>>               from /Users/manas/Desktop/Software/openjdk/sources/openjdk8/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m:26:
>>>> /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:262: error: expected ‘,’ or ‘}’ before ‘__attribute__’
>>>> /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:414: error: expected ‘,’ or ‘}’ before ‘__attribute__’
>>>> In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:119,
>>>>               from /Users/manas/Desktop/Software/openjdk/sources/openjdk8/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m:26:
>>>> /System/Library/Frameworks/Foundation.framework/Headers/NSUserActivity.h:55: error: expected a property attribute before ‘weak’
>>>> Compiling /Users/manas/Desktop/Software/openjdk/sources/openjdk8/hotspot/src/share/vm/runtime/vm_version.cpp
>>>> In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:171,
>>>>               from /Users/manas/Desktop/Software/openjdk/sources/openjdk8/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m:26:
>>>> /System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected ‘,’ or ‘}’ before ‘__attribute__’
>>>> make[8]: *** [libsaproc.dylib] Error 1
>>>> make[8]: *** Waiting for unfinished jobs....
>>>> make[7]: *** [the_vm] Error 2
>>>> make[6]: *** [product] Error 2
>>>> make[5]: *** [generic_build2] Error 2
>>>> make[4]: *** [product] Error 2
>>>> make[3]: *** [all_product_universal] Error 2
>>>> make[2]: *** [universal_product] Error 2
>>>> make[1]: *** [/Users/manas/Desktop/Software/openjdk/sources/openjdk8/build/macosx-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
>>>> make: *** [hotspot-only] Error 2
>>>> 
> 
> <config.log>




More information about the build-dev mailing list