Skip to content
Permalink
Browse files

8239566: gtest/GTestWrapper.java fails due to "libstlport.so.1: open …

…failed: No such file or directory"

Reviewed-by: redestad
  • Loading branch information
magicus committed Feb 21, 2020
1 parent 35db376 commit da39778d42e18ff562a6794a9651f41232e83d5a
Showing with 19 additions and 8 deletions.
  1. +17 −5 make/autoconf/hotspot.m4
  2. +2 −3 make/autoconf/libraries.m4
@@ -119,25 +119,37 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest],
[Disables building of the Hotspot unit tests @<:@enabled@:>@])])
GTEST_AVAILABLE=true
AC_MSG_CHECKING([if Hotspot gtest test source is present])
if test -e "${TOPDIR}/test/hotspot/gtest"; then
GTEST_DIR_EXISTS="true"
AC_MSG_RESULT([yes])
else
GTEST_DIR_EXISTS="false"
AC_MSG_RESULT([no, cannot run gtest])
GTEST_AVAILABLE=false
fi
# On solaris, we also must have the libstlport.so.1 library, setup in
# LIB_SETUP_LIBRARIES.
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
if test "x$STLPORT_LIB" = "x"; then
GTEST_AVAILABLE=false
fi
fi
AC_MSG_CHECKING([if Hotspot gtest unit tests should be built])
if test "x$enable_hotspot_gtest" = "xyes"; then
if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
if test "x$GTEST_AVAILABLE" = "xtrue"; then
AC_MSG_RESULT([yes, forced])
BUILD_GTEST="true"
else
AC_MSG_ERROR([Cannot build gtest without the test source])
AC_MSG_ERROR([Cannot build gtest with missing dependencies])
fi
elif test "x$enable_hotspot_gtest" = "xno"; then
AC_MSG_RESULT([no, forced])
BUILD_GTEST="false"
elif test "x$enable_hotspot_gtest" = "x"; then
if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
if test "x$GTEST_AVAILABLE" = "xtrue"; then
AC_MSG_RESULT([yes])
BUILD_GTEST="true"
else
@@ -196,7 +196,7 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
################################################################################
AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
[
if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
# Find the root of the Solaris Studio installation from the compiler path
SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
@@ -209,8 +209,7 @@ AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
AC_MSG_RESULT([yes, $STLPORT_LIB])
BASIC_FIXUP_PATH([STLPORT_LIB])
else
AC_MSG_RESULT([no, not found at $STLPORT_LIB])
AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests])
AC_MSG_RESULT([no, not found at $STLPORT_LIB, cannot build Hotspot gtests])
fi
AC_SUBST(STLPORT_LIB)
fi

0 comments on commit da39778

Please sign in to comment.