Skip to content

Suppress sqlite-vec macOS warnings and add run make target#87

Closed
bdougie wants to merge 1 commit intomainfrom
fix/suppress-sqlite-vec-macos-warnings
Closed

Suppress sqlite-vec macOS warnings and add run make target#87
bdougie wants to merge 1 commit intomainfrom
fix/suppress-sqlite-vec-macos-warnings

Conversation

@bdougie
Copy link
Contributor

@bdougie bdougie commented Feb 12, 2026

Summary

  • Suppress sqlite3_auto_extension deprecation warnings on macOS builds
  • Add convenient make run target for executing tapes CLI commands with proper build flags

fixes #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_CFLAGS for Darwin builds.

Additionally, a new make run target simplifies running tapes CLI commands with all necessary build flags and environment variables properly configured.

Testing

  • Verified makefile syntax
  • Tested make run with various arguments

Continue Tasks: ✅ 2 no changes — View all

- 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
@bdougie bdougie marked this pull request as ready for review February 12, 2026 14:24
@bdougie bdougie requested a review from jpmcb February 12, 2026 14:24
Copy link
Contributor

@jpmcb jpmcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Is this only during go build? Or do you get compiled binary warnings?
  2. What's the exact output you get?
  3. Are you using the Nix flake dev shell? This has go_1_25 locked 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?
  4. What's your output of go env (very importantly to see CC and CXX compilers Go is targeting). I'm on CC='clang' which is installed in my top level nix developer environment: maybe that's where the drift is happening.
  5. What version of macOS are you on?
  6. What version of Xcode gcc are you on gcc --version? What version of Xcode are you on xcode-select --version? We could explore locking the nix flake to pkg.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.

@bdougie
Copy link
Contributor Author

bdougie commented Feb 13, 2026

Confirmed that this is an environment drift issue, not something we should suppress globally. Here's my setup:

  • macOS 26.3, Xcode clang 17.0.0, xcode-select 2416
  • Go 1.25.6 via Homebrew (not the Nix flake)
  • CC=cc / CXX=c++ (Apple's Xcode clang, not Nix's)
  • Warnings are compile-time only from go build, not the binary

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
annotations.

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.

@jpmcb
Copy link
Contributor

jpmcb commented Feb 13, 2026

Ahh I see: yeah, it's because Xcode is throwing those warnings - we can align on Nix's clang compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppress sqlite-vec deprecation warnings on macOS

2 participants