<AWT Dev> [9] Request for Review: 8003900: X11 dependencies should be removed from Mac OS X build.

David DeHaven david.dehaven at oracle.com
Fri May 9 03:36:29 UTC 2014


JBS issue:
https://bugs.openjdk.java.net/browse/JDK-8003900

Summary:
The X11 toolkit was disabled on the Mac but the dependency was not completely removed for the release of 8.

This ended up being a lot simpler than I'd anticipated, but I have a couple questions:
1> I've surrounded X dependent code with #ifdef XAWT blocks, I'm not entirely sure if this is proper (it appears to be...)
2> I have thoughts that maybe the X11 dependent code should be factored out into a X specific location rather than just disabled or worked around in the code. The code seems pretty well ingrained, so this may be a larger task than necessary.


To validate the removal of the X11 dependency, I did the following:

Preparation:
- Copied /opt/X11 (installed by XQuartz) to somewhere I could readily modify, let's call it ~/java/X11-good
- Made a second copy to ~/java/X11-bad
- Modified the header files in ~/java/X11-bad, adding #error statements to cause compilation to abort if any are included
- Created a symlink to ~/java/X11-good at ~/java/X11
- Removed /opt/X11 and the /usr/X11 symlink, the latter is important as that's one of the locations that configure searches

To validate building with no X11 headers or libs:
- Ran configure with no special arguments, it was not able to find X headers
- Ran "make jdk", ran SwingSet2.jar, everything was happy

To validate building *with* X11 headers and libs, but XAWT disabled (as it should be on Mac):
- Ran "configure --x-includes=~/java/X11/include --x-libraries=~/java/X11/lib", configure found X headers
- Ran "make clean-jdk jdk", ran SwingSet2.jar, everything was happy

To validate the above configuration does not actually USE X11:
- Changed the ~/java/X11 symlink to point to ~/java/X11-bad
- Ran "make clean-jdk jdk", ran SwingSet2.jar, everything was still happy


Webrev:
http://cr.openjdk.java.net/~ddehaven/8003900/jdk.0/

I submitted a JPRT run with this and the patch for 8042440 applied and there were three failures, two in crypto tests (solaris/sparc9) and one on windows due to a network issue (transient issue?). None of the failures were relevant to AWT or Java2D or X11 in general. There were no build failures.

-DrD-



More information about the awt-dev mailing list