0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/bazel/docs/architecture/s390x_build_from_source.md
Andrew Bradshaw 3220129aea SERVER-91979 Upgrade to Bazel 7.2 (#28749)
GitOrigin-RevId: 9139373c72c251a5474d080cbccba8ef221e1386
2024-11-01 21:08:36 +00:00

990 B

Building Bazel from Source to target the S390X Architecture

Bazel doesn't release to the S390X architecture. To address this, MongoDB maintains our own Bazel build that we perform on our S390X development systems.

JDK?

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:

/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-1.el8.s390x

To compile with on these platforms, the developer must set JAVA_HOME before invoking Bazel.

Bazel v7.2.1 Compilation Steps

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