0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

SERVER-97664 Reference symlink for JDK in ppc/s390x (#29628)

GitOrigin-RevId: 23386975493abfc02cb38bd077011e3b6bc4d8ff
This commit is contained in:
Zack Winter 2024-11-26 18:38:14 -08:00 committed by MongoDB Bot
parent 105bb451c1
commit aaac2c39a7
7 changed files with 16 additions and 24 deletions

View File

@ -6,9 +6,9 @@ Bazel doesn't release to the PPC64LE architecture. To address this, MongoDB main
Bazel usually comes with a built-in JDK. However, the tooling used to build the built-in JDK doesn't support PPC64LE. To get around this, an external JDK must be present on both the system compiling the Bazel executable itself as well as the host running Bazel as a build system.
On the MongoDB PPC64LE Evergreen static hosts and dev hosts, the OpenJDK 11 installation exists at:
On the MongoDB PPC64LE Evergreen static hosts and dev hosts, the OpenJDK 21 installation exists at:
/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le
/usr/lib/jvm/java-21-openjdk
To compile with on these platforms, the developer must set JAVA_HOME before invoking Bazel.
@ -16,4 +16,4 @@ To compile with on these platforms, the developer must set JAVA_HOME before invo
curl -O -L https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-dist.zip
unzip bazel-7.2.1-dist.zip
JAVA_HOME=/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le ./compile.sh
JAVA_HOME=/usr/lib/jvm/java-21-openjdk ./compile.sh

View File

@ -6,9 +6,9 @@ Bazel doesn't release to the S390X architecture. To address this, MongoDB mainta
Bazel usually comes with a built-in JDK. However, the tooling used to build the built-in JDK doesn't support S390X. To get around this, an external JDK must be present on both the system compiling the Bazel executable itself as well as the host running Bazel as a build system.
On the MongoDB S390X Evergreen static hosts and dev hosts, the OpenJDK 11 installation exists at:
On the MongoDB S390X Evergreen static hosts and dev hosts, the OpenJDK 21 installation exists at:
/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x
/usr/lib/jvm/java-21-openjdk-21
To compile with on these platforms, the developer must set JAVA_HOME before invoking Bazel.
@ -16,4 +16,4 @@ To compile with on these platforms, the developer must set JAVA_HOME before invo
curl -O -L https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-dist.zip
unzip bazel-7.2.1-dist.zip
JAVA_HOME=/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x ./compile.sh
JAVA_HOME=/usr/lib/jvm/java-21-openjdk-21 ./compile.sh

View File

@ -404,10 +404,8 @@ def main():
# Set JAVA_HOME on ppc & s390x architectures
global bazel_env_settings
if platform.machine().lower() == "ppc64le":
bazel_env_settings["JAVA_HOME"] = "/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le"
elif platform.machine().lower() == "s390x":
bazel_env_settings["JAVA_HOME"] = "/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x"
if platform.machine().lower() in {"ppc64le", "s390x"}:
bazel_env_settings["JAVA_HOME"] = "/usr/lib/jvm/java-21-openjdk"
target_type_map = {}
for scons_target in args.scons_targets:

View File

@ -42,9 +42,9 @@ fi
# Set the JAVA_HOME directories for ppc64le and s390x since their bazel binaries are not compiled with a built-in JDK.
# TODO(SERVER-86050): remove the branch once bazelisk is built on s390x & ppc64le
if [[ $ARCH == "ppc64le" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le"
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
elif [[ $ARCH == "s390x" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x"
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
fi
# TODO(SERVER-86050): remove the branch once bazelisk is built on s390x & ppc64le

View File

@ -45,9 +45,9 @@ fi
# Set the JAVA_HOME directories for ppc64le and s390x since their bazel binaries are not compiled with a built-in JDK.
if [[ $ARCH == "ppc64le" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le"
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
elif [[ $ARCH == "s390x" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x"
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
fi
# Print command being run to file that can be uploaded

View File

@ -36,9 +36,9 @@ fi
# Set the JAVA_HOME directories for ppc64le and s390x since their bazel binaries are not compiled with a built-in JDK.
if [[ $ARCH == "ppc64le" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le"
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
elif [[ $ARCH == "s390x" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x"
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
fi
eval ${compile_env} $python ./buildscripts/bazel_scons_diff.py \

View File

@ -1014,14 +1014,8 @@ common --bes_keywords=engflow:BuildScmStatus={status}
def setup_bazel_env_vars() -> None:
# Set the JAVA_HOME directories for ppc64le and s390x since their bazel binaries are not compiled with a built-in JDK.
if platform.machine().lower() == "ppc64le":
Globals.bazel_env_variables["JAVA_HOME"] = (
"/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.ppc64le"
)
elif platform.machine().lower() == "s390x":
Globals.bazel_env_variables["JAVA_HOME"] = (
"/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x"
)
if platform.machine().lower() in {"ppc64le", "s390x"}:
Globals.bazel_env_variables["JAVA_HOME"] = "/usr/lib/jvm/java-21-openjdk"
def setup_max_retry_attempts() -> None: