Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): do not use mongodbtoolchain v4 to compile mongosh MONGOSH-1604 #1684

Merged
merged 1 commit into from
Sep 26, 2023

Commits on Sep 26, 2023

  1. fix(ci): do not use mongodbtoolchain v4 to compile mongosh MONGOSH-1604

    On x64 Linux, the v4 mongodbtoolchain gcc is configured with
    `--with-arch=sandybridge`, raising the minimum CPU requirements to
    that level. In particular, availability of the AVX CPU feature
    is made a prerequisite for the generated executables to run.
    
    It is possible to override this default for the v4 mongodbtoolchain
    when compiling a specific executable. However, another quirk of
    this toolchain (and reason why we want to migrate away from it) is
    that it statically links in the C++ standard library, which has
    unfortunately been compiled using the compiler's defaults.
    
    On the server side, 5.0+ uses AVX as a minimum hardware requirement,
    but since mongosh 2.x is intended to support both 4.2 and 4.4,
    we should stick to the requirements of these older versions.
    
    So, for now, just switch back to the v3 mongodbtoolchain, which
    seems to work fine in terms of compiling mongosh. The Node.js configure
    script *does* warn that the gcc version (8.5.0) in this toolchain
    is no longer officially supported, so that underlines the importance
    of switching away from the server’s toolchain in the near future
    (MONGOSH-864).
    
    We “test” this by inspecting the generated binary and looking
    at the instructions it contains, rather than trying to emulate
    older hardware.
    addaleax committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    1697aa6 View commit details
    Browse the repository at this point in the history