kpcyrd / sn0int

Semi-automatic OSINT framework and package manager
https://sn0int.readthedocs.io/
GNU General Public License v3.0
1.92k stars 177 forks source link

Consider updating sn0int's dependency `geo` #249

Closed ZhongRuoyu closed 9 months ago

ZhongRuoyu commented 10 months ago

Hello (again)! While packaging Rust for Homebrew at Homebrew/homebrew-core#140367, we discovered that sn0int 0.25.0 (precisely, its dependency geo 0.23.1) failed to build on x86_64 macOS with Rust 1.72.0, due to the following error (logs taken from CI run):

  error[E0275]: overflow evaluating the requirement `[closure@/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/geo-0.23.1/src/algorithm/map_coords.rs:855:69: 855:72]: Fn<(geo_types::Coord<T>,)>`
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`geo`)
    = note: required for `&[closure@map_coords.rs:855:69]` to implement `Fn<(geo_types::Coord<T>,)>`
    = note: the full type name has been written to '/private/tmp/sn0int-20230829-21961-1x6r1qu/sn0int-0.25.0/target/release/deps/geo-1993f5f0ca01c535.long-type-7029868113833310661.txt'
    = note: 128 redundant requirements hidden
    = note: required for `&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&...` to implement `Fn<(geo_types::Coord<T>,)>`
    = note: the full type name has been written to '/private/tmp/sn0int-20230829-21961-1x6r1qu/sn0int-0.25.0/target/release/deps/geo-1993f5f0ca01c535.long-type-14355286547430786240.txt'

  For more information about this error, try `rustc --explain E0275`.
  error: could not compile `geo` (lib) due to previous error
  warning: build failed, waiting for other jobs to finish...
  error: failed to compile `sn0int v0.25.0 (/private/tmp/sn0int-20230829-21961-1x6r1qu/sn0int-0.25.0)`, intermediate artifacts can be found at `/private/tmp/sn0int-20230829-21961-1x6r1qu/sn0int-0.25.0/target`.
  To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

This error only occurred on x86_64 macOS; not on arm64 macOS or x86_64 Linux. Interestingly, when building with the rustup-provided toolchain (rustc 1.72.0 (5680fa18f 2023-08-23)), the build finished fine. I am unsure about the underlying reason, though.

Nevertheless, I believe this is an issue with the geo dependency, as discussed in georust/geo#1010, and has been fixed by geo 0.25. When I bumped the geo version in sn0int-std/Cargo.toml to 0.25, the build was successful. In that regard, would you consider updating the geo dependency?

Thanks!


Versions

Environment

ZhongRuoyu commented 10 months ago

Update: This is reproducible on Fedora 38 (x86_64), which ships Rust 1.72.0.

This fails with the recursion error:

docker run --rm -it fedora:38 sh -c "
dnf install -y rust cargo git pkgconf-pkg-config libsodium libsodium-devel sqlite-libs sqlite-devel libseccomp libseccomp-devel
git clone https://github.com/kpcyrd/sn0int.git
cd sn0int
git checkout v0.25.0
cargo build --release --verbose -p sn0int
"

But this works:

docker run --rm -it fedora:38 sh -c "
dnf install -y rust cargo git pkgconf-pkg-config libsodium libsodium-devel sqlite-libs sqlite-devel libseccomp libseccomp-devel
git clone https://github.com/kpcyrd/sn0int.git
cd sn0int
git checkout v0.25.0
sed -i 's/geo = \"0.23\"/geo = \"0.25\"/' sn0int-std/Cargo.toml
cargo update -p geo
cargo build --release --verbose -p sn0int
"
kpcyrd commented 9 months ago

Sorry for the delay, I've released a new version.

Thanks for the notification!

ZhongRuoyu commented 9 months ago

No worries; thank you, @kpcyrd!