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

Missing troubleshooting help when using ubuntu via wsl on windows #2090

Open
2 tasks done
poisonhackerfinger opened this issue Nov 28, 2023 · 0 comments
Open
2 tasks done
Labels
new content 💡✍️ New Devhub content required.

Comments

@poisonhackerfinger
Copy link

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Content request

following the tutorial on a windows machine with ubuntu using wsl can lead to directory mounting issues. (had it myself).

quick guide i created to fix the issues:

Errors like
cargo:warning=rocksdb/table/block_based/block_based_table_reader.cc:2943:1: fatal error: error writing to /tmp/ccFEjz7y.s: Read-only file system
cargo:warning= 2943 | } // namespace ROCKSDB_NAMESPACE
cargo:warning= | ^
cargo:warning=compilation terminated.
exit status: 1
indicate missing write permission on mounted /tmp directory. Since ubuntu is running as a wsl on windows the following steps need to be made.

check permissions with ls -ld /tmp
should be drwxrwxrwt ? ? ? ? Nov 20 08:35 /tmp
check permissions on mounted drive with mount
/dev/sdb on / type ext4 (ro,relatime,discard,errors=remount-ro,data=ordered) shows read-only (ro) mount for root folder. needs to be read-write (rw).
Update the mounted directory permission.
Change WSL Default Mount Options:
Open the WSL configuration file /etc/wsl.conf using a text editor within WSL (e.g., nano, vim, or gedit): sudo nano /etc/wsl.conf (If the file doesn't exist, you can create it.)
Add Mount Options:
Add the following lines to the wsl.conf file to specify the default mount options:
[wsl2]
options = "metadata"
Save the file and exit the text editor. (Ctrl + X, save file)
Restart WSL
Check the mounted directory permission. with mount.
e.g. /dev/sdb on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)

Following the tutorial can lead to rust compiler version issues since the parachain repository release v1.0.0 is only compatible with certain versions.
following error was generated when executing cargo build --release in the cloned polkadot repository

Compiling sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#2b76b44e)
error[E0658]: use of unstable library feature 'once_cell'
--> /home/rustdev/.cargo/git/checkouts/substrate-7e08433d4c370a21/2b76b44/client/executor/wasmtime/src/util.rs:147:6
|
147 | use std::sync::OnceLock;
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #74465 rust-lang/rust#74465 for more information
...
when adding a rust-toolchain.toml file to the cloned repository directory with the following specifications
[toolchain]
channel = "nightly-2023-05-22" # Specify the desired Rust Nightly version
components = [ "rustfmt" ] # Include additional components if needed
targets = [ "wasm32-unknown-unknown" ] # Specify additional targets if needed
profile = "minimal" # Choose the desired profile

it works. it would be helpful if that step is specified. else you have to check the rustc version in the release notes on github.

I hope this small FAQ I made for myself would be helpful to others following the building relay chain and parachain tutorial.

Are you willing to help with this request?

Yes!

@poisonhackerfinger poisonhackerfinger added the new content 💡✍️ New Devhub content required. label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new content 💡✍️ New Devhub content required.
Projects
None yet
Development

No branches or pull requests

1 participant