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

[BUG] currently nightly compiler cannot build plotters due to bug in pathfinder (simd) #554

Closed
jonaspleyer opened this issue Feb 27, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@jonaspleyer
Copy link
Contributor

There is a bug in the most recent pathfinder version which currently prohibits building this package for with the newest nightly compiler. This means docs.rs will fail to build if a new version is to be published. There are multiple ways to deal with this bug:

  1. Wait until the bugfix is pushed upstream
  2. Do not build with the ttf feature (which enables the dependency). Check also docs - annotate objects who depend on features #553 which enables all features for docs.rs specifically!
  3. Try to roll back to another working version of pathfinder (I have not tested this yet).

My hope is that the bugfix is pushed upstream soon and a new version of pathfinder is released.

Error message

rustup update nightly
cargo +nightly build
error[E0635]: unknown feature `stdsimd`
  --> /home/jonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pathfinder_simd-0.5.2/src/lib.rs:12:49
   |
12 | #![cfg_attr(pf_rustc_nightly, feature(simd_ffi, stdsimd))]
   |                                                 ^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `pathfinder_simd` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@CDaut
Copy link

CDaut commented Mar 9, 2024

Any news on this? It appears the bugfix is pushed into upstream on the pathfinder repo.

@jonaspleyer
Copy link
Contributor Author

I believe that there is no new verison published on crates.io yet. You can open an issue at their repo or wait until a new version is published. If you can, simply omit the ttf feature which enables the dependency in the first place.

@swfsql
Copy link

swfsql commented Mar 11, 2024

fyi you can also temporarily add a patch in case you're producing a binary:

# Cargo.toml
[patch.crates-io]
pathfinder_simd = { git = "https://github.com/servo/pathfinder.git", rev = "dc6034f" }
pathfinder_geometry = { git = "https://github.com/servo/pathfinder.git", rev = "dc6034f" }

edit: you may also need to delete or update the Cargo.lock file

@CDaut
Copy link

CDaut commented Mar 12, 2024

That works, thank you!

@atouchet
Copy link

A new version of pathfinder_simd has been published. This should hopefully be fixed now.

@jayvdb
Copy link
Contributor

jayvdb commented Apr 13, 2024

Yup, it is fixed.

@bionicles
Copy link

bionicles commented May 7, 2024

here's what i'm getting in attempting to build plotters 0.3.5 today on nightly

pathfinder_simd = { version = "0.5", optional = true }
plotters = { version = "0.3", optional = true }
error[E0557]: feature has been removed
  --> /home/bion/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pathfinder_simd-0.5.2/src/lib.rs:11:61
   |
11 | #![cfg_attr(pf_rustc_nightly, feature(link_llvm_intrinsics, platform_intrinsics))]
   |                                                             ^^^^^^^^^^^^^^^^^^^ feature has been removed
   |
   = note: SIMD intrinsics use the regular intrinsics ABI now
error[E0635]: unknown feature `stdsimd`
  --> /home/bion/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pathfinder_simd-0.5.2/src/lib.rs:12:49
   |
12 | #![cfg_attr(pf_rustc_nightly, feature(simd_ffi, stdsimd))]
   |                                                 ^^^^^^^

this works:

pathfinder_simd = { version = "0.5.3" } # removed the optional from pathfinder_simd (force this version)
plotters = { version = "0.3.5", optional = true }

and this works, so the issue is not with the minor version numbers, it's with "optional"

pathfinder_simd = { version = "0.5" }
plotters = { version = "0.3", optional = true }

@ripytide
Copy link

ripytide commented May 7, 2024

@bionicles what happens if you do pathfinder_simd = { version = "0.5.3", optional = true }?

@bionicles
Copy link

seems fixed, i can't repro the issue anymore, now plotters is working off of 0.5.3 even if I cargo clean, with minor versions present or absent, could be related to nightly 1.80 or just my cargo having some memory to use 0.5.3 now, plotters can get the pathfinder_simd on nightly so this issue could be closed I reckon

@ripytide
Copy link

ripytide commented May 7, 2024

It was probably stuck on 0.5.2 in the Cargo.lock, cargo update would have likely also fixed it.

@jonaspleyer
Copy link
Contributor Author

I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants