-
Bug
-
Resolution: Fixed
-
P4
-
17, 21
-
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.
...
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.