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

Release v0.13.0 build from source fails [solved] #1551

Closed
JoelMon opened this issue Jul 12, 2021 · 5 comments
Closed

Release v0.13.0 build from source fails [solved] #1551

JoelMon opened this issue Jul 12, 2021 · 5 comments

Comments

@JoelMon
Copy link
Contributor

JoelMon commented Jul 12, 2021

Bug Report

Hello everyone,

I'm getting errors at compile time with v0.13.0. I compiled v0.12.2 without an issue so it might be isolated to v0.13.0.

Environment

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Pop
Description:	Pop!_OS 21.04
Release:	21.04
Codename:	hirsute
  • Zola version: v0.13.0 from source
  • rustc 1.53.0 (53cb7b09b 2021-06-17)
  • cargo 1.53.0 (4369396ce 2021-04-27)
  • g++ is already the newest version (4:10.3.0-1ubuntu1).
  • libssl-dev is already the newest version (1.1.1j-1ubuntu3).
  • make is already the newest version (4.3-4ubuntu1).

Expected Behavior

Expected the project to compile without errors.

Current Behavior

The code has type errors and does not compile.

$ cargo build --release
   Compiling libc v0.2.82
   Compiling autocfg v1.0.1
   Compiling memchr v2.3.4
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.24
   Compiling lazy_static v1.4.0
   Compiling unicode-xid v0.2.1
   Compiling cfg-if v0.1.10
   Compiling syn v1.0.58
   Compiling serde v1.0.118
   Compiling log v0.4.11
   Compiling bitflags v1.2.1
   Compiling ryu v1.0.5
   Compiling byteorder v1.4.2
   Compiling cc v1.0.66
   Compiling serde_json v1.0.61
   Compiling getrandom v0.1.16
   Compiling itoa v0.4.7
   Compiling serde_derive v1.0.118
   Compiling fnv v1.0.7
   Compiling version_check v0.9.2
   Compiling regex-syntax v0.6.22
   Compiling pkg-config v0.3.19
   Compiling const_fn v0.4.5
   Compiling rayon-core v1.9.0
   Compiling percent-encoding v2.1.0
   Compiling once_cell v1.5.2
   Compiling scopeguard v1.1.0
   Compiling ppv-lite86 v0.2.10
   Compiling pin-project-lite v0.2.2
   Compiling same-file v1.0.6
   Compiling getrandom v0.2.1
   Compiling base64 v0.13.0
   Compiling crc32fast v1.2.1
   Compiling adler v0.2.3
   Compiling bytes v1.0.0
   Compiling ucd-trie v0.1.3
   Compiling slab v0.4.2
   Compiling maplit v1.0.2
   Compiling unic-common v0.9.0
   Compiling either v1.6.1
   Compiling adler32 v1.2.0
   Compiling unic-char-range v0.9.0
   Compiling lazycell v1.3.0
   Compiling safemem v0.3.3
   Compiling spin v0.5.2
   Compiling weezl v0.1.3
   Compiling siphasher v0.3.3
   Compiling pin-project-internal v0.4.27
   Compiling futures-core v0.3.9
   Compiling proc-macro-hack v0.5.19
   Compiling matches v0.1.8
   Compiling linked-hash-map v0.5.4
   Compiling untrusted v0.7.1
   Compiling deunicode v0.4.3
   Compiling proc-macro-nested v0.1.6
   Compiling color_quant v1.1.0
   Compiling xml-rs v0.8.3
   Compiling tinyvec_macros v0.1.0
   Compiling typenum v1.12.0
   Compiling httparse v1.3.4
   Compiling bytemuck v1.4.1
   Compiling scoped_threadpool v0.1.9
   Compiling humansize v1.1.0
   Compiling futures-io v0.3.9
   Compiling futures-sink v0.3.9
   Compiling pin-utils v0.1.0
   Compiling new_debug_unreachable v1.0.4
   Compiling try-lock v0.2.3
   Compiling unicode-segmentation v1.7.1
   Compiling encoding_rs v0.8.26
   Compiling tower-service v0.3.0
   Compiling lexical-core v0.7.4
   Compiling httpdate v0.3.2
   Compiling mac v0.1.1
   Compiling utf-8 v0.7.5
   Compiling precomputed-hash v0.1.1
   Compiling static_assertions v1.1.0
   Compiling arrayvec v0.5.2
   Compiling dtoa v0.4.7
   Compiling ipnet v2.3.0
   Compiling mime v0.3.16
   Compiling pulldown-cmark v0.8.0
   Compiling bytecount v0.3.2
   Compiling bytecount v0.6.2
   Compiling doc-comment v0.3.3
   Compiling slotmap v0.4.0
   Compiling xmlparser v0.13.3
   Compiling unicode-width v0.1.8
   Compiling byte-tools v0.3.1
   Compiling vec_map v0.8.2
   Compiling nix v0.18.0
   Compiling opaque-debug v0.3.0
   Compiling quick-error v1.2.3
   Compiling ansi_term v0.11.0
   Compiling cpuid-bool v0.1.2
   Compiling strsim v0.8.0
   Compiling strum v0.18.0
   Compiling opaque-debug v0.2.3
   Compiling fake-simd v0.1.2
   Compiling glob v0.3.0
   Compiling relative-path v1.3.2
   Compiling open v1.4.0
   Compiling termcolor v1.1.2
   Compiling thread_local v1.1.0
   Compiling tracing-core v0.1.17
   Compiling hashbrown v0.8.2
   Compiling indexmap v1.5.2
   Compiling crossbeam-utils v0.8.1
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling memoffset v0.6.1
   Compiling miniz_oxide v0.4.3
   Compiling rayon v1.5.0
   Compiling tokio v1.0.1
   Compiling num-rational v0.3.2
   Compiling num-iter v0.1.42
   Compiling regex-automata v0.1.9
   Compiling nom v5.1.2
   Compiling unicase v2.6.0
   Compiling generic-array v0.14.4
   Compiling futures-task v0.3.9
   Compiling walkdir v2.3.1
   Compiling pest v2.1.3
   Compiling onig_sys v69.6.0
   Compiling ring v0.16.19
   Compiling http v0.2.3
   Compiling unic-ucd-version v0.9.0
   Compiling miniz_oxide v0.3.7
   Compiling deflate v0.8.6
   Compiling unic-char-property v0.9.0
   Compiling line-wrap v0.1.1
   Compiling phf_shared v0.8.0
   Compiling futures-channel v0.3.9
   Compiling unicode-bidi v0.3.4
   Compiling form_urlencoded v1.0.0
   Compiling yaml-rust v0.4.5
   Compiling slug v0.1.4
   Compiling gif v0.11.1
   Compiling tinyvec v1.1.0
   Compiling futf v0.1.4
   Compiling heck v0.3.2
   Compiling textwrap v0.11.0
   Compiling block-padding v0.1.5
   Compiling roxmltree v0.13.1
   Compiling tracing v0.1.22
   Compiling unic-ucd-segment v0.9.0
   Compiling phf v0.8.0
   Compiling pest_meta v2.1.3
   Compiling http-body v0.4.0
   Compiling tendril v0.4.2
   Compiling unicode-normalization v0.1.16
   Compiling aho-corasick v0.7.15
   Compiling csv-core v0.1.10
   Compiling want v0.3.0
   Compiling quote v1.0.8
   Compiling num_cpus v1.13.0
   Compiling time v0.1.43
   Compiling mio v0.7.7
   Compiling filetime v0.2.13
   Compiling socket2 v0.3.19
   Compiling iovec v0.1.4
   Compiling net2 v0.2.37
   Compiling inotify-sys v0.1.4
   Compiling atty v0.2.14
   Compiling png v0.16.8
   Compiling unic-segment v0.9.0
   Compiling bstr v0.2.14
   Compiling bincode v1.3.1
error[E0308]: mismatched types
  --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/bhcomp.rs:62:24
   |
62 |     let bytes = bits / Limb::BITS;
   |                        ^^^^^^^^^^ expected `usize`, found `u32`

   Compiling toml v0.5.8
error[E0277]: cannot divide `usize` by `u32`
  --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/bhcomp.rs:62:22
   |
62 |     let bytes = bits / Limb::BITS;
   |                      ^ no implementation for `usize / u32`
   |
   = help: the trait `Div<u32>` is not implemented for `usize`

error[E0308]: mismatched types
   --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/bigcomp.rs:157:55
    |
157 |     let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
    |                                                       ^^^^^^^^^^^^^^^ expected `usize`, found `u32`

error[E0277]: no implementation for `usize & u32`
   --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/bigcomp.rs:157:53
    |
157 |     let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
    |                                                     ^ no implementation for `usize & u32`
    |
    = help: the trait `BitAnd<u32>` is not implemented for `usize`

error[E0308]: mismatched types
   --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/bigcomp.rs:175:40
    |
175 |         let (q, r) = shift.ceil_divmod(Limb::BITS);
    |                                        ^^^^^^^^^^ expected `usize`, found `u32`
    |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
    |
175 |         let (q, r) = shift.ceil_divmod(Limb::BITS.try_into().unwrap());
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1043:42
     |
1043 |     let mut count = index.saturating_mul(Limb::BITS);
     |                                          ^^^^^^^^^^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1043 |     let mut count = index.saturating_mul(Limb::BITS.try_into().unwrap());
     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1058:28
     |
1058 |     Limb::BITS.checked_mul(x.len())
     |                            ^^^^^^^ expected `u32`, found `usize`
     |
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
     |
1058 |     Limb::BITS.checked_mul(x.len().try_into().unwrap())
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1059:22
     |
1059 |         .map(|v| v - nlz)
     |                      ^^^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1059:20
     |
1059 |         .map(|v| v - nlz)
     |                    ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1060:20
     |
1060 |         .unwrap_or(usize::max_value())
     |                    ^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
     |
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
     |
1060 |         .unwrap_or(usize::max_value().try_into().unwrap())
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1058:5
     |
1054 |   pub fn bit_length(x: &[Limb]) -> usize {
     |                                    ----- expected `usize` because of return type
...
1058 | /     Limb::BITS.checked_mul(x.len())
1059 | |         .map(|v| v - nlz)
1060 | |         .unwrap_or(usize::max_value())
     | |______________________________________^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1058 |     Limb::BITS.checked_mul(x.len())
1059 |         .map(|v| v - nlz)
1060 |         .unwrap_or(usize::max_value()).try_into().unwrap()
     |

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1085:23
     |
1085 |     debug_assert!(n < bits && n != 0);
     |                       ^^^^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1085 |     debug_assert!(n < bits.try_into().unwrap() && n != 0);
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1092:25
     |
1092 |     let lshift = bits - n;
     |                         ^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1092:23
     |
1092 |     let lshift = bits - n;
     |                       ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1134:19
     |
1134 |     let rem = n % bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot mod `usize` by `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1134:17
     |
1134 |     let rem = n % bits;
     |                 ^ no implementation for `usize % u32`
     |
     = help: the trait `Rem<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1135:19
     |
1135 |     let div = n / bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot divide `usize` by `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1135:17
     |
1135 |     let div = n / bits;
     |                 ^ no implementation for `usize / u32`
     |
     = help: the trait `Div<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1191:23
     |
1191 |     debug_assert!(n < bits);
     |                       ^^^^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1191 |     debug_assert!(n < bits.try_into().unwrap());
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1201:25
     |
1201 |     let rshift = bits - n;
     |                         ^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1201:23
     |
1201 |     let rshift = bits - n;
     |                       ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1253:19
     |
1253 |     let rem = n % bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot mod `usize` by `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1253:17
     |
1253 |     let rem = n % bits;
     |                 ^ no implementation for `usize % u32`
     |
     = help: the trait `Rem<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1254:19
     |
1254 |     let div = n / bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot divide `usize` by `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:1254:17
     |
1254 |     let div = n / bits;
     |                 ^ no implementation for `usize / u32`
     |
     = help: the trait `Div<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:2065:27
     |
2065 |     let rs = Limb::BITS - s;
     |                           ^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> /home/joel/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/math.rs:2065:25
     |
2065 |     let rs = Limb::BITS - s;
     |                         ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error: aborting due to 27 previous errors

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `lexical-core`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Step to reproduce

run $ cargo build --release for v0.13.0

Additinal information

I compiled v0.12.2 without a problem.

@atsheehan
Copy link

I think this is an issue with lexical-core and Rust 1.53.0: Alexhuszagh/rust-lexical#65

I was able to build locally after running cargo update -p lexical-core which bumped lexical-core to 0.7.6.

@JoelMon
Copy link
Contributor Author

JoelMon commented Jul 12, 2021

I think this is an issue with lexical-core and Rust 1.53.0: Alexhuszagh/rust-lexical#65

I was able to build locally after running cargo update -p lexical-core which bumped lexical-core to 0.7.6.

You are right, once updated it built fine.
Thanks for the help, @atsheehan! 👋

@JoelMon JoelMon changed the title Release v0.13.0 build from source fails Release v0.13.0 build from source fails [fixed] Jul 12, 2021
@JoelMon JoelMon changed the title Release v0.13.0 build from source fails [fixed] Release v0.13.0 build from source fails [solved] Jul 12, 2021
@Keats
Copy link
Collaborator

Keats commented Jul 13, 2021

If you have time, the next version already fixes that and should be released this week and could use some more testing: try the next branch.

@Keats Keats closed this as completed Jul 13, 2021
@JoelMon
Copy link
Contributor Author

JoelMon commented Jul 13, 2021

If you have time, the next version already fixes that and should be released this week and could use some more testing: try the next branch.

Will do!

@JoelMon
Copy link
Contributor Author

JoelMon commented Jul 19, 2021

@Keats Zola 0.14.0 compiled fine.

Thank you.

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

3 participants