xmrig / xmrig-cuda

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

make failed "make -j$(nproc)" #174

Open dayanandgarg opened 2 years ago

dayanandgarg commented 2 years ago

was trying to setup build for xmrig-cuda in ubunut, but getting error,

`/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with '...': 435 | function(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:435:145: note: '_ArgTypes' /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with '...': 530 | operator=(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:530:146: note: '_ArgTypes' CMake Error at xmrig-cu_generated_AstroBWT.cu.o.Release.cmake:280 (message): Error generating file /workspace/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/./xmrig-cu_generated_AstroBWT.cu.o

make[2]: [CMakeFiles/xmrig-cu.dir/build.make:141: CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with '...': 435 | function(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:435:145: note: '_ArgTypes' /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with '...': 530 | operator=(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:530:146: note: '_ArgTypes' CMake Error at xmrig-cu_generated_AstroBWT_v2.cu.o.Release.cmake:280 (message): Error generating file /workspace/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero_he/./xmrig-cu_generated_AstroBWT_v2.cu.o

make[2]: [CMakeFiles/xmrig-cu.dir/build.make:148: CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero_he/xmrig-cu_generated_AstroBWT_v2.cu.o] Error 1 /workspace/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning #186-D: pointless comparison of unsigned integer with zero /workspace/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning #186-D: pointless comparison of unsigned integer with zero /workspace/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning #186-D: pointless comparison of unsigned integer with zero /workspace/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning #186-D: pointless comparison of unsigned integer with zero /workspace/xmrig-cuda/src/cuda_extra.cu: In function 'void cryptonight_extra_cpu_prepare(nvid_ctx, uint32_t, const xmrig_cuda::Algorithm&)': /workspace/xmrig-cuda/src/cuda_extra.cu:415:170: warning: passing argument 5 to 'restrict'-qualified parameter aliases with argument 6 [-Wrestrict] 415 | CUDA_CHECK_KERNEL(ctx->device_id, cryptonight_extra_gpu_prepare<<<grid, block >>>(wsize, ctx->d_input, ctx->inputlen, startNonce, | ^ /workspace/xmrig-cuda/src/cuda_extra.cu: In function 'int cuda_get_deviceinfo(nvid_ctx)': /workspace/xmrig-cuda/src/cuda_extra.cu:571:26: warning: comparison of integer expressions of different signedness: 'int' and 'const size_t' {aka 'const long unsigned int'} [-Wsign-compare] 571 | if (ctx->device_blocks > max_blocks) { | ~~~^~~~~~ make[1]: [CMakeFiles/Makefile2:124: CMakeFiles/xmrig-cu.dir/all] Error 2 make: *** [Makefile:104: all] Error 2`

Help me resolve this issue.

Spudz76 commented 2 years ago

Known bug with some combinations of CUDA Toolkit vs gcc 11

Use CUDA 11.7, or anything but gcc 11 with whichever CUDA Toolkit you currently have (probably 11.6.1 since that was the buggy one).

johnwstanford commented 1 year ago

I saw the same error with CUDA 11.5 and GCC 11 and fixed it by switching to GCC 9.