xmrig / xmrig-cuda

NVIDIA CUDA plugin for XMRig miner
GNU General Public License v3.0
358 stars 155 forks source link

Fix build on MacOS 10.13 (last supported OSX for CUDA) #104

Closed Spudz76 closed 3 years ago

Spudz76 commented 3 years ago

Previously the configure step could not find CUDA or NVRTC libraries within Toolkit directory. When XMRIG_OS_APPLE is set, search the correct subdirectories. Clean up the default search path for all non-Apple.

MacOS High Sierra (10.13) compiler is customized clang 10.0.0 and needs -std= added to CFLAGS as c99/c++11 are not default, leading to compilation crashes.

Mute CMP0042 warning by setting policy to NEW; it doesn't seem like it matters, or policy NEW already works.

Spudz76 commented 3 years ago

Leads to successful build of libxmrig-cuda.dylib, which seems to load well enough to say no devices on the test platform which is a VM and has no actual GPU. Assume it would work, needs a real Mac w/GPU to test.

Spudz76 commented 3 years ago

Note highest supported CUDA Toolkit is 10.2 which is the last version with any MacOS support.