Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-87113

Use a distro-specific toolchain in Bazel

    • Build
    • Fully Compatible
    • 153

      The way we're setting up libgcc_s.so right now is distro-specific. We hadn't run into this issue because prior to this PR, we were including the wrong version of libgcc_s.so, which is incompatible with s390x. We may be able to work around that issue, but it's likely we'll run into other distro-specific issues during migration.

      SCons currently uses one toolchain and one host platform for each supported distro/operating system. Prior to this PR, Bazel was using Amazon Linux 2 for both the remote execution container and toolchain for all Linux distros.

      On top of this, we're unable to decouple openssl (and possibly other system libraries) from the host that the build is running on. This would force us to use a per-distro remote container very soon.

      To address the issue, this PR:

      1. Downloads a specific toolchain depending on the host distro / distro requested over the CLI
      2. Specifies a specific remote execution container depending on the host distro / distro requested over the CLI
      3. Adds in support for running RE on Amazon Linux 2023, RHEL89, and Ubuntu22
      4. Adds an ease-of-use script (toolchain_generator.py) to be used when updating to a new toolchain version
      5. Switches order of includes to get the right libgcc

      Using a per-distro remote execution host and toolchain will also allow us to benefit from the security/performance improvements of using a newer version of glibc.

            Assignee:
            zack.winter@mongodb.com Zack Winter
            Reporter:
            zack.winter@mongodb.com Zack Winter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: