Summary
While building this extension as part of the DuckDB community extensions program (via the haybarn-community-extensions fork's CI), the macOS arm64 build fails. It's not your extension's own C++ code — it's the vcpkg-managed mongo-c-driver dependency's build-time linker probe — but flagging it here since it blocks your macOS build and you control the pinned mongo-c-driver version.
Error
CMake Error at src/libmongoc/CMakeLists.txt:453 (TRY_COMPILE):
Failed to configure test project build system.
...
/usr/bin/cc -fPIC -fuse-ld=lld -arch arm64 -mmacosx-version-min=11.0 ... -o cmTC_cb38d
clang: error: invalid linker name in argument '-fuse-ld=lld'
ninja: build stopped: subcommand failed.
error: building mongo-c-driver:arm64-osx-release failed with: BUILD_FAILED
Full failing job: https://github.com/Query-farm-haybarn/haybarn-community-extensions/actions/runs/33027261113 (MacOS osx_arm64 leg; Linux and Windows build fine)
Root cause
mongo-c-driver's own CMake (src/libmongoc/CMakeLists.txt:453) does a TRY_COMPILE to detect lld-linker support by passing -fuse-ld=lld to the host compiler. On this runner, that resolves to Apple's Xcode clang, which doesn't recognize the bare lld linker name (Apple's clang only accepts a handful of built-in linker names; a real lld binary isn't on PATH/wired up the way it is on Linux). The TRY_COMPILE fails outright, which cascades into "Failed to configure test project build system" and aborts the whole mongo-c-driver vcpkg build before it even gets to compiling.
Since mongo-c-driver version is pinned via this extension's vcpkg.json/vcpkg_commit, a version bump (or a vcpkg overlay port patch) is the practical lever here even though the bug itself lives upstream in mongo-c-driver.
Suggested fix
- Check if a newer
mongo-c-driver release has fixed/removed this lld-detection TRY_COMPILE for macOS, and bump the pinned version if so, or
- Add a small vcpkg portfile patch/overlay that skips the lld probe (or passes a linker name Xcode's clang actually understands) on
osx triplets.
Thanks for maintaining this extension — happy to help verify a fix if useful!
Summary
While building this extension as part of the DuckDB community extensions program (via the
haybarn-community-extensionsfork's CI), the macOS arm64 build fails. It's not your extension's own C++ code — it's the vcpkg-managedmongo-c-driverdependency's build-time linker probe — but flagging it here since it blocks your macOS build and you control the pinnedmongo-c-driverversion.Error
Full failing job: https://github.com/Query-farm-haybarn/haybarn-community-extensions/actions/runs/33027261113 (MacOS osx_arm64 leg; Linux and Windows build fine)
Root cause
mongo-c-driver's own CMake (src/libmongoc/CMakeLists.txt:453) does aTRY_COMPILEto detectlld-linker support by passing-fuse-ld=lldto the host compiler. On this runner, that resolves to Apple's Xcodeclang, which doesn't recognize the barelldlinker name (Apple's clang only accepts a handful of built-in linker names; a reallldbinary isn't onPATH/wired up the way it is on Linux). TheTRY_COMPILEfails outright, which cascades into "Failed to configure test project build system" and aborts the wholemongo-c-drivervcpkg build before it even gets to compiling.Since
mongo-c-driverversion is pinned via this extension'svcpkg.json/vcpkg_commit, a version bump (or a vcpkg overlay port patch) is the practical lever here even though the bug itself lives upstream inmongo-c-driver.Suggested fix
mongo-c-driverrelease has fixed/removed this lld-detectionTRY_COMPILEfor macOS, and bump the pinned version if so, orosxtriplets.Thanks for maintaining this extension — happy to help verify a fix if useful!