ghostlander / nsgminer

NeoScrypt OpenCL GPU Miner
https://bitcointalk.org/index.php?topic=712650.0
GNU General Public License v3.0
97 stars 68 forks source link

Mac compilation with nvml enabled fails #35

Open jason-tilley opened 6 years ago

jason-tilley commented 6 years ago

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?

ghostlander commented 6 years ago

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.

jason-tilley commented 6 years ago

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 commented 6 years ago

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