-
Notifications
You must be signed in to change notification settings - Fork 543
CXX-2517 Use C Driver scripts to install libmongoc and libmongocrypt #950
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comments. The removal of the extra compile of libbson is much appreciated.
.evergreen/install_c_driver.sh
Outdated
-DENABLE_EXTRA_ALIGNMENT=${ENABLE_EXTRA_ALIGNMENT} -DCMAKE_MACOSX_RPATH=ON | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX" | ||
: "${mongoc_idir:?}" | ||
: "${mongoc_install_idir}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the intent is to error if this is unset.
: "${mongoc_install_idir}" | |
: "${mongoc_install_idir:?}" |
.evergreen/install_c_driver.sh
Outdated
: "${mongoc_install_idir}" | ||
|
||
echo "libmongoc version: ${mongoc_version}" | ||
echo "libmongocrypt version: ${mongocrypt_version}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "libmongocrypt version: ${mongocrypt_version}" |
mongocrypt_version
is no longer expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for figuring out the Windows paths and a newer CMake.
Description
This PR unblocks CXX-2517 and other CXX Driver work that depend on libmongocrypt 1.7.0. Verified by this patch.
Minimum C Driver Version
The minimum C Driver version was bumped to the current latest commit (mongodb/mongo-c-driver@9ef1cc9) in anticipation of upcoming CXX-2517 work. The minimum C Driver version should eventually be updated to be 1.24.0 once it is released (documented as a TODO comment).
EVG Config
The
add_expansions_to_env
parameter is used to simplify theinstall_c_driver
EVG function by removing redundant (re)definitions of EVG expansions as environment variables. The EVG function can now invoke the script directly without additional setup required.Building libmongocrypt and libmongoc
The
install_c_driver.sh
script was refactored to use the new C Driver compile-libmongocrypt.sh script (introduced in mongodb/mongo-c-driver@c7e43c1) to satisfy the libmongocrypt dependency. This allowed deferring the libbson and libmongocrypt compile-and-install routine tocompile-libmongocrypt.sh
.This also allowed removal of specifying minimum libmongocrypt version in the CXX Driver. Instead, the CXX Driver now transitively depends on the C Driver's minimum libmongocrypt version as defined within
compile-libmongocrypt.sh
. This required slightly modifying theinstall_c_driver.sh
script to generate aVERSION_CURRENT
file that is required when building libbson via libmongocrypt to specify/determine theBUILD_VERSION
.This refactor also uses the C Driver's
find-cmake-latest.sh
script to obtain a newer CMake version to satisfy libmongocrypt's CMake 3.12 requirement. This also allows the CXX Driver to use newer versions of C++ and corresponding compilers (i.e. VS 2019 and newer).