Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Could not compile honggfuzz Windows 10 #5957

Closed
qalqi opened this issue May 8, 2020 · 18 comments · Fixed by #6081
Closed

Could not compile honggfuzz Windows 10 #5957

qalqi opened this issue May 8, 2020 · 18 comments · Fixed by #6081
Assignees

Comments

@qalqi
Copy link

qalqi commented May 8, 2020

Followed all steps

  1. https://substrate.dev/docs/en/overview/getting-started/#getting-started-on-windows
  2. https://substrate.dev/docs/en/overview/getting-started/#get-the-source

At cargo build --release

honggfuzz-rs does not currently support Windows but works well under WSL (Windows Subsystem for Linux)
 --> C:\Users\X2\.cargo\registry\src\github.com-1ecc6299db9ec823\honggfuzz-0.5.47\build.rs:7:1
  |
7 | compile_error!("honggfuzz-rs does not currently support Windows but works well under WSL (Windows Subsystem for Linux)");
  | 

As on April 2020, Windows has 76.52% market share. Please support Windows

image

@bkchr
Copy link
Member

bkchr commented May 12, 2020

honggfuzz-rs does not currently support Windows but works well under WSL (Windows Subsystem for Linux)

Please use WSL. Currently we don't support Windows officially.

@bkchr bkchr closed this as completed May 12, 2020
@qalqi
Copy link
Author

qalqi commented May 12, 2020

honggfuzz-rs does not currently support Windows but works well under WSL (Windows Subsystem for Linux)

Please use WSL. Currently we don't support Windows officially.

Why do you have steps for Substrate for windows that don't work? https://www.substrate.io/kb/getting-started/windows-users

@bkchr
Copy link
Member

bkchr commented May 12, 2020

You already reported it in the correct repo here: polkadot-developers/knowledgebase#65

I propose that you request further changes to the docs there.

Hongfuzz is only required for fuzzing, so if you use Substrate as a library, you should not run into the problems you see.

@qalqi
Copy link
Author

qalqi commented May 12, 2020

I need a substrate.exe to run the substrate chain in windows 10 as a chain or validator. Can you guide me on removing the fuzzing?

@bkchr
Copy link
Member

bkchr commented May 12, 2020

You can also use the node-template as in all the tutorials.

@qalqi
Copy link
Author

qalqi commented May 12, 2020

You can also use the node-template as in all the tutorials.

I only know cargo build --release Can you please elaborate.

btw, I was able to run substrate in Dec 2019 in Windows 10. so, it was definitely working.

@everhusk
Copy link
Contributor

Wouldn't it make more sense to change the fuzzing library and enable windows support? As @qalqi has mentioned, it was working before the honggfuzz library was added and Windows users makes up a pretty significant share of the market for substrate.

@qalqi
Copy link
Author

qalqi commented May 19, 2020

@gavofyork Can you look into providing Windows 10 support?

@qalqi
Copy link
Author

qalqi commented May 19, 2020

The same issue is open here #5681

@bkchr
Copy link
Member

bkchr commented May 19, 2020

@qalqi did you try to run cargo build --release -p substrate directly?

@qalqi
Copy link
Author

qalqi commented May 19, 2020

@qalqi did you try to run cargo build --release -p substrate directly?

Received
error: package ID specification 'substrate' matched no packages

@bkchr
Copy link
Member

bkchr commented May 19, 2020

Sorry, use -p node-cli

@qalqi
Copy link
Author

qalqi commented May 19, 2020

Running cargo build --release -p node-cli

gave following error


  Compiling sp-debug-derive v2.0.0-dev
error[E0432]: unresolved import `proc_macro`
  --> primitives\debug-derive\src\lib.rs:37:5
   |
37 | use proc_macro::TokenStream;
   |     ^^^^^^^^^^ help: a similar path exists: `syn::proc_macro`

error[E0433]: failed to resolve: use of undeclared type or module `proc_macro`
  --> primitives\debug-derive\src\impls.rs:22:42
   |
22 | pub fn debug_derive(ast: DeriveInput) -> proc_macro::TokenStream {
   |                                          ^^^^^^^^^^ use of undeclared type or module `proc_macro`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `sp-debug-derive`.
warning: build failed, waiting for other jobs to finish...
error: build failed

@bkchr
Copy link
Member

bkchr commented May 19, 2020

Please update your rust

@qalqi
Copy link
Author

qalqi commented May 19, 2020

At Substrate commit 0947c5b72cebee15e22870cd0087d58727f91aac
Did

rustup default nightly
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo build --release -p node-cli

Got the following error

error[E0599]: no method named `signal_handler_mut` found for reference `&runtime::Store` in the current scope                                                         
  --> C:\ ..\github.com-1ecc6299db9ec823\substrate-wasmtime-0.16.0-threadsafe.3\src\windows.rs:29:15
   |
29 |         *self.signal_handler_mut() = Some(Box::new(handler));
   |               ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `signal_handler`

error: aborting due to previous error                                                                                                                                 

For more information about this error, try `rustc --explain E0599`.
error: could not compile `substrate-wasmtime`.  

@bkchr
Copy link
Member

bkchr commented May 19, 2020

Yeah, the problem of this is that we don't have any Windows CI.

@arkpar maybe something you want to fix?

@arkpar arkpar reopened this May 19, 2020
@arkpar arkpar self-assigned this May 19, 2020
@qalqi
Copy link
Author

qalqi commented May 24, 2020

At commit b8c493d0af30674f7d4a2ad6f179b264a295b1e9, able to generate substrate binary. Unable to run in dev mode.

$ ./substrate.exe --dev

2020-05-25 01:47:07 Substrate Node
2020-05-25 01:47:07 ✌️  version 2.0.0-dev-b8c493d0a-x86_64-windows-msvc
2020-05-25 01:47:07 ❤️  by Parity Technologies <[email protected]>, 2017-2020
2020-05-25 01:47:07 �📋 Chain specification: Development
2020-05-25 01:47:07 🏷  Node name: parsimonious-show-2584
2020-05-25 01:47:07 �👤 Role: AUTHORITY
2020-05-25 01:47:07 �💾 Database: RocksDb at C:\Users\X2\AppData\Local\Parity Technologies ,60,admin,64,parity.io,62,\substrate\chains\dev\db       
2020-05-25 01:47:07 ⛓  Native runtime: node-250 (substrate-node-2.tx1.au10)
Error: Service(Client(Backend("Unsupported database version: 0")))

Just $./substrate.exe is running but isn't producing blocks

@qalqi
Copy link
Author

qalqi commented May 25, 2020

working after ./substrate.exe purge-chain --dev

thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants