Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8062661

Do not perform X11 checks in configure when X11 is not needed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8u25, 9
    • infrastructure
    • b39
    • x86_64
    • windows_7

        FULL PRODUCT VERSION :
        N/A

        ADDITIONAL OS VERSION INFORMATION :
        Running Cygwin on Win7 ...
        Win7 version:
        Microsoft Windows [Version 6.1.7600]

        Cygwin:
        foreman@arena104:~]$ uname -a
        CYGWIN_NT-6.1-WOW64 arena104 1.7.32(0.274/5/3) 2014-08-13 23:03 i686 Cygwin


        A DESCRIPTION OF THE PROBLEM :
        Having run configure on the above mentioned WIndoze 7 system, unexpected X11 related behaviour was observed.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        The problem seems to be repeatable without any additional effort.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The expectation was that no attempt to detect any X11 headers should have been made.
        ACTUAL -
        The following is an extract of the last run of configure ...

        .
        .
        .
        checking what is not needed on Windows?... alsa cups pulse x11
        checking for Mac OS X Java Framework... no
        checking for X... no
        checking for X11/extensions/shape.h... no
        .
        .
        .

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        N/A - this is not a problem and is seemingly benign since configure continues without error and other than unrelated errors encountered whilst subsequent running make(1).

        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        The following patch ...

        diff -r 6a5a472c7c3a common/autoconf/libraries.m4
        --- a/common/autoconf/libraries.m4 Mon Oct 27 09:53:36 2014 +0000
        +++ b/common/autoconf/libraries.m4 Wed Oct 29 21:31:21 2014 +0000
        @@ -168,15 +168,18 @@
           OLD_CFLAGS="$CFLAGS"
           CFLAGS="$CFLAGS $X_CFLAGS"
         
        - # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
        - AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
        - [X11_A_OK=yes],
        - [X11_A_OK=no; break],
        - [
        - # include <X11/Xlib.h>
        - # include <X11/Xutil.h>
        - ]
        - )
        + if test "x$X11_NOT_NEEDED" = xyes; then
        + # Need to include Xlib.h and Xutil.h to avoid "present but cannot be
        + # compiled" warnings on Solaris 10 - but iff X11 is not required
        + AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
        + [X11_A_OK=yes],
        + [X11_A_OK=no; break],
        + [
        + # include <X11/Xlib.h>
        + # include <X11/Xutil.h>
        + ]
        + )
        + fi
         
           CFLAGS="$OLD_CFLAGS"
           AC_LANG_POP(C)

        The above has been tested on 32 & 64 bit Linux & Linux PPS and also Linux PPC LE.

              ihse Magnus Ihse Bursie
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: