mimblewimble / cuckoo-miner

Mining wrapper around the Cuckoo Cycle proof of work system for the Grin/MimbleWimble blockchain.
Apache License 2.0
52 stars 16 forks source link

When mining plugins do not build, this does not generate a build error #20

Open thorsteneb opened 5 years ago

thorsteneb commented 5 years ago

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.

danielalexiuc commented 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.

thorsteneb commented 5 years ago

There are plenty of workarounds for the $PATH in WSL. My expectation is three-fold: