alexheretic / ab-glyph

Rust API for loading, scaling, positioning and rasterizing OpenType font glyphs
Apache License 2.0
372 stars 24 forks source link

Compilation error on fedora copr #37

Closed ghost closed 3 years ago

ghost commented 3 years ago

https://download.copr.fedorainfracloud.org/results/remilauzier/zemeroth/fedora-rawhide-x86_64/02303655-rust-ab_glyph/builder-live.log.gz

error[E0432]: unresolved import owned_ttf_parser::AsFaceRef --> src/ttfp.rs:10:5 10 use owned_ttf_parser::AsFaceRef; ^^^^^^^^^^^^^^^^^^---------
help: a similar name exists in the module: AsFontRef
no AsFaceRef in the root

error[E0433]: failed to resolve: could not find Face in owned_ttf_parser --> src/ttfp.rs:113:31 | 113 | owned_ttf_parser::Face::from_slice(data, index).maperr(|| InvalidFont)?, | ^^^^ could not find Face in owned_ttf_parser

error[E0433]: failed to resolve: could not find OwnedFace in owned_ttf_parser --> src/ttfp.rs:177:31 | 177 | owned_ttf_parser::OwnedFace::from_vec(data, index).maperr(|| InvalidFont)?, | ^^^^^^^^^ could not find OwnedFace in owned_ttf_parser

error[E0412]: cannot find type Face in crate owned_ttf_parser --> src/ttfp.rs:71:45 | 71 | pub struct FontRef<'font>(owned_ttf_parser::Face<'font>); | ^^^^ not found in owned_ttf_parser

error[E0412]: cannot find type OwnedFace in crate owned_ttf_parser --> src/ttfp.rs:134:38 134 pub struct FontVec(owned_ttf_parser::OwnedFace); ^^^^^^^^^ help: a struct with a similar name exists: OwnedFont

::: /usr/share/cargo/registry/owned_ttf_parser-0.6.0/src/owned.rs:6:1 | 6 | pub struct OwnedFont(Pin<Box>); | ----------------------------------------------- similarly named struct OwnedFont defined here

error[E0277]: the size for values of type dyn Iterator<Item = (glyph::GlyphId, char)> cannot be known at compilation time --> src/ttfp.rs:306:29 306 let inner = Box::new( ^^^^^^^^ doesn't have a size known at compile-time ... 338 implfont!(FontRef<'>); ------------------------ in this macro invocation
= help: the trait `Sized` is not implemented for `dyn Iterator<Item = (glyph::GlyphId, char)>`
= note: required by `Box::<T>::new`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the size for values of type dyn Iterator<Item = (glyph::GlyphId, char)> cannot be known at compilation time --> src/ttfp.rs:306:29 306 let inner = Box::new( ^^^^^^^^ doesn't have a size known at compile-time ... 339 impl_font!(FontVec); -------------------- in this macro invocation
= help: the trait `Sized` is not implemented for `dyn Iterator<Item = (glyph::GlyphId, char)>`
= note: required by `Box::<T>::new`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 7 previous errors

alexheretic commented 3 years ago

That log shows trying to build against _owned_ttfparser/ttf-parser 0.6 whereas the manifest for _abglyph 0.2.11 states _owned_ttfparser must be compatible with 0.12. So the compile error is not surprising.

This is an external build issue, I don't support (ie can't fix) whatever build system is butchering the dependency semver guarantees here.