xmrig / xmrig-nvidia

Monero (XMR) NVIDIA miner
GNU General Public License v3.0
706 stars 261 forks source link

make error on macOS #6

Closed calvintam236 closed 3 years ago

calvintam236 commented 7 years ago

OS: macOS 10.12.6 XCode CLT: 8.2

I got a build fatal error when running the make on macOS. Any idea how to build it on macOS?

Full compile log using your ubuntu build instruction:

$ cmake .. -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-5
-- Check for working C compiler: /usr/local/bin/gcc-5 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-5
-- Check for working CXX compiler: /usr/local/bin/g++-5 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "7.5") 
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Miner/xmrig-nvidia/build

$ make
Scanning dependencies of target jansson
[  2%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/dump.c.o
[  4%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/error.c.o
[  6%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable.c.o
[  8%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable_seed.c.o
[ 10%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/load.c.o
[ 12%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/memory.c.o
[ 14%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/pack_unpack.c.o
[ 16%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strbuffer.c.o
[ 18%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strconv.c.o
[ 20%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/utf.c.o
[ 22%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/value.c.o
[ 24%] Linking C static library libjansson.a
[ 24%] Built target jansson
[ 26%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
nvcc fatal   : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X.
CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:222 (message):
  Error generating
  /Miner/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2

Tried to run cmake without any parameter:

$ cmake ..
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "7.5") 
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Miner/xmrig-nvidia/build

$ make
Scanning dependencies of target jansson
[  2%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/dump.c.o
[  4%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/error.c.o
[  6%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable.c.o
[  8%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable_seed.c.o
[ 10%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/load.c.o
[ 12%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/memory.c.o
[ 14%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/pack_unpack.c.o
[ 16%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strbuffer.c.o
[ 18%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strconv.c.o
[ 20%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/utf.c.o
[ 22%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/value.c.o
[ 24%] Linking C static library libjansson.a
[ 24%] Built target jansson
[ 26%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
/usr/local/cuda/include/host_defines.h(230): error: expected a ";"

/usr/local/cuda/include/host_defines.h(231): error: expected a ";"

/usr/local/cuda/include/host_defines.h(232): error: expected a ";"

/usr/local/cuda/include/host_defines.h(233): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef(97): error: identifier "nullptr" is undefined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef(97): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(234): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(234): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(244): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(244): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(255): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(259): error: member "std::__1::integral_constant<_Tp, __v>::constexpr" is not a type name

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(259): error: return type may not be specified on a conversion function

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(259): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(267): error: "constexpr" is not a function or static data member

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(295): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(295): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(303): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(303): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(311): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(311): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(325): error: identifier "nullptr_t" is undefined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(344): error: identifier "char16_t" is undefined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(345): error: identifier "char32_t" is undefined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(345): error: class "std::__1::__libcpp_is_integral<<error-type>>" has already been defined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(552): error: identifier "nullptr_t" is undefined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(581): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(581): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(598): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(598): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(607): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(607): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(619): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(619): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(632): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(632): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(644): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(644): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(653): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(695): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(695): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(704): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(704): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(769): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(769): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(782): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(782): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(807): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(807): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1160): error: expected a type specifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1160): error: expected a type specifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1170): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1170): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1183): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1183): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1184): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1184): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1185): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1185): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1186): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1186): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1187): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1187): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1188): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1188): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1189): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1189): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1190): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1190): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1191): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1191): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1192): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1192): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1193): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1193): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1194): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1194): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1195): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1195): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1196): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1196): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1199): error: expected an identifier

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1199): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1235): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1235): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1255): error: function template "std::__1::declval" is not a type name

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1255): error: function returning function is not allowed

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1255): error: "__test" has already been declared in the current scope

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1255): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1256): error: identifier "type" is undefined

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1285): error: expected a ")"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1285): error: function returning function is not allowed

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1285): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1296): error: expected a ")"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1296): error: function returning function is not allowed

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1296): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1448): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1448): error: expected a ";"

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1481): error: expected a declaration

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits(1481): error: expected a ";"

Error limit reached.
100 errors detected in the compilation of "/var/folders/yl/418vjq2d36g7fy3pj7kb2ns80000gn/T//tmpxft_00006a3f_00000000-13_cuda_extra.compute_60.cpp1.ii".
Compilation terminated.
CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:282 (message):
  Error generating file
  /Miner/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2
xmrig commented 7 years ago

How to install Clang 8.0.0? I have latest XCode installed with Clang 8.1.0 it unsupported by CUDA. Also I fixed cause for errors you get. https://github.com/xmrig/xmrig-nvidia/commit/c34e587dd606f589f98935ab89fcd5144d2a3cd3

calvintam236 commented 7 years ago

According to here, you need to install Xcode 8.2 (not latest).

You can download them at https://developer.apple.com/download/more/. You may need to uninstall the latest version of command line tools installed by sudo rm -rf /Library/Developer/CommandLineTools.

calvintam236 commented 7 years ago

Tried again with no option of running cmake:

$ cmake ..
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "7.5") 
-- Could NOT find NVML (missing: NVML_INCLUDE_DIR) 
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Miner/xmrig-nvidia/build

$ make
Scanning dependencies of target jansson
[  2%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/dump.c.o
[  4%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/error.c.o
[  6%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable.c.o
[  8%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable_seed.c.o
[ 10%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/load.c.o
[ 12%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/memory.c.o
[ 14%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/pack_unpack.c.o
[ 16%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strbuffer.c.o
[ 18%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strconv.c.o
[ 20%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/utf.c.o
[ 22%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/value.c.o
[ 24%] Linking C static library libjansson.a
[ 24%] Built target jansson
[ 26%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
[ 28%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
/Miner/xmrig-nvidia/src/nvidia/cuda_aes.hpp:281:49: warning: unused function 'cn_aes_single_round' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_single_round(uint32_t *__restrict__ sharedMemory, const uint32_t *__restrict__ in, uint32_t *__restrict__ out, const uint32_t *__restrict__ expandedKey)
                                                ^
/Miner/xmrig-nvidia/src/nvidia/cuda_aes.hpp:286:49: warning: unused function 'cn_aes_pseudo_round_mut' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_pseudo_round_mut(const uint32_t *__restrict__ sharedMemory, uint32_t *__restrict__ val, const uint32_t *__restrict__ expandedKey)
                                                ^
/Miner/xmrig-nvidia/src/nvidia/cuda_aes.hpp:301:49: warning: unused function 'cn_aes_gpu_init' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_gpu_init(uint32_t *sharedMemory)
                                                ^
3 warnings generated.
Scanning dependencies of target xmrig-cuda
[ 30%] Linking CXX static library libxmrig-cuda.a
[ 30%] Built target xmrig-cuda
Scanning dependencies of target xmrig-nvidia
[ 32%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/App.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 34%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Console.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 36%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Cpu_stub.cpp.o
clang: warning: argument unused during compilation: '-s'
/Miner/xmrig-nvidia/src/Cpu_stub.cpp:90:33: error: use of undeclared identifier
      'bit_AES'
    return (cpu_info[ECX_Reg] & bit_AES) != 0;
                                ^
/Miner/xmrig-nvidia/src/Cpu_stub.cpp:98:33: error: use of undeclared identifier
      'bit_BMI2'
    return (cpu_info[EBX_Reg] & bit_BMI2) != 0;
                                ^
2 errors generated.
make[2]: *** [CMakeFiles/xmrig-nvidia.dir/src/Cpu_stub.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmrig-nvidia.dir/all] Error 2
make: *** [all] Error 2
xmrig commented 7 years ago

Fixed. This bug also present is CPU version, but no one try build it without libcpuid support.

calvintam236 commented 7 years ago

Another fatal error on make.

$ make
Scanning dependencies of target jansson
[  2%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/dump.c.o
[  4%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/error.c.o
[  6%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable.c.o
[  8%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable_seed.c.o
[ 10%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/load.c.o
[ 12%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/memory.c.o
[ 14%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/pack_unpack.c.o
[ 16%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strbuffer.c.o
[ 18%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strconv.c.o
[ 20%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/utf.c.o
[ 22%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/value.c.o
[ 24%] Linking C static library libjansson.a
[ 24%] Built target jansson
[ 26%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
[ 28%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
/Miner/xmrig-nvidia/src/nvidia/cuda_aes.hpp:281:49: warning: unused function 'cn_aes_single_round' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_single_round(uint32_t *__restrict__ sharedMemory, const uint32_t *__restrict__ in, uint32_t *__restrict__ out, const uint32_t *__restrict__ expandedKey)
                                                ^
/Miner/xmrig-nvidia/src/nvidia/cuda_aes.hpp:286:49: warning: unused function 'cn_aes_pseudo_round_mut' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_pseudo_round_mut(const uint32_t *__restrict__ sharedMemory, uint32_t *__restrict__ val, const uint32_t *__restrict__ expandedKey)
                                                ^
/Miner/xmrig-nvidia/src/nvidia/cuda_aes.hpp:301:49: warning: unused function 'cn_aes_gpu_init' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_gpu_init(uint32_t *sharedMemory)
                                                ^
3 warnings generated.
Scanning dependencies of target xmrig-cuda
[ 30%] Linking CXX static library libxmrig-cuda.a
[ 30%] Built target xmrig-cuda
Scanning dependencies of target xmrig-nvidia
[ 32%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/App.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 34%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Console.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 36%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Cpu_stub.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 38%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/ConsoleLog.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 40%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/FileLog.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 42%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/Log.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 44%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Client.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 46%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Job.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 48%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Network.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 50%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/strategies/DonateStrategy.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 52%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/strategies/FailoverStrategy.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 54%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/strategies/SinglePoolStrategy.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 56%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Url.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 58%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Options.cpp.o
clang: warning: argument unused during compilation: '-s'
/Miner/xmrig-nvidia/src/Options.cpp:152:28: warning: unused variable
      'thread_options' [-Wunused-const-variable]
static struct option const thread_options[] = {
                           ^
1 warning generated.
[ 60%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Platform.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 62%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Summary.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 64%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/CudaWorker.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 66%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/GpuThread.cpp.o
clang: warning: argument unused during compilation: '-s'
In file included from /Miner/xmrig-nvidia/src/workers/GpuThread.cpp:27:
/Miner/xmrig-nvidia/src/workers/GpuThread.h:63:10: warning: private field
      'm_affinity' is not used [-Wunused-private-field]
    bool m_affinity;
         ^
1 warning generated.
[ 68%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/Handle.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 70%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/Hashrate.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 72%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/Workers.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 74%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/xmrig.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 76%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/App_unix.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 78%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Cpu_mac.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 80%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Platform_mac.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 82%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/nvidia/NvmlApi_stub.cpp.o
clang: warning: argument unused during compilation: '-s'
/Miner/xmrig-nvidia/src/nvidia/NvmlApi_stub.cpp:25:10: fatal error: 
      'workers/NvmlApi.h' file not found
#include "workers/NvmlApi.h"
         ^
1 error generated.
make[2]: *** [CMakeFiles/xmrig-nvidia.dir/src/nvidia/NvmlApi_stub.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmrig-nvidia.dir/all] Error 2
make: *** [all] Error 2
xmrig commented 7 years ago

Fixed it too :) It error was mean NVML not found (and stub broken), so GPU monitoring will not work, it not critical but need investigate.

xmrig commented 7 years ago

OS X doesn't have nvidia-smi tool? Looks like NVML unsupported for OX X https://docs.nvidia.com/deploy/nvml-api/nvml-api-reference.html

calvintam236 commented 7 years ago

I don't think nvidia-smi is available on macOS. Can we make without it?

xmrig commented 7 years ago

Yep, I already fixed NvmlApi_stub.cpp it can work without it, just GPU monitoring (clocks, power, temperature, fan speed) will not work.

MaJoHo commented 7 years ago

can you please post a complete Build instruction for MacOS

thanks

calvintam236 commented 7 years ago

make successful.

* VERSIONS:     XMRig/2.3.1 libuv/1.14.1-dev CUDA/8.0 clang/8.0.0
calvintam236 commented 7 years ago

@MaJoHo

  1. You will need to install:

  2. git clone https://github.com/xmrig/xmrig-nvidia.git

  3. cd xmrig-nvidia

  4. mkdir build

  5. cd build

  6. cmake ..

  7. make

These are the basic. There might be some other packages needed. If I have time, I will post step-by-step instructions in detail.

MaJoHo commented 7 years ago

it worked thank you

calvintam236 commented 7 years ago

@xmrig I accidentally updated the macOS to 10.13 (High Sierra). With CUDA 9.0, is there a way to compile it with Xcode 9 command line tools?

$ cmake ..
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "7.5") 
-- Could NOT find NVML (missing: NVML_INCLUDE_DIR) 
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Miner/xmrig-nvidia/build

$ make
Scanning dependencies of target jansson
[  2%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/dump.c.o
[  4%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/error.c.o
[  6%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable.c.o
[  8%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/hashtable_seed.c.o
[ 10%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/load.c.o
[ 12%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/memory.c.o
[ 14%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/pack_unpack.c.o
[ 16%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strbuffer.c.o
[ 18%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/strconv.c.o
[ 20%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/utf.c.o
[ 22%] Building C object src/3rdparty/jansson/CMakeFiles/jansson.dir/value.c.o
[ 24%] Linking C static library libjansson.a
[ 24%] Built target jansson
[ 26%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
nvcc fatal   : The version ('90000') of the host compiler ('Apple clang') is not supported
CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:222 (message):
  Error generating
  /Miner/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2
xmrig commented 7 years ago

According the docs only Clang 8.1 and Sierra is supported http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#system-requirements

xmrig commented 7 years ago

Looks like paid Apple Developer account required to download Xcode 8.3.3.

calvintam236 commented 6 years ago

@xmrig any apple id would work.

calvintam236 commented 6 years ago

@xmrig I figured out a way to run CUDA on macOS 10.13.1 using this guide and installed the older Xcode command line tools. cmake .. -DCUDA_TOOLKIT_ROOT_DIR=/Developer/NVIDIA/CUDA-9.0/ -DCUDA_ARCH="30;50;60" run successfully; however, I get compile errors.

$ cmake .. -DCUDA_TOOLKIT_ROOT_DIR=/Developer/NVIDIA/CUDA-9.0/ -DCUDA_ARCH="30;50;60"
-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found CUDA: /Developer/NVIDIA/CUDA-9.0/ (found suitable version "9.0", minimum required is "7.5") 
-- Could NOT find NVML (missing: NVML_INCLUDE_DIR) 
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Found mhd: /usr/local/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /Miner/xmrig-nvidia/build

$ make
[  2%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(332): error: identifier "constexpr" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(332): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(335): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(335): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(339): error: identifier "maxMemUsage" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(339): error: identifier "byte2mib" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(344): error: identifier "maxMemUsage" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(344): error: identifier "byte2mib" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(347): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(347): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(348): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(348): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(349): error: identifier "freeMemory" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(349): error: identifier "totalMemory" is undefined

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(353): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(353): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(354): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(354): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(358): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(358): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(359): warning: expression has no effect

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(359): error: expected a ";"

/Miner/xmrig-nvidia/src/nvidia/cuda_extra.cu(360): error: identifier "max_intensity" is undefined

16 errors detected in the compilation of "/var/folders/yl/418vjq2d36g7fy3pj7kb2ns80000gn/T//tmpxft_00004722_00000000-8_cuda_extra.compute_60.cpp1.ii".
CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:279 (message):
  Error generating file
  /Miner/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2

Any idea how to fix this?

epool commented 6 years ago

This worked for me to fix this issue:

Error messages:

Steps to fix:

  1. Log in to https://developer.apple.com/downloads/
  2. Download Xcode CLT (Command Line Tools) 7.3
  3. Install CLT
  4. Run sudo xcode-select --switch /Library/Developer/CommandLineTools
  5. Verify that clang has been downgraded via clang --version

Source: http://stackoverflow.com/a/36590330/701646

Edit: Update to 7.3 and fail at 8.0

frapposelli commented 6 years ago

this quick patch works with current master, using AppleClang 8.1.0.8020042 and CUDA V9.0.175 on macOS 10.13.2

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ef17dc..c5fbefa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,6 +138,7 @@ add_definitions(/DRAPIDJSON_SSE2)
 #add_definitions(/DAPP_DEBUG)

 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
+SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

 find_package(UV REQUIRED)

diff --git a/cmake/flags.cmake b/cmake/flags.cmake
index 0ff9afe..286ff1e 100644
--- a/cmake/flags.cmake
+++ b/cmake/flags.cmake
@@ -32,7 +32,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)

     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -Wall")

-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes -Wall -fno-exceptions -fno-rtti")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes -Wall -fno-rtti")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")

 endif()
DANgerous25 commented 6 years ago

I am having similar make issues, unfortunately I don't understand how to try frapposelli's fix as I am quite new to this. I'm using MacOS 10.3.2, I've tried using CLT 7, 8.1, 8.3.2, I get the same issues. Any idea how to fix?

Downloads/xmrig-nvidia/build  master ✔                                                                                                18d
▶ cmake ..
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "9.1", minimum required is "7.5")
-- Could NOT find NVML (missing: NVML_INCLUDE_DIR)
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Found mhd: /usr/local/include
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dan/Downloads/xmrig-nvidia/build
Downloads/xmrig-nvidia/build  master ✔                                                                                                18d
▶ make
[  2%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(332): error: identifier "constexpr" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(332): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(335): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(335): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(339): error: identifier "maxMemUsage" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(339): error: identifier "byte2mib" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(344): error: identifier "maxMemUsage" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(344): error: identifier "byte2mib" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(347): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(347): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(348): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(348): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(349): error: identifier "freeMemory" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(349): error: identifier "totalMemory" is undefined

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(353): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(353): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(354): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(354): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(358): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(358): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(359): warning: expression has no effect

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(359): error: expected a ";"

/Users/dan/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu(360): error: identifier "max_intensity" is undefined

16 errors detected in the compilation of "/var/folders/r0/1v8gt3fj7_q3bbybyg1vxsdw0000gn/T//tmpxft_00006c5e_00000000-9_cuda_extra.compute_70.cpp1.ii".
CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:279 (message):
  Error generating file
  /Users/dan/Downloads/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2
frapposelli commented 6 years ago

@DANgerous25 you have to apply my patch, put it in a file in the root of your cloned repo and run patch -p1 < patchfile, then compile.

calvintam236 commented 6 years ago

Not working with the patch. macOS 10.13.3, CUDA 9.1.128

$ make
[  2%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
[  4%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
/Miner/xmrig-nvidia/src/nvidia/cuda_core.cu:96:203: error: no member named 'cudaLaunchKernel' in the global namespace
__wrapper__device_stub_cryptonight_core_gpu_phase1(int &threads, int &bfactor, int &partidx, uint32_t *__restrict__ &long_state, uint32_t *__restrict__ &ctx_state, uint32_t *__restrict__ &ctx_key1) { ::cudaLaunchKernel(0, 0, 0, 0, 0, 0);}
                                                                                                                                                                                                        ~~^
/Miner/xmrig-nvidia/src/nvidia/cuda_core.cu:175:163: error: no member named 'cudaLaunchKernel' in the global namespace
__wrapper__device_stub_cryptonight_core_gpu_phase2(int &threads, int &bfactor, int &partidx, uint32_t *&d_long_state, uint32_t *&d_ctx_a, uint32_t *&d_ctx_b) { ::cudaLaunchKernel(0, 0, 0, 0, 0, 0);}
                                                                                                                                                                ~~^
/Miner/xmrig-nvidia/src/nvidia/cuda_core.cu:264:213: error: no member named 'cudaLaunchKernel' in the global namespace
__wrapper__device_stub_cryptonight_core_gpu_phase3(int &threads, int &bfactor, int &partidx, const uint32_t *__restrict__ &long_state, uint32_t *__restrict__ &d_ctx_state, uint32_t *__restrict__ &d_ctx_key2) { ::cudaLaunchKernel(0, 0, 0, 0, 0, 0);}
                                                                                                                                                                                                                  ~~^
3 errors generated.
CMake Error at xmrig-cuda_generated_cuda_core.cu.o.Release.cmake:279 (message):
  Error generating file
  /Miner/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_core.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2
DANgerous25 commented 6 years ago

@frapposelli - your solution worked for me, thanks so much!

MarQuisKnox commented 6 years ago

@frapposelli's fix worked for me:

fireheadman commented 6 years ago

Wonder if anyone is using this with an eGPU? Got the same output as @calvintam236

$ cmake ..
-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.dylib
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "9.1", minimum required is "7.5")
-- Could NOT find NVML (missing: NVML_INCLUDE_DIR)
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Found mhd: /usr/local/include
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/Desktop/miner/monero/xmrig-nvidia/build

$ make
[  2%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
[  4%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/nvidia/cuda_core.cu:96:203: error: no member named 'cudaLaunchKernel' in the global namespace
__wrapper__device_stub_cryptonight_core_gpu_phase1(int &threads, int &bfactor, int &partidx, uint32_t *__restrict__ &long_state, uint32_t *__restrict__ &ctx_state, uint32_t *__restrict__ &ctx_key1) { ::cudaLaunchKernel(0, 0, 0, 0, 0, 0);}
                                                                                                                                                                                                        ~~^
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/nvidia/cuda_core.cu:175:163: error: no member named 'cudaLaunchKernel' in the global namespace
__wrapper__device_stub_cryptonight_core_gpu_phase2(int &threads, int &bfactor, int &partidx, uint32_t *&d_long_state, uint32_t *&d_ctx_a, uint32_t *&d_ctx_b) { ::cudaLaunchKernel(0, 0, 0, 0, 0, 0);}
                                                                                                                                                                ~~^
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/nvidia/cuda_core.cu:264:213: error: no member named 'cudaLaunchKernel' in the global namespace
__wrapper__device_stub_cryptonight_core_gpu_phase3(int &threads, int &bfactor, int &partidx, const uint32_t *__restrict__ &long_state, uint32_t *__restrict__ &d_ctx_state, uint32_t *__restrict__ &d_ctx_key2) { ::cudaLaunchKernel(0, 0, 0, 0, 0, 0);}
                                                                                                                                                                                                                  ~~^
3 errors generated.
CMake Error at xmrig-cuda_generated_cuda_core.cu.o.Release.cmake:279 (message):
  Error generating file
  /Users/user/Desktop/miner/monero/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_core.cu.o

make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o] Error 1
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [all] Error 2
fireheadman commented 6 years ago

UPDATE: Almost Success!! Did this once more... CLT 7.3 this time w/ CUDA 8.0.61 GA2 Toolkit

performed the cmake .. then make
This failed just like @DANgerous25's attempt. Then applied the patch from @frapposelli (I did not wipe out the build dir).... Re-ran make and it started compiling this time.

Looked like it finished... but when I run xmrig-nvidia, it just sits there trying to do something.... can't even get the help menu to show with --help.

$ make
-- Could NOT find NVML (missing: NVML_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/Desktop/miner/monero/xmrig-nvidia/build
[  2%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
[  4%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
clang: warning: argument unused during compilation: '-s'
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/nvidia/cuda_aes.hpp:281:49: warning: unused function 'cn_aes_single_round' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_single_round(uint32_t *__restrict__ sharedMemory, const uint32_t *__restrict__ in, uint32_t *__restrict__ out, const uint32_t *__restrict__ expandedKey)
                                                ^
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/nvidia/cuda_aes.hpp:286:49: warning: unused function 'cn_aes_pseudo_round_mut' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_pseudo_round_mut(const uint32_t *__restrict__ sharedMemory, uint32_t *__restrict__ val, const uint32_t *__restrict__ expandedKey)
                                                ^
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/nvidia/cuda_aes.hpp:301:49: warning: unused function 'cn_aes_gpu_init' [-Wunused-function]
__attribute((always_inline)) static inline void cn_aes_gpu_init(uint32_t *sharedMemory)
                                                ^
3 warnings generated.
Scanning dependencies of target xmrig-cuda
[  6%] Linking CXX static library libxmrig-cuda.a
[  6%] Built target xmrig-cuda
Scanning dependencies of target xmrig-nvidia
[  9%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/api/Api.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 11%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/api/ApiState.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 13%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/api/NetworkState.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 15%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/App.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 18%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Console.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 20%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Cpu_stub.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 22%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/ConsoleLog.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 25%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/FileLog.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 27%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/Log.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 29%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Client.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 31%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Job.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 34%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Network.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 36%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/strategies/DonateStrategy.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 38%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/strategies/FailoverStrategy.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 40%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/strategies/SinglePoolStrategy.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 43%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/SubmitResult.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 45%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/net/Url.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 47%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/nvidia/CudaCLI.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 50%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Options.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 52%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Platform.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 54%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Summary.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 56%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/CudaWorker.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 59%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/GpuThread.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 61%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/Handle.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 63%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/Hashrate.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 65%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/workers/Workers.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 68%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/xmrig.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 70%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/App_unix.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 72%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Cpu_mac.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 75%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/Platform_mac.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 77%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/nvidia/NvmlApi_stub.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 79%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_keccak.c.o
[ 81%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_groestl.c.o
[ 84%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_blake256.c.o
[ 86%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_jh.c.o
[ 88%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_skein.c.o
[ 90%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/soft_aes.c.o
[ 93%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/crypto/CryptoNight.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 95%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/log/SysLog.cpp.o
clang: warning: argument unused during compilation: '-s'
[ 97%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/api/Httpd.cpp.o
clang: warning: argument unused during compilation: '-s'
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/api/Httpd.cpp:34:19: warning: variable 'k500' is not needed and will not be emitted [-Wunneeded-internal-declaration]
static const char k500 []    = "{\"error\":\"INTERNAL_SERVER_ERROR\"}";
                  ^
/Users/user/Desktop/miner/monero/xmrig-nvidia/src/api/Httpd.cpp:35:21: warning: unused variable 'k500Size' [-Wunused-const-variable]
static const size_t k500Size = sizeof(k500) - 1;
                    ^
2 warnings generated.
[100%] Linking CXX executable xmrig-nvidia
ld: warning: option -s is obsolete and being ignored
[100%] Built target xmrig-nvidia
calvintam236 commented 6 years ago

hi @xmrig, can you take a look the errors with macOS 10.13.3 + CUDA 9.1 + CLT for Xcode 9.2 (supported per http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html)?

Unnameless commented 6 years ago

@xmrig @calvintam236

Why do we have so many headaches with xmrig-nvidia compilation, especially now, since nvidia supports Xcode 9.2 and Apple LLVM 9 on macOS 10.13.4 ?

calvintam236 commented 6 years ago

@Unnameless you have to ask @xmrig .

emailyc commented 6 years ago

Why don't I see a Mac build guide here

calvintam236 commented 6 years ago

@emailyc That's something you should ask @xmrig ?

cl4r0s commented 5 years ago

$ system_profiler SPSoftwareDataType Software: System Software Overview: System Version: macOS 10.13.6 (17G5019) Kernel Version: Darwin 17.7.0

Errors:

cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCUDA_NVRTC_LIB=/Developer/NVIDIA/CUDA-10.0/include/nvrtc.h -DNVML_INCLUDE_DIR=/Developer/NVIDIA/CUDA-10.0/include/ -- Found NVML: /Developer/NVIDIA/CUDA-10.0/include
-- Configuring done -- Generating done -- Build files have been written to: /Users/claros/build/xmrig-nvidia/build iMac:build cl4r0s$ make [ 1%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o nvcc fatal : The version ('10.0') of the host compiler ('Apple clang') is not supported CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:219 (message): Error generating /Users/cl4r0s/build/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.

As 10.13.6 is old and represent the last cuda enabled macos version, I think you should support it. No more cuda with mojave, just metal with apple drivers only...