Widen the libsqlite3-sys bound to any 0.x - #261
Open
MichaelKreil wants to merge 1 commit into
Open
Conversation
The ceiling of <0.36 predates libsqlite3-sys 0.36, 0.37 and 0.38, so proj-sys cannot coexist with any rusqlite newer than 0.37. Because libsqlite3-sys declares links = "sqlite3", cargo permits exactly one copy in a graph and there is no consumer-side fix. proj-sys has no API surface on the crate — an extern crate for linkage under bundled_build, plus DEP_SQLITE3_INCLUDE and DEP_SQLITE3_LIB_DIR in build.rs, both emitted unchanged by 0.35 through 0.38. <1.0 rather than a tighter ceiling: for a links crate the bound constrains the whole downstream graph, so a tight one needs a release every time libsqlite3-sys ships a minor, and breaks consumers whenever it falls behind. Fixes georust#235.
This was referenced Aug 17, 2026
MichaelKreil
added a commit
to versatiles-org/versatiles-studio
that referenced
this pull request
Aug 18, 2026
Carries a pinned proj-sys fork (georust/proj#261) to get past the libsqlite3-sys links conflict that Q19's spike could not see, because it measured GDAL outside Studio's dependency graph. Pinned to a commit so a rebase cannot change what this builds; the exit condition is written beside it. Blocks pkg-config in .cargo/config.toml rather than in a shell, so the build cannot differ between a laptop with Homebrew GDAL and CI. The raster card needed no change — the catalogue drops kinds whose operation the build lacks, so linking GDAL was enough to make it appear. The extension check moves to GDAL's own driver metadata for that card: from_gdal_raster's prose names one example filename, so matching against it rejected .tiff correctly and uselessly. The card and the gdal-src feature list are one choice in two files, and a test now keeps them one.
MichaelKreil
added a commit
to versatiles-org/versatiles-rs
that referenced
this pull request
Aug 18, 2026
Depending on versatiles with `gdal` while building GDAL statically fails to resolve: libsqlite3-sys declares `links = "sqlite3"`, and proj-sys 0.27 caps it at <0.36 while our rusqlite chain needs ^0.38. The ceiling predates libsqlite3-sys 0.36-0.38 and is not a real incompatibility — proj-sys uses the crate only for linkage and the DEP_SQLITE3_* build-script keys. The fix belongs upstream (georust/proj#261). Document the interim `[patch.crates-io]` stanza, including that it must live in the consuming application's workspace root rather than here. Refs #226
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #235.
libsqlite3-sysdeclareslinks = "sqlite3", so cargo permits exactly one copy in a graph. Thecurrent ceiling of
<0.36predates 0.36, 0.37 and 0.38, which meansproj-syscannot coexist withany
rusqlitenewer than 0.37 - and there is no consumer-side fix, because the dependency is notoptional on either side.
#235 reports this and stalled on the reporter's mention of nix. That was a red herring: this is pure
cargo resolution and happens with no nix involved. Our case is an application using
r2d2_sqlite:libsqlite3-sysgdal-sys(bundled) →gdal-src0.3 →proj-sys0.27>=0.28, <0.36r2d2_sqlite0.35 →rusqlite0.40^0.38Why widening rather than removing. #190 added this dependency deliberately, to give downstream
control over how libsqlite3 is linked in bundled builds - and it was merged specifically to unblock
georust/gdal's bundled build. That is exactly the case we are trying to use, so removing the
dependency would break the thing it was added for. Only the ceiling looks accidental.
Why the version does not matter.
proj-sys's entire coupling to the crate is:extern crate libsqlite3_sys;under thebundled_buildcfg - linkage only, no API surfaceDEP_SQLITE3_INCLUDEandDEP_SQLITE3_LIB_DIRinbuild.rsBoth
cargo:includeandcargo:lib_dirare emitted unchanged by libsqlite3-sys 0.35, 0.36, 0.37and 0.38, so nothing in
proj-syshas to change.Why
<1.0rather than<0.39. For alinkscrate a version bound is not only "what I can buildagainst" - it constrains the whole downstream graph, with no opt-out. So a tight ceiling needs a new
proj-sysrelease every timelibsqlite3-sysships a minor, and every time it falls behind,consumers cannot resolve at all. That treadmill is how
<0.36came to be three releases stale.<1.0still guards against a genuine 1.0 rewrite, since cargo treats each 0.x minor as breakinganyway. It does bet that the two build-script keys stay stable across 0.x; if that ever broke, it
would be a clear build error in
proj-sysrather than an unresolvable graph for everyone else.Tested against the case the dependency exists for - a statically bundled GDAL, on macOS/arm64:
it resolves with
libsqlite3-sys0.38.2 alongsiderusqlite0.40, builds GDAL, PROJ and SQLite fromsource, links with no gdal/proj/sqlite dylib, and reads a GeoTIFF into tiles with a correct Web
Mercator bbox - so PROJ's embedded
proj.dbresolves at runtime too.