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

Packaging for openSUSE fails: use of undeclared crate or module windows #21

Open
kastl-ars opened this issue Sep 23, 2024 · 0 comments
Open

Comments

@kastl-ars
Copy link

Hi,

I found mistletoe and wanted to see if I could package it for openSUSE. I know it is not released and in its early stages, but still it would be interesting.

The build fails, unfortunately:

[  251s]    Compiling mistletoe-api v0.1.2 (/home/abuild/rpmbuild/BUILD/mistletoe-0.0.1~1705277988.b665c2f/mistletoe-api)
[  253s]    Compiling clap v4.5.18
[  253s]    Compiling kube v0.87.2
[  253s]    Compiling colored v2.1.0
[  254s]    Compiling indoc v2.0.5
[  254s]    Compiling mistletoe v0.1.2 (/home/abuild/rpmbuild/BUILD/mistletoe-0.0.1~1705277988.b665c2f)
[  254s] error[E0433]: failed to resolve: use of undeclared crate or module `windows`
[  254s]  --> src/config.rs:6:5
[  254s]   |
[  254s] 6 | use windows::core::PCSTR;
[  254s]   |     ^^^^^^^ use of undeclared crate or module `windows`
[  254s] 
[  254s] error[E0433]: failed to resolve: use of undeclared crate or module `windows`
[  254s]  --> src/config.rs:7:5
[  254s]   |
[  254s] 7 | use windows::Win32::Storage::FileSystem::{GetFileAttributesA, SetFileAttributesA, FILE_FLAGS_AND_ATTRIBUTES};
[  254s]   |     ^^^^^^^ use of undeclared crate or module `windows`
[  254s] 
[  254s] warning: unused import: `std::ffi::OsStr`
[  254s]  --> src/config.rs:1:5
[  254s]   |
[  254s] 1 | use std::ffi::OsStr;
[  254s]   |     ^^^^^^^^^^^^^^^
[  254s]   |
[  254s]   = note: `#[warn(unused_imports)]` on by default
[  254s] 
[  255s] For more information about this error, try `rustc --explain E0433`.
[  255s] warning: `mistletoe` (lib) generated 1 warning
[  255s] error: could not compile `mistletoe` (lib) due to 2 previous errors; 1 warning emitted
[  255s] warning: build failed, waiting for other jobs to finish...

Any idea how to fix it?

Kind Regards,

Johannes

P.S.: This was done with the code from commit b665c2f.

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

1 participant