Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider updating sn0int's dependency geo #249

Closed
ZhongRuoyu opened this issue Aug 30, 2023 · 3 comments
Closed

Consider updating sn0int's dependency geo #249

ZhongRuoyu opened this issue Aug 30, 2023 · 3 comments

Comments

@ZhongRuoyu
Copy link

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

  • rustc --version: rustc 1.72.0 (5680fa18f 2023-08-23) (built from a source tarball)
  • cargo --version: cargo 1.72.0 (26bba4830 2023-08-26)
  • sn0int --version: sn0int 0.25.0
  • uname -a: Darwin 88665a5040f1 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 x86_64

Environment

  • Operating System/Distro: macOS
  • Installed from (source/apt/pacman/brew/docker): source
@ZhongRuoyu
Copy link
Author

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
Copy link
Owner

kpcyrd commented Sep 9, 2023

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

Thanks for the notification!

@kpcyrd kpcyrd closed this as completed Sep 9, 2023
@ZhongRuoyu
Copy link
Author

No worries; thank you, @kpcyrd!

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

No branches or pull requests

2 participants