Problems building OpenJDK 8 for MacOSX

Weijun Wang weijun.wang at oracle.com
Wed May 15 04:29:25 PDT 2013


My output looks like

$ bash ../../configure | grep X11
checking what is not needed on an X11 build on MacOSX?... alsa pulse
checking for X... libraries /usr/X11/lib, headers /usr/X11/include
checking for X11/extensions/shape.h... yes
checking for X11/extensions/Xrender.h... yes
checking for X11/extensions/XTest.h... yes

Notice the extra "checking for X" line.

-Max


On 5/15/13 7:09 PM, David Clunie wrote:
> By the way, the configure output was as follows:
>
> % bash configure | grep X11
> checking what is not needed on an X11 build on MacOSX?... alsa pulse
> checking for X11/extensions/shape.h... yes
> checking for X11/extensions/Xrender.h... yes
> checking for X11/extensions/XTest.h... no
> configure: error: Could not find all X11 headers (shape.h Xrender.h
> XTest.h).
>
> % bash ./configure --with-x="/opt/X11" | grep X11
> checking what is not needed on an X11 build on MacOSX?... alsa pulse
> checking for X11/extensions/shape.h... yes
> checking for X11/extensions/Xrender.h... yes
> checking for X11/extensions/XTest.h... no
> configure: error: Could not find all X11 headers (shape.h Xrender.h
> XTest.h).
>
> % bash ./configure CPATH="/opt/X11/include" | grep X11
> checking what is not needed on an X11 build on MacOSX?... alsa pulse
> checking for X11/extensions/shape.h... yes
> checking for X11/extensions/Xrender.h... yes
> checking for X11/extensions/XTest.h... yes
> using configure arguments 'CPATH=/opt/X11/include'.
>
> David
>
> On 5/15/13 7:03 AM, David Clunie wrote:
>> Hi Max
>>
>> If I run "bash ./configure" it complains about not finding the
>> X11 headers in the configure step; adding "--with-x" as is
>> suggested in README-build.html does not help.
>>
>> Trying
>>
>>    bash ./configure CPATH="/usr/X11/include"
>>
>> also fails, complaining about not finding the XRender extensions,
>> so I found that I had to:
>>
>>    bash ./configure CPATH="/opt/X11/include"
>>
>> instead, to get past the configure step.
>>
>> However, when I did that, when I ran "make" it reported:
>>
>> "Building OpenJDK for target 'default' in configuration
>> 'macosx-x86_64-normal-server-release'"
>>
>> and ran until it got to a failure building Solaris X11 stuff,
>> which seemed strange since we are not targeting Solaris, and
>> we do have the XRender extensions including XTest.h:
>>
>> /Users/dclunie/Distributions/java/OpenJDK/jdk8/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c:501:
>>
>> warning: assignment makes integer from pointer without a cast
>> /Users/dclunie/Distributions/java/OpenJDK/jdk8/jdk/src/solaris/native/sun/xawt/XToolkit.c:47:34:
>>
>> warning: X11/extensions/XTest.h: No such file or directory
>> ...
>> /Users/dclunie/Distributions/java/OpenJDK/jdk8/jdk/src/solaris/native/sun/xawt/XToolkit.c:1031:
>>
>> error: ‘XDeviceInfo’ undeclared (first use in this function)
>>
>> and at that point I am stumped.
>>
>> The XRender header extensions are present on the system, e.g.,
>>
>>    % find /opt/X11 -name XTest.h
>>    /opt/X11/include/X11/extensions/XTest.h
>>
>> but then I am not sure that these are even required for the Mac?
>>
>> I have tried feeding various combinations of "--with-x=/opt/X11" and
>> CPPFLAGS="-I/opt/X11/include" and even OPENWIN_HOME="/opt/X11" based
>> on what I see in the generated Makefile.
>>
>> But I gave up after I realized that it probably shouldn't be trying to
>> compile the jdk/src/solaris/native sub-tree in the first place, just
>> the share and the macosx trees, right? And I couldn't figure out where
>> in the make or configure it decides to do this or not.
>>
>> David
>>
>> PS. It would be nice if the page of instructions for building the MacOSX
>> port could be updated to mention the need for the configure step, and
>> what arguments to give it, and the make step.
>>
>> On 5/14/13 9:22 PM, Weijun Wang wrote:
>>> Yes, there is a big change in jdk8, you have to use configure now.
>>>
>>> I have Xcode 4.6 and XQuartz 2.7.4, and I can build. What does configure
>>> says about X11?
>>>
>>> -Max
>>>
>>> On 5/15/13 9:10 AM, David Clunie wrote:
>>>> Hi all
>>>>
>>>> I wanted to build the OpenJDK for MacOSX.
>>>>
>>>> I was trying to follow the instructions at:
>>>>
>>>>    https://wiki.openjdk.java.net/display/MacOSXPort/Main
>>>>
>>>> but having fetched the code, the build step fails.
>>>>
>>>> The make complains there is no configuration ("No configurations
>>>> found for ...").
>>>>
>>>> By comparison, I fetched jdk7u-dev, and a "make" of that works
>>>> just fine, with no need for a configure step.
>>>>
>>>> I tried "bash ./configure", but it fails with problems related
>>>> to the X11 stuff.
>>>>
>>>> Any advice would be appreciated, since I could spend a while on this
>>>> and it is presumably something everyone else has already solved.
>>>>
>>>> I have OS 10.8.3 and XQuartz 2.7.4 and Xcode 4.6.2 installed.
>>>>
>>>> David
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>


More information about the macosx-port-dev mailing list