Update cmake for libmongocrypt <= cmake < 4.4

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Done
    • Priority: Blocker - P1
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Since the Go Driver requires libmongocrypt 1.20.0 and pinning to cmake < 4.4 won't be released until the next minor release of libmongocrypt, we should temporarily assert which version of cmake to use inline to avoid the following error in CI:

      CMake Error: The warning category "error -DCMAKE_CXX_LINK_EXECUTABLE='echo not linking now...'" is not known.
      CMake Error at cmake-build/_deps/embedded_mcd-src/src/libmongoc/CMakeLists.txt:425 (TRY_COMPILE):
        Failed to configure test project build system.
      Call Stack (most recent call first):
        cmake-build/_deps/embedded_mcd-src/src/libmongoc/CMakeLists.txt:449 (mongoc_get_accept_args)
      

      Definition of done

      Quoting slack thread:

      I believe you can workaround this problem without requiring updating libmongocrypt sources by setting the env var UV_CONSTRAINT when invoking any libmongocrypt build scripts:

      • if ! (./libmongocrypt/.evergreen/compile.sh >|output.txt 2>&1); then
        + if ! (UV_CONSTRAINT=<(echo "cmake<4.4") ./libmongocrypt/.evergreen/compile.sh >|output.txt 2>&1); then

      Pitfalls

      We should not forget to remove this inline update on the libmongocrypt 1.21.0.

            Assignee:
            Matt Dale
            Reporter:
            Preston Vasquez
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: