xmrig-cuda icon indicating copy to clipboard operation
xmrig-cuda copied to clipboard

make failed "make -j$(nproc)"

Open dayanandgarg opened this issue 2 years ago • 2 comments

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_prepareAlgorithm::CN_0<<<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.

dayanandgarg avatar Oct 03 '22 05:10 dayanandgarg

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).

Spudz76 avatar Oct 03 '22 17:10 Spudz76

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

johnwstanford avatar Dec 18 '22 14:12 johnwstanford