paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.78k stars 646 forks source link

substrate not compiling on wsl on win10 #3163

Open gogo2464 opened 7 months ago

gogo2464 commented 7 months ago

Is there an existing issue?

Experiencing problems? Have you tried our Stack Exchange first?

Description of bug

I can not run the win10 template on wsl win 10 with the command $ ./target/release/node-template --dev

This error is not new and not only me. Check out this post:

https://substrate.stackexchange.com/questions/3688/error-failed-to-instantiate-a-new-wasm-module-instance-insufficient-resources

Steps to reproduce

$ ./target/release/node-template --dev 2024-02-01 01:51:43 Substrate Node 2024-02-01 01:51:43 āœŒļø version 4.0.0-dev-41ad4a6c9d7 2024-02-01 01:51:43 ā¤ļø by Substrate DevHub https://github.com/substrate-developer-hub, 2017-2024 2024-02-01 01:51:43 šŸ“‹ Chain specification: Development 2024-02-01 01:51:43 šŸ· Node name: elated-brass-9274 2024-02-01 01:51:43 šŸ‘¤ Role: AUTHORITY 2024-02-01 01:51:43 šŸ’¾ Database: RocksDb at /tmp/substratepocJiK/chains/dev/db/full 2024-02-01 01:51:44 šŸ”Ø Initializing Genesis block/state (state: 0x20b5ā€¦b875, header-hash: 0xdf2cā€¦1d21) 2024-02-01 01:51:44 šŸ‘“ Loading GRANDPA authority set from genesis on what appears to be first startup. 2024-02-01 01:51:44 Essential task txpool-background failed. Shutting down service. Error: Service(Client(Execution(RuntimeConstruction(Other("failed to instantiate a new WASM module instance: cannot create a memfd: Function not implemented (os error 38)")))))

koute commented 7 months ago

Are you using WSL1? That is not supported and probably never will be due to the missing functionality that AFAIK will never be implemented by Microsoft.

Can you try switching to WSL2 and see if that works?

gogo2464 commented 7 months ago

I did wsl --set-default-version 2.

gogo2464 commented 7 months ago

and still this error

gogo2464 commented 7 months ago
wsl -l -v
  NAME      STATE           VERSION
* Debian    Running         1

I was wrong. let me check.

frikinomad commented 5 months ago

Hi Were you able to get it running

if so then did you try connecting node to https://polkadot.js.org/apps/#/explorer ??

I have tried doing hundreds of times & asked in forums but haven't got any ans for this

Any help is appreciated I can run this in VM but resource constraints

gogo2464 commented 5 months ago

No I have still not being able to get it running on windows yet.

Still running in Linux.