Suppress sqlite-vec macOS warnings and add run make target#87
Suppress sqlite-vec macOS warnings and add run make target#87
Conversation
- Suppress sqlite3_auto_extension deprecation warnings in CGO_CFLAGS for Darwin builds - Apple's SDK deprecated process-global auto-extension APIs but functions remain functional - Add convenient 'make run' target for executing tapes CLI commands with proper build flags
jpmcb
left a comment
There was a problem hiding this comment.
make run target looks good but we shouldn't suppress all deprecation warnings globally since there may be legitimate ones that pop up. We can just drop that flag down into the run target:
CGO_CFLAGS=-Wno-deprecated-declarations \
CGO_ENABLED=1 \
GOEXPERIMENT=jsonv2 \
go run -ldflags "$(LDFLAGS)" ./cli/tapes $(ARGS)I need more information on what's going on here since I'm not able to replicate this on my system and I worry this is a bigger symptom of how we're handing CGO cross compilation. A few questions:
- Is this only during
go build? Or do you get compiled binary warnings? - What's the exact output you get?
- Are you using the Nix flake dev shell? This has
go_1_25locked and if you're on a older/newer version of Go, you might see different CGO warnings. If you're not using the nix dev shell, what version of Go are you on? - What's your output of
go env(very importantly to seeCCandCXXcompilers Go is targeting). I'm onCC='clang'which is installed in my top level nix developer environment: maybe that's where the drift is happening. - What version of macOS are you on?
- What version of Xcode gcc are you on
gcc --version? What version of Xcode are you onxcode-select --version? We could explore locking the nix flake topkg.libgcc(this is basically how rust nix dev shells work) but that could be very very painful since people contributing are most likely on xcode's global gcc.
|
Confirmed that this is an environment drift issue, not something we should suppress globally. Here's my setup:
The warnings come from Apple's SDK headers marking sqlite3_auto_extension as deprecated. The Nix shell avoids this because it provides its own clang + headers that don't carry those The main issue is I am not using Nix. I'll close this PR and instead open one that strengthens the Nix dev shell recommendation in AGENTS.md and CONTRIBUTING.md so other contributors don't hit the same thing. |
|
Ahh I see: yeah, it's because Xcode is throwing those warnings - we can align on Nix's clang compiler |
Summary
make runtarget for executing tapes CLI commands with proper build flagsfixes #62
Details
The sqlite-vec library triggers deprecation warnings on macOS due to Apple's deprecation of process-global auto-extension APIs in their SDK headers. These functions remain fully functional, so we suppress the warnings using
CGO_CFLAGSfor Darwin builds.Additionally, a new
make runtarget simplifies running tapes CLI commands with all necessary build flags and environment variables properly configured.Testing
make runwith various argumentsContinue Tasks: ✅ 2 no changes — View all