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

Configure call fails on AIX when using --with-gtest option.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 17, 21
    • infrastructure
    • None
    • b14
    • aix

      When calling configure with the --with-gtest option on AIX it fails with the following error:
      ...
      checking for X11/Intrinsic.h... yes
      checking for gtest... /sapmnt/sapjvm_work/openjdk/tools/gtest/googletest-1.13.0
      /bin/sed: illegal option -- E
      Usage: sed [-n] [-u] Script [File ...]
              sed [-n] [-u] [-e Script] ... [-f Script_file] ... [File ...]
      configure: error: gtest version is too old, at least version 1.13.0 is required
      configure exiting with result code 1

      The sed on AIX does not support extended regex with the -E param. But it seems to me, that the extended regex param is not needed for the googletest version detection.

      I would suggest to substitute the below line in make/autoconf/lib-tests.m4

      gtest_version="`$GREP GOOGLETEST_VERSION $GTEST_FRAMEWORK_SRC/CMakeLists.txt | $SED -E -e 's/set\(GOOGLETEST_VERSION (.*)\)/\1/'`"

      by

      gtest_version="`$GREP GOOGLETEST_VERSION $GTEST_FRAMEWORK_SRC/CMakeLists.txt | $SED -e 's/set(GOOGLETEST_VERSION \(.*\))/\1/'`"
       
      That should work on AIX and all other platforms.

            azeller Arno Zeller
            azeller Arno Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: