nsgminer icon indicating copy to clipboard operation
nsgminer copied to clipboard

Mac compilation with nvml enabled fails

Open jason-tilley opened this issue 7 years ago • 3 comments

I'm trying to get nsgminer to compile on my Mac, but it only works with the --disable-nvml flag set. Without it I get

CC       error.lo
nvml.c:207:5: error: use of undeclared identifier 'opt_nonvml'
nvml.c:207:18: error: use of undeclared identifier 'true'
2 errors generated.

I have CUDA Toolkit 9.1 installed. Does anyone know what the problem is?

jason-tilley avatar Feb 10 '18 05:02 jason-tilley

NVML doesn't depend on CUDA. It needs libnvidia-ml.so supplied with the NVIDIA proprietary drivers.

Although in this case change type of opt_nonvml from bool to int and replace true with 1, false with 0.

ghostlander avatar Feb 10 '18 14:02 ghostlander

Thanks for the help. I haven't worked with C since college (a pretty long time ago). Should I declare opt_nonvml a static int? Declaring as an extern int gives me:

:info:build nvml.c:207:5: error: use of undeclared identifier 'opt_nonvml'
:info:build     opt_nonvml = 1;

jason-tilley avatar Feb 10 '18 18:02 jason-tilley

And to be clear, this configure option affects GPU monitoring but not mining performance, correct?

jason-tilley avatar Feb 10 '18 21:02 jason-tilley