From 7569b2d7f040ccc6b612fcf70a92ab6004e08488 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Wed, 13 May 2026 03:06:39 +0200 Subject: [PATCH] fix(bookmarks): force libsqlite3-sys bundled via explicit feature gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chroot build of owlry-2.0.0 failed at link time with every sqlite3_* symbol undefined — libsqlite3-sys's build.rs was taking the 'build_linked' branch (which links to system libsqlite3) instead of 'build_bundled' (which compiles sqlite3.c statically). The host build worked only because /usr/lib/libsqlite3.so happens to be installed. The original Cargo.toml had: rusqlite = { version = "0.39", features = ["bundled"], optional = true } In theory this activates rusqlite/bundled which pulls libsqlite3-sys/bundled. In practice — apparently a Cargo resolver edge case with optional deps in edition 2024 — the bundled feature did not flow into the resolved feature graph in a clean chroot build. Fixed by declaring rusqlite without inline features and wiring the bundled flag explicitly in the bookmarks feature row: [dependencies] rusqlite = { version = "0.39", optional = true } [features] bookmarks = ["dep:rusqlite", "rusqlite/bundled"] Verified via 'cargo tree --features full -i libsqlite3-sys -e features': the libsqlite3-sys 'bundled' feature now traces back to owlry/full -> owlry/bookmarks -> rusqlite/bundled. --- crates/owlry/Cargo.toml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/owlry/Cargo.toml b/crates/owlry/Cargo.toml index a88033d..682efbb 100644 --- a/crates/owlry/Cargo.toml +++ b/crates/owlry/Cargo.toml @@ -60,8 +60,11 @@ signal-hook = "0.3" expr-solver-lib = "1" reqwest = { version = "0.13", default-features = false, features = ["native-tls", "json", "blocking"] } -# Optional providers (gated by cargo features below) -rusqlite = { version = "0.39", features = ["bundled"], optional = true } +# Optional providers (gated by cargo features below). +# Features declared on the bookmarks feature row, not inline here, so the +# `bundled` flag propagates cleanly to libsqlite3-sys regardless of how +# downstream consumers compose features. +rusqlite = { version = "0.39", optional = true } # Async oneshot channel (background thread -> main loop) futures-channel = "0.3" @@ -81,7 +84,7 @@ dev-logging = [] # Optional providers (compiled in when enabled). # The AUR PKGBUILD builds with --features "full" to ship everything. -bookmarks = ["dep:rusqlite"] +bookmarks = ["dep:rusqlite", "rusqlite/bundled"] clipboard = [] emoji = [] filesearch = []