-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.24.1
-
None
Problem Statement/Rationale
mongo-c-driver 1.24.1 fails to build because it can't find bson/bson-dsl.h. libbson 1.24.1 didn't install it.
Steps to Reproduce
I've installed libbson 1.24.1 built with these cmake flags:
{{-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF
-DENABLE_EXAMPLES=OFF
-DENABLE_TESTS=OFF
-DENABLE_UNINSTALL=OFF
-DMONGO_USE_CCACHE=OFF
-DENABLE_BSON=ON
-DENABLE_MONGOC=OFF}}
Then I tried to build mongo-c-driver 1.24.1 with these cmake flags:
{{{}-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF
-DENABLE_EXAMPLES=OFF
{}}}{{{}-DENABLE_TESTS=OFF
-DENABLE_UNINSTALL=OFF
-DMONGO_USE_CCACHE=OFF-DENABLE_ICU=ON
-DENABLE_MONGOC=ON
-DENABLE_SASL=CYRUS
-DENABLE_SNAPPY=ON
-DENABLE_ZLIB=SYSTEM
-DUSE_SYSTEM_LIBBSON=TRUE{}}}
Expected Results
Successful build
Actual Results
Build failure:
src/libmongoc/src/mongoc/mongoc-aggregate.c:26:10: fatal error: 'bson/bson-dsl.h' file not found
#include <bson/bson-dsl.h>
^~~~~~~~~~~~~~~~~
1 error generated.
Additional Notes
Another user previously reported the problem here:
I'm on macOS 12.6.7 installing libbson and mongo-c-driver with MacPorts—I'm the maintainer of these in MacPorts, currently trying to update them from 1.23.5, which was fine, to 1.24.1.
For 1.24.1 I'm using -DUSE_SYSTEM_LIBBSON=TRUE instead of -DENABLE_BSON=SYSTEM; I hope I've correctly understood from the documentation that this is needed.