cuckoo-miner icon indicating copy to clipboard operation
cuckoo-miner copied to clipboard

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

Open thorsteneb opened this issue 7 years ago • 2 comments

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.

thorsteneb avatar Aug 08 '18 07:08 thorsteneb

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.

danielalexiuc avatar Sep 10 '18 03:09 danielalexiuc

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

  • grin-miner should show an error message in tui when a configured plugin is missing, so the user can act on that information
  • build should show an error message when plugins fail to build, instead of merrily continuing on
  • detection of "we're on Windows" should be done by something like #if defined __WIN32__, not "can we see an .exe in the $PATH"

thorsteneb avatar Sep 13 '18 08:09 thorsteneb