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

use of which in common/autoconf/autogen.sh is not portable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • None
    • infrastructure
    • None
    • b85
    • generic
    • generic
    • Not verified

    Description

      This was introduced by the fix for bug #JDK-8009988 "build-infra: Fix configure output for zip debuginfo check"
      http://bugs.sun.com/view_bug.do?bug_id=8009988

      Changeset 15c1642967c9 added use of the which command in common/autoconf/autogen.sh.

      %cat -n common/autoconf/autogen.sh
           [...]
          46 AUTOCONF=$(which autoconf 2> /dev/null);
          47 AUTOCONF_267=$(which autoconf-2.67 2> /dev/null);
          48
          49 echo "Autoconf found: ${AUTOCONF}"
          50 echo "Autoconf-2.67 found: ${AUTOCONF_267}"
          51
          52 if test "x${AUTOCONF}" = x; then
          53 echo You need autoconf installed to be able to regenerate the configure script
          54 echo Error: Cannot find autoconf 1>&2
          55 exit 1
          56 fi
          57
          58 if test "x${AUTOCONF_267}" != x; then
          59 AUTOCONF=${AUTOCONF_267};
          60 fi

      If there is any value at all in AUTOCONF_267, that is what the script will try to use at line 59.

      This fails on Solaris 11 x64 where the variable AUTOCONF_267 is set to a value of 'no autoconf-2.67 in /opt/java/jdk1.6.0/bin /opt/devtools/i586/SUNWspro/SS12u1/bin /w/tbell/bin /usr/sbin /usr/bin /usr/local/bin /usr/bin /usr/sfw/bin /usr/gnu/bin /usr/X11/bin /usr/ccs/bin /usr/dt/bin'

      The result is not good: the generated-configure.sh files created are zero bytes long.

      Attachments

        Activity

          People

            tbell Tim Bell
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: