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

Build failed #15

Open
arshkumarsingh opened this issue Jun 30, 2024 · 2 comments · May be fixed by #16
Open

Build failed #15

arshkumarsingh opened this issue Jun 30, 2024 · 2 comments · May be fixed by #16

Comments

@arshkumarsingh
Copy link

Straight up not building

Terminal Output

PS C:\Users\3Rinfotech\Documents\GitHub\hdfc-cc-parser-rs> cargo build --release
Compiling proc-macro2 v1.0.86
Compiling unicode-ident v1.0.12
Compiling typenum v1.17.0
Compiling version_check v0.9.4
Compiling syn v1.0.109
Compiling windows_x86_64_msvc v0.52.5
Compiling autocfg v1.3.0
Compiling serde v1.0.203
Compiling memchr v2.7.4
Compiling generic-array v0.14.7
Compiling windows-targets v0.52.5
Compiling anstyle v1.0.7
Compiling num-traits v0.2.19
Compiling windows-sys v0.52.0
Compiling doc-comment v0.3.3
Compiling tinyvec_macros v0.1.1
Compiling quote v1.0.36
Compiling utf8parse v0.2.2
Compiling anstyle-parse v0.2.4
Compiling anstyle-query v1.1.0
Compiling anstyle-wincon v3.0.3
Compiling syn v2.0.68
Compiling tinyvec v1.6.1
Compiling cpufeatures v0.2.12
Compiling cfg-if v1.0.0
Compiling is_terminal_polyfill v1.70.0
Compiling heck v0.4.1
Compiling adler32 v1.2.0
Compiling colorchoice v1.0.1
Compiling anstream v0.6.14
Compiling crypto-common v0.1.6
Compiling block-padding v0.3.3
Compiling block-buffer v0.10.4
Compiling aho-corasick v1.1.3
Compiling inout v0.1.3
Compiling digest v0.10.7
Compiling cipher v0.4.4
Compiling unicode-normalization v0.1.23
Compiling anyhow v1.0.86
Compiling unicode-bidi v0.3.15
Compiling pdf_encoding v0.3.0
Compiling unicode-properties v0.1.1
Compiling regex-syntax v0.8.4
Compiling either v1.13.0
Compiling strsim v0.11.1
Compiling clap_lex v0.7.1
Compiling tuple v0.5.2
Compiling clap_builder v4.5.8
Compiling itertools v0.10.5
Compiling stringprep v0.1.5
Compiling regex-automata v0.4.7
Compiling cbc v0.1.2
Compiling aes v0.8.4
Compiling sha2 v0.10.8
Compiling inflate v0.4.5
Compiling async-trait v0.1.80
Compiling deflate v1.0.0
Compiling datasize_derive v0.2.15
Compiling snafu-derive v0.7.5
Compiling fax_derive v0.1.0
Compiling pdf_derive v0.1.22 (https://github.com/pdf-rs/pdf?rev=5cf56b7#5cf56b77)
Compiling datasize v0.2.15
Compiling globalcache v0.2.2
Compiling fax v0.2.4
Compiling istring v0.3.4
Compiling euclid v0.22.10
Compiling csv-core v0.1.11
Compiling once_cell v1.19.0
Compiling weezl v0.1.8
Compiling bitflags v1.3.2
Compiling lazy_static v1.5.0
Compiling log v0.4.22
Compiling md5 v0.7.0
Compiling ryu v1.0.18
Compiling itoa v1.0.11
Compiling jpeg-decoder v0.3.1
Compiling csv v1.3.0
Compiling regex v1.10.5
error[E0080]: could not evaluate static initializer
--> C:\Users\3Rinfotech.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\num\nonzero.rs:335:21
|
335 | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
|
note: inside NonZero::<u32>::new_unchecked
--> C:\Users\3Rinfotech.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\num\nonzero.rs:335:21
|
335 | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside Entry::new
--> C:\Users\3Rinfotech.cargo\registry\src\index.crates.io-6f17d22bba15001f\pdf_encoding-0.3.0\src\lib.rs:154:17
|
154 | NonZeroU32::new_unchecked(c as u32)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside c
--> C:\Users\3Rinfotech.cargo\registry\src\index.crates.io-6f17d22bba15001f\pdf_encoding-0.3.0\src\lib.rs:168:10
|
168 | Some(Entry::new(c))
| ^^^^^^^^^^^^^
note: inside WINANSI
--> C:\Users\3Rinfotech.cargo\registry\src\index.crates.io-6f17d22bba15001f\pdf_encoding-0.3.0\src\cp1252.rs:2:2
|
2 | c('\u{0000}'), c('\u{0001}'), c('\u{0002}'), c('\u{0003}'), c('\u{0004}'), c('\u{0005}'), c('\u{0006}'), c('\u{0007}'),
| ^^^^^^^^^^^^^

error[E0080]: could not evaluate static initializer
--> C:\Users\3Rinfotech.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\num\nonzero.rs:335:21
|
335 | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
|
note: inside NonZero::<u32>::new_unchecked
--> C:\Users\3Rinfotech.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\num\nonzero.rs:335:21
|
335 | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside Entry::new
--> C:\Users\3Rinfotech.cargo\registry\src\index.crates.io-6f17d22bba15001f\pdf_encoding-0.3.0\src\lib.rs:154:17
154 | NonZeroU32::new_unchecked(c as u32)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside c
--> C:\Users\3Rinfotech.cargo\registry\src\index.crates.io-6f17d22bba15001f\pdf_encoding-0.3.0\src\lib.rs:168:10
|
168 | Some(Entry::new(c))
| ^^^^^^^^^^^^^
note: inside MACROMAN
--> C:\Users\3Rinfotech.cargo\registry\src\index.crates.io-6f17d22bba15001f\pdf_encoding-0.3.0\src\macroman.rs:2:2
|
2 | c('\u{0000}'), c('\u{0001}'), c('\u{0002}'), c('\u{0003}'), c('\u{0004}'), c('\u{0005}'), c('\u{0006}'), c('\u{0007}'),
| ^^^^^^^^^^^^^

For more information about this error, try rustc --explain E0080.
error: could not compile pdf_encoding (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
PS C:\Users\3Rinfotech\Documents\GitHub\hdfc-cc-parser-rs> rustc --explain E0080
A constant value failed to get evaluated.

Erroneous code example:

enum Enum {
    X = (1 << 500),
}

This error indicates that the compiler was unable to sensibly evaluate a
constant expression that had to be evaluated. Attempting to divide by 0
or causing an integer overflow are two ways to induce this error.

Ensure that the expressions given can be evaluated as the desired integer type.

See the Discriminants section of the Reference for more information about
setting custom integer types on enums using the
repr attribute.

@joeirimpan
Copy link
Owner

Can you provide more details on your setup? OS,Rust,Cargo versions. Also try updating pdf_encoding = "0.4.0" in cargo.toml?

@arshkumarsingh arshkumarsingh linked a pull request Jul 1, 2024 that will close this issue
@arshkumarsingh
Copy link
Author

Yes it did build when I changed pdf_encoding = "0.4.0" in cargo.toml, also my OS = Windows 10, Rustc = 1.78.0, Editor = VS Code

Also Have raised a PR for this change #16

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

Successfully merging a pull request may close this issue.

2 participants