-
Type:
Build Failure
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
PHP Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Context
The Evergreen task build-php-8.3-libmongoc-latest in the mongo-php-driver-1.21 project fails on the build-debian12 build variant, in the "compile driver" step. It is the only failure in the version, so it turns the v1.21 waterfall red.
Error
The task checks out libmongoc master and then runs build/calc_release_version.py, which no longer exists:
Checking out libmongoc version: master Updated config.m4 Updated config.w32 /opt/mongodbtoolchain/v5/bin/python3: can't open file '.../src/libmongoc/build/calc\_release\_version.py': \[Errno 2\] No such file or directory Command 'subprocess.exec' in function 'compile driver' \(step 1.2 of 2\) failed: exit code 2.
Root cause
* On v1.21, .evergreen/compile-unix.sh (line 78) runs $PYTHON build/calc_release_version.py > ../LIBMONGOC_VERSION_CURRENT inside src/libmongoc whenever LIBMONGOC_VERSION is set. Makefile.frag (line 67) does the same for the libmongoc-version-current target.
* The build-php-8.3-libmongoc-latest task sets LIBMONGOC_VERSION: "master", and libmongoc master is now the 2.x line (currently 2.5.x).
* libmongoc removed build/calc_release_version.py in CDRIVER-5932. The version is now read from VERSION_CURRENT at the root of the libmongoc repository.
* The v2.x line dropped this invocation in PHPC-2435 (see PHPC-2551 and PHPC-2581) and reads src/libmongoc/VERSION_CURRENT instead. That change was not applied to v1.21.
Impact
The task has failed on every mainline run since at least 2025-05-23 (54 runs in the task history, all failed).
Suggested fix
* Option A: Point the latest variant to a 1.x ref. The 1.x driver line targets libmongoc 1.x and was not updated for the libmongoc 2.x breaking changes, so building it against libmongoc master is not a supported combination.
* Option B: Backport the v2.x change. Remove the calc_release_version.py call and read the version from src/libmongoc/VERSION_CURRENT (this file only exists in libmongoc 2.x).
Links
* Task: https://spruce.corp.mongodb.com/task/mongo_php_driver_1.21_build_debian12_build_php_8.3_libmongoc_latest_67faec8c4cd5ef59a36b47c0d8552293e616c7eb_26_10_07_09_01_36
* Related: PHPC-2435, PHPC-2551, PHPC-2581, CDRIVER-5932
- related to
-
CDRIVER-5932 Simplify version calculation
-
- Closed
-