Hello, I am trying to build the C Driver for MongoDB version 1.20.1 and I am getting an error. I’m building this driver with macOS 12.1, CMake 3.22.1, and Apple clang 13.0.0. The build files were created successfully with the following commands:
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.20.0/mongo-c-driver-1.20.0.tar.gz
tar xzf mongo-c-driver-1.20.0.tar.gz
cd mongo-c-driver-1.20.0
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON ..
Here is that output:
--2021-12-23 01:57:13-- https://github.com/mongodb/mongo-c-driver/releases/download/1.20.0/mongo-c-driver-1.20.0.tar.gz
Resolving github.com (github.com)... 140.82.114.4
Connecting to github.com (github.com)|140.82.114.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/9735077/1131e352-2cc2-4863-ac94-12b04e5171d1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211223%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211223T075713Z&X-Amz-Expires=300&X-Amz-Signature=8813dbb715532bf05e84d01d01ac41a36463bb02b5016588a01cd31efb1cb30f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9735077&response-content-disposition=attachment%3B%20filename%3Dmongo-c-driver-1.20.0.tar.gz&response-content-type=application%2Foctet-stream [following]
--2021-12-23 01:57:13-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/9735077/1131e352-2cc2-4863-ac94-12b04e5171d1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211223%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211223T075713Z&X-Amz-Expires=300&X-Amz-Signature=8813dbb715532bf05e84d01d01ac41a36463bb02b5016588a01cd31efb1cb30f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9735077&response-content-disposition=attachment%3B%20filename%3Dmongo-c-driver-1.20.0.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7355546 (7.0M) [application/octet-stream]
Saving to: ‘mongo-c-driver-1.20.0.tar.gz’
0K .......... .......... .......... .......... .......... 0% 3.49M 2s
50K .......... .......... .......... .......... .......... 1% 4.01M 2s
100K .......... .......... .......... .......... .......... 2% 3.55M 2s
150K .......... .......... .......... .......... .......... 2% 5.96M 2s
200K .......... .......... .......... .......... .......... 3% 5.04M 2s
250K .......... .......... .......... .......... .......... 4% 5.47M 2s
300K .......... .......... .......... .......... .......... 4% 11.4M 1s
350K .......... .......... .......... .......... .......... 5% 10.7M 1s
400K .......... .......... .......... .......... .......... 6% 6.68M 1s
450K .......... .......... .......... .......... .......... 6% 3.89M 1s
500K .......... .......... .......... .......... .......... 7% 14.3M 1s
550K .......... .......... .......... .......... .......... 8% 9.07M 1s
600K .......... .......... .......... .......... .......... 9% 2.75M 1s
650K .......... .......... .......... .......... .......... 9% 14.4M 1s
700K .......... .......... .......... .......... .......... 10% 9.54M 1s
750K .......... .......... .......... .......... .......... 11% 8.00M 1s
800K .......... .......... .......... .......... .......... 11% 12.0M 1s
850K .......... .......... .......... .......... .......... 12% 11.2M 1s
900K .......... .......... .......... .......... .......... 13% 6.82M 1s
950K .......... .......... .......... .......... .......... 13% 5.92M 1s
1000K .......... .......... .......... .......... .......... 14% 8.34M 1s
1050K .......... .......... .......... .......... .......... 15% 7.42M 1s
1100K .......... .......... .......... .......... .......... 16% 6.98M 1s
1150K .......... .......... .......... .......... .......... 16% 3.27M 1s
1200K .......... .......... .......... .......... .......... 17% 6.25M 1s
1250K .......... .......... .......... .......... .......... 18% 6.37M 1s
1300K .......... .......... .......... .......... .......... 18% 10.5M 1s
1350K .......... .......... .......... .......... .......... 19% 9.09M 1s
1400K .......... .......... .......... .......... .......... 20% 8.75M 1s
1450K .......... .......... .......... .......... .......... 20% 11.2M 1s
1500K .......... .......... .......... .......... .......... 21% 9.84M 1s
1550K .......... .......... .......... .......... .......... 22% 7.25M 1s
1600K .......... .......... .......... .......... .......... 22% 7.57M 1s
1650K .......... .......... .......... .......... .......... 23% 7.65M 1s
1700K .......... .......... .......... .......... .......... 24% 6.25M 1s
1750K .......... .......... .......... .......... .......... 25% 6.55M 1s
1800K .......... .......... .......... .......... .......... 25% 6.59M 1s
1850K .......... .......... .......... .......... .......... 26% 7.51M 1s
1900K .......... .......... .......... .......... .......... 27% 3.74M 1s
1950K .......... .......... .......... .......... .......... 27% 11.1M 1s
2000K .......... .......... .......... .......... .......... 28% 12.7M 1s
2050K .......... .......... .......... .......... .......... 29% 9.83M 1s
2100K .......... .......... .......... .......... .......... 29% 7.13M 1s
2150K .......... .......... .......... .......... .......... 30% 4.83M 1s
2200K .......... .......... .......... .......... .......... 31% 9.17M 1s
2250K .......... .......... .......... .......... .......... 32% 6.35M 1s
2300K .......... .......... .......... .......... .......... 32% 8.99M 1s
2350K .......... .......... .......... .......... .......... 33% 7.72M 1s
2400K .......... .......... .......... .......... .......... 34% 6.78M 1s
2450K .......... .......... .......... .......... .......... 34% 6.32M 1s
2500K .......... .......... .......... .......... .......... 35% 8.94M 1s
2550K .......... .......... .......... .......... .......... 36% 5.15M 1s
2600K .......... .......... .......... .......... .......... 36% 8.93M 1s
2650K .......... .......... .......... .......... .......... 37% 4.16M 1s
2700K .......... .......... .......... .......... .......... 38% 10.7M 1s
2750K .......... .......... .......... .......... .......... 38% 11.8M 1s
2800K .......... .......... .......... .......... .......... 39% 8.08M 1s
2850K .......... .......... .......... .......... .......... 40% 7.39M 1s
2900K .......... .......... .......... .......... .......... 41% 7.12M 1s
2950K .......... .......... .......... .......... .......... 41% 5.82M 1s
3000K .......... .......... .......... .......... .......... 42% 5.89M 1s
3050K .......... .......... .......... .......... .......... 43% 9.55M 1s
3100K .......... .......... .......... .......... .......... 43% 7.59M 1s
3150K .......... .......... .......... .......... .......... 44% 7.13M 1s
3200K .......... .......... .......... .......... .......... 45% 6.89M 1s
3250K .......... .......... .......... .......... .......... 45% 7.01M 1s
3300K .......... .......... .......... .......... .......... 46% 7.66M 1s
3350K .......... .......... .......... .......... .......... 47% 4.65M 1s
3400K .......... .......... .......... .......... .......... 48% 4.76M 1s
3450K .......... .......... .......... .......... .......... 48% 10.3M 1s
3500K .......... .......... .......... .......... .......... 49% 11.3M 1s
3550K .......... .......... .......... .......... .......... 50% 8.68M 1s
3600K .......... .......... .......... .......... .......... 50% 7.93M 1s
3650K .......... .......... .......... .......... .......... 51% 6.53M 1s
3700K .......... .......... .......... .......... .......... 52% 8.99M 0s
3750K .......... .......... .......... .......... .......... 52% 5.08M 0s
3800K .......... .......... .......... .......... .......... 53% 8.59M 0s
3850K .......... .......... .......... .......... .......... 54% 7.12M 0s
3900K .......... .......... .......... .......... .......... 54% 5.73M 0s
3950K .......... .......... .......... .......... .......... 55% 8.17M 0s
4000K .......... .......... .......... .......... .......... 56% 7.60M 0s
4050K .......... .......... .......... .......... .......... 57% 8.61M 0s
4100K .......... .......... .......... .......... .......... 57% 5.20M 0s
4150K .......... .......... .......... .......... .......... 58% 4.44M 0s
4200K .......... .......... .......... .......... .......... 59% 10.2M 0s
4250K .......... .......... .......... .......... .......... 59% 11.4M 0s
4300K .......... .......... .......... .......... .......... 60% 4.27M 0s
4350K .......... .......... .......... .......... .......... 61% 13.1M 0s
4400K .......... .......... .......... .......... .......... 61% 7.06M 0s
4450K .......... .......... .......... .......... .......... 62% 13.7M 0s
4500K .......... .......... .......... .......... .......... 63% 6.84M 0s
4550K .......... .......... .......... .......... .......... 64% 5.88M 0s
4600K .......... .......... .......... .......... .......... 64% 7.50M 0s
4650K .......... .......... .......... .......... .......... 65% 5.91M 0s
4700K .......... .......... .......... .......... .......... 66% 10.6M 0s
4750K .......... .......... .......... .......... .......... 66% 6.14M 0s
4800K .......... .......... .......... .......... .......... 67% 8.03M 0s
4850K .......... .......... .......... .......... .......... 68% 5.77M 0s
4900K .......... .......... .......... .......... .......... 68% 5.23M 0s
4950K .......... .......... .......... .......... .......... 69% 9.92M 0s
5000K .......... .......... .......... .......... .......... 70% 8.65M 0s
5050K .......... .......... .......... .......... .......... 70% 5.72M 0s
5100K .......... .......... .......... .......... .......... 71% 8.21M 0s
5150K .......... .......... .......... .......... .......... 72% 7.49M 0s
5200K .......... .......... .......... .......... .......... 73% 4.19M 0s
5250K .......... .......... .......... .......... .......... 73% 8.49M 0s
5300K .......... .......... .......... .......... .......... 74% 6.37M 0s
5350K .......... .......... .......... .......... .......... 75% 10.1M 0s
5400K .......... .......... .......... .......... .......... 75% 6.88M 0s
5450K .......... .......... .......... .......... .......... 76% 12.0M 0s
5500K .......... .......... .......... .......... .......... 77% 8.15M 0s
5550K .......... .......... .......... .......... .......... 77% 6.54M 0s
5600K .......... .......... .......... .......... .......... 78% 3.14M 0s
5650K .......... .......... .......... .......... .......... 79% 10.2M 0s
5700K .......... .......... .......... .......... .......... 80% 8.93M 0s
5750K .......... .......... .......... .......... .......... 80% 9.08M 0s
5800K .......... .......... .......... .......... .......... 81% 9.05M 0s
5850K .......... .......... .......... .......... .......... 82% 4.61M 0s
5900K .......... .......... .......... .......... .......... 82% 25.9M 0s
5950K .......... .......... .......... .......... .......... 83% 7.18M 0s
6000K .......... .......... .......... .......... .......... 84% 8.03M 0s
6050K .......... .......... .......... .......... .......... 84% 7.71M 0s
6100K .......... .......... .......... .......... .......... 85% 6.58M 0s
6150K .......... .......... .......... .......... .......... 86% 4.84M 0s
6200K .......... .......... .......... .......... .......... 87% 11.0M 0s
6250K .......... .......... .......... .......... .......... 87% 6.74M 0s
6300K .......... .......... .......... .......... .......... 88% 8.72M 0s
6350K .......... .......... .......... .......... .......... 89% 3.64M 0s
6400K .......... .......... .......... .......... .......... 89% 6.00M 0s
6450K .......... .......... .......... .......... .......... 90% 7.69M 0s
6500K .......... .......... .......... .......... .......... 91% 13.9M 0s
6550K .......... .......... .......... .......... .......... 91% 10.1M 0s
6600K .......... .......... .......... .......... .......... 92% 8.05M 0s
6650K .......... .......... .......... .......... .......... 93% 3.65M 0s
6700K .......... .......... .......... .......... .......... 93% 3.56M 0s
6750K .......... .......... .......... .......... .......... 94% 9.37M 0s
6800K .......... .......... .......... .......... .......... 95% 6.95M 0s
6850K .......... .......... .......... .......... .......... 96% 13.0M 0s
6900K .......... .......... .......... .......... .......... 96% 6.29M 0s
6950K .......... .......... .......... .......... .......... 97% 5.70M 0s
7000K .......... .......... .......... .......... .......... 98% 6.43M 0s
7050K .......... .......... .......... .......... .......... 98% 5.30M 0s
7100K .......... .......... .......... .......... .......... 99% 13.9M 0s
7150K .......... .......... .......... ... 100% 18.0M=1.0s
2021-12-23 01:57:14 (6.87 MB/s) - ‘mongo-c-driver-1.20.0.tar.gz’ saved [7355546/7355546]
-- The C compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for a CXX compiler
-- Looking for a CXX compiler - /Library/Developer/CommandLineTools/usr/bin/c++
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_LLD_LINKER_SUPPORT
-- Performing Test HAVE_LLD_LINKER_SUPPORT - Failed
file VERSION_CURRENT contained BUILD_VERSION 1.20.0
-- Build and install static libraries
-- Using bundled libbson
libbson version (from VERSION_CURRENT file): 1.20.0
-- Looking for snprintf
-- Looking for snprintf - found
-- Performing Test BSON_HAVE_TIMESPEC
-- Performing Test BSON_HAVE_TIMESPEC - Success
-- struct timespec found
-- Looking for gmtime_r
-- Looking for gmtime_r - found
-- Looking for rand_r
-- Looking for rand_r - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for strlcpy
-- Looking for strlcpy - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Looking for SYS_gettid
-- Looking for SYS_gettid - found
-- Looking for syscall
-- Looking for syscall - found
CMake Deprecation Warning at src/libbson/CMakeLists.txt:151 (cmake_policy):
The OLD behavior for policy CMP0042 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
Adding -fPIC to compilation of bson_static components
libmongoc version (from VERSION_CURRENT file): 1.20.0
-- Searching for zlib CMake packages
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- zlib found version "1.2.11"
-- zlib include path "/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include"
-- zlib libraries "/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib/libz.tbd"
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file stdarg.h
-- Looking for include file stdarg.h - found
-- Searching for compression library zstd
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libzstd'
-- Found libzstd, version 1.5.0
-- Found zstd version 1.5.0 in /usr/local/Cellar/zstd/1.5.0/include
-- Searching for sasl/sasl.h
-- Found in /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include
-- Searching for libsasl2
-- Found /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib/libsasl2.tbd
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Looking for res_nsearch
-- Looking for res_nsearch - found
-- Looking for res_ndestroy
-- Looking for res_ndestroy - found
-- Looking for sched_getcpu
-- Looking for sched_getcpu - not found
-- Detected parameters: accept (int, struct sockaddr *, socklen_t *)
-- Searching for compression library header snappy-c.h
-- Not found (specify -DCMAKE_INCLUDE_PATH=/path/to/snappy/include for Snappy compression)
-- No ICU library found, SASLPrep disabled for SCRAM-SHA-256 authentication.
-- If ICU is installed in a non-standard directory, define ICU_ROOT as the ICU installation path.
Searching for libmongocrypt
-- libmongocrypt not found. Configuring without Client-Side Field Level Encryption support.
-- Performing Test MONGOC_HAVE_SS_FAMILY
-- Performing Test MONGOC_HAVE_SS_FAMILY - Success
-- Compiling against Secure Transport
-- Compiling against Cyrus SASL
Adding -fPIC to compilation of mongoc_static components
-- Building with MONGODB-AWS auth support
-- Build files generated for:
-- build system: Unix Makefiles
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build
I also have installed libmongoc and libbson successfuly with the following command:
brew install mongo-c-driver
I then changed directories to cmake-build (the location where all build files were written to) and executed this command:
cmake --build .
This is the result of the above command:
/usr/local/bin/cmake -S/Users/estoneman/src/mongo-c-driver-1.20.0 -B/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/CMakeFiles /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build//CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
/Library/Developer/CommandLineTools/usr/bin/make -f src/libbson/CMakeFiles/bson_shared.dir/build.make src/libbson/CMakeFiles/bson_shared.dir/depend
cd /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /Users/estoneman/src/mongo-c-driver-1.20.0 /Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/CMakeFiles/bson_shared.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f src/libbson/CMakeFiles/bson_shared.dir/build.make src/libbson/CMakeFiles/bson_shared.dir/build
[ 0%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.o
cd /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson && /Library/Developer/CommandLineTools/usr/bin/cc -DBSON_COMPILATION -DCOMMON_PREFIX_=_bson_common -DJSONSL_PARSE_NAN -Dbson_shared_EXPORTS -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/../../src/common -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src/common -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -fPIC -D_XOPEN_SOURCE=700 -MD -MT src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.o -MF CMakeFiles/bson_shared.dir/src/bson/bcon.c.o.d -o CMakeFiles/bson_shared.dir/src/bson/bcon.c.o -c /Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson/bcon.c
[ 0%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson.c.o
cd /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson && /Library/Developer/CommandLineTools/usr/bin/cc -DBSON_COMPILATION -DCOMMON_PREFIX_=_bson_common -DJSONSL_PARSE_NAN -Dbson_shared_EXPORTS -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/../../src/common -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src/common -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -fPIC -D_XOPEN_SOURCE=700 -MD -MT src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson.c.o -MF CMakeFiles/bson_shared.dir/src/bson/bson.c.o.d -o CMakeFiles/bson_shared.dir/src/bson/bson.c.o -c /Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson/bson.c
[ 1%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-atomic.c.o
cd /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson && /Library/Developer/CommandLineTools/usr/bin/cc -DBSON_COMPILATION -DCOMMON_PREFIX_=_bson_common -DJSONSL_PARSE_NAN -Dbson_shared_EXPORTS -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/../../src/common -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src/common -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -fPIC -D_XOPEN_SOURCE=700 -MD -MT src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-atomic.c.o -MF CMakeFiles/bson_shared.dir/src/bson/bson-atomic.c.o.d -o CMakeFiles/bson_shared.dir/src/bson/bson-atomic.c.o -c /Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson/bson-atomic.c
[ 1%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-clock.c.o
cd /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson && /Library/Developer/CommandLineTools/usr/bin/cc -DBSON_COMPILATION -DCOMMON_PREFIX_=_bson_common -DJSONSL_PARSE_NAN -Dbson_shared_EXPORTS -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/../../src/common -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src/common -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -fPIC -D_XOPEN_SOURCE=700 -MD -MT src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-clock.c.o -MF CMakeFiles/bson_shared.dir/src/bson/bson-clock.c.o.d -o CMakeFiles/bson_shared.dir/src/bson/bson-clock.c.o -c /Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson/bson-clock.c
[ 1%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-context.c.o
cd /Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson && /Library/Developer/CommandLineTools/usr/bin/cc -DBSON_COMPILATION -DCOMMON_PREFIX_=_bson_common -DJSONSL_PARSE_NAN -Dbson_shared_EXPORTS -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson -I/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/../../src/common -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src -I/Users/estoneman/src/mongo-c-driver-1.20.0/cmake-build/src/libbson/../../src/common -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -fPIC -D_XOPEN_SOURCE=700 -MD -MT src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-context.c.o -MF CMakeFiles/bson_shared.dir/src/bson/bson-context.c.o.d -o CMakeFiles/bson_shared.dir/src/bson/bson-context.c.o -c /Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson/bson-context.c
/Users/estoneman/src/mongo-c-driver-1.20.0/src/libbson/src/bson/bson-context.c:234:4: error: implicit declaration of function 'arc4random_buf' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
arc4random_buf (&result, sizeof (result));
^
1 error generated.
make[2]: *** [src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-context.c.o] Error 1
make[1]: *** [src/libbson/CMakeFiles/bson_shared.dir/all] Error 2
make: *** [all] Error 2
I updated cmake from 3.20.1 to 3.22.1 thinking that it would help, however it did not. Any help would be appreciated, thanks!