georust / georust/proj

Is libsqlite3-sys really needed?

Open
#235 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
186
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Hello,

I know proj requires sqlite3 for some of it's functionality. However, I'm not sure it exposes any of that to the external world.

My question is: do we really need this:

https://github.com/georust/proj/blob/main/proj-sys/Cargo.toml#L15

The extern crate is defined only under the `bundled_build` cfg:

https://github.com/georust/proj/blob/main/proj-sys/src/lib.rs#L31

and I think that cfg is disabled by default.

The reason I'm asking is that I want to have both `proj` and `rusqlite` and I get

Using `proj = 0.29` (I know `0.30` is most recent, but because of some nix stuff, I'm forced to use `0.29`) and `rusqlite=0.36.0`, I get this error:

```
error: failed to select a version for `libsqlite3-sys`.
... required by package `proj-sys v0.25.0`
... which satisfies dependency `proj-sys = "^0.25.0"` of package `proj v0.29.0`
... which satisfies dependency `proj = "^0.29.0"` of package `binaries v0.1.0 (xxx/binaries)`
versions that meet the requirements `>=0.28, <0.31` are: 0.30.1, 0.30.0, 0.29.0, 0.28.0

package `libsqlite3-sys` links to the native library `sqlite3`, but it conflicts with a previous package which links to `sqlite3` as well:
package `libsqlite3-sys v0.34.0`
... which satisfies dependency `libsqlite3-sys = "^0.34.0"` of package `rusqlite v0.36.0`
... which satisfies dependency `rusqlite = "^0.36.0"` of package `xxx v0.1.0 (/xxx)`
... which satisfies path dependency `xxx` (locked to 0.1.0) of package `binaries v0.1.0 (xxx/binaries)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "sqlite3"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `libsqlite3-sys` which could resolve this conflict
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect the dependency at proj-sys/Cargo.toml and the bundled_build-gated extern crate in proj-sys/src/lib.rs. Reproduce the resolver conflict with proj 0.29 and rusqlite 0.36, then determine whether the libsqlite3-sys dependency is required and verify that the dependency graph resolves without duplicate sqlite3 links.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
build-system, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.