Remove the JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround

...that had been introduced with 19de5d97ef "Allow
building against JDK 18" to work around odd failures of ExternalProject_hsqldb
with whatever versions of JDK 18 and Ant I had been using at that time.

However, with java-latest-openjdk-24.0.0.0.36-1.rolling.fc41.x86_64 that
workaround now started to make ExternalProject_hsqldb fail for me with

> ERROR: JVMTI: 112(JVMTI_ERROR_WRONG_PHASE): Cannot get thread info
> ERROR: JVMTI: 112(JVMTI_ERROR_WRONG_PHASE): jvmtiEnv::GetLoadedClasses()
> Error occurred during initialization of VM
> java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
> 	at java.lang.System.initPhase3(java.base@24/System.java:1947)

apparently because of <https://openjdk.org/projects/jdk/24/>'s
<https://openjdk.org/jeps/486> "JEP 486: Permanently Disable the Security
Manager".

But with the ant-1.10.14-13.fc41.noarch I'm using now, neither
java-21-openjdk-21.0.6.0.7-6.fc41 (I no longer have the problematic-back-then
JDK 18) nor java-latest-openjdk-24.0.0.0.36-1.rolling.fc41.x86_64 appear to need
that workaround anymore anyway (presumably because "an updated version of Apache
Ant [has] become available", as discussed in the commit message of that
19de5d97ef).

Change-Id: Id13b57559df486012c888247c96323716168c97d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182419
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
This commit is contained in:
Stephan Bergmann
2025-03-03 10:27:06 +01:00
parent 62a1377e8d
commit 35d9ec3e59
3 changed files with 0 additions and 13 deletions
-1
View File
@@ -382,7 +382,6 @@ export JAVA_TARGET_VER=@JAVA_TARGET_VER@
export JAWTLIB=@JAWTLIB@
export JDK=@JDK@
export JDK_FOR_BUILD=@JDK_FOR_BUILD@
export JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD=@JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD@
export JFREEREPORT_JAR=@JFREEREPORT_JAR@
export JITC_PROCESSOR_TYPE=@JITC_PROCESSOR_TYPE@
JOM=@JOM@
-10
View File
@@ -6236,7 +6236,6 @@ if test "$cross_compiling" = "yes"; then
JAVA_HOME
JAVAIFLAGS
JDK
JDK_SECURITYMANAGER_DISALLOWED
LIBO_BIN_FOLDER
LIBO_LIB_FOLDER
LIBO_URE_LIB_FOLDER
@@ -9081,7 +9080,6 @@ dnl ===================================================================
# Whether all the complexity here actually is needed any more or not, no idea.
JDK_SECURITYMANAGER_DISALLOWED=
MODULAR_JAVA=
if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
_gij_longver=0
@@ -9106,12 +9104,6 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
if test "$_jdk_ver" -lt 10800; then
AC_MSG_ERROR([JDK is too old, you need at least 8 ($_jdk_ver < 10800)])
fi
dnl TODO: Presumably, the Security Manager will not merely be disallowed, but be
dnl completely removed in some Java version > 18 (see
dnl <https://openjdk.java.net/jeps/411> "Deprecate the Security Manager for Removal"):
if test "$_jdk_ver" -ge 180000; then
JDK_SECURITYMANAGER_DISALLOWED=TRUE
fi
JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
if test "$_os" = "WINNT"; then
@@ -9421,7 +9413,6 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
JAVA_HOME_FOR_BUILD=$JAVA_HOME
JAVAIFLAGS_FOR_BUILD=$JAVAIFLAGS
JDK_FOR_BUILD=$JDK
JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD=$JDK_SECURITYMANAGER_DISALLOWED
fi
AC_SUBST(JAVACFLAGS)
@@ -9433,7 +9424,6 @@ AC_SUBST(JAVA_HOME)
AC_SUBST(JAVA_HOME_FOR_BUILD)
AC_SUBST(JDK)
AC_SUBST(JDK_FOR_BUILD)
AC_SUBST(JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD)
AC_SUBST(JAVA_SOURCE_VER)
AC_SUBST(JAVA_TARGET_VER)
AC_SUBST(MODULAR_JAVA)
-2
View File
@@ -22,8 +22,6 @@ $(call gb_ExternalProject_get_state_target,hsqldb,build) :
$(call gb_Trace_StartRange,hsqldb,EXTERNAL)
$(call gb_ExternalProject_run,build,\
unset MSYS_NO_PATHCONV && JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(if $(JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD), \
ANT_OPTS="$$ANT_OPTS -Djava.security.manager=allow") \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build/build.xml \