Open thorsteneb opened 5 years ago
To remove the Windows PATH from WSL, open regedit and set "Flags" to 0x5 for this key:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
The next time you run 'echo $PATH' in WSL, all the windows stuff will be gone. Run 'cargo build' again, and you're back in business.
There are plenty of workarounds for the $PATH in WSL. My expectation is three-fold:
#if defined __WIN32__
, not "can we see an .exe in the $PATH"
I tried building grin-miner on Ubuntu 18.04.1 on WSL. This appears to work, with a message "Compiling cuckoo_miner v0.1.0 (https://github.com/mimblewimble/cuckoo-miner?tag=grin_integration_34#c2988598)" during build and no errors. However, the target/debug/plugins directory is missing plugins, although cuckoo_miner is present in target/debug/build.
I'd expect a build-time error message when plugins fail to build.
This appears related to the Windows detection in build.rs. Although WSL is an Ubuntu environment and should be treated as Linux, the $PATH contains the Windows %PATH% as well, which means Finder will find .exe files.