Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP NEEDED] [Linux] Cuda drivers can't be built on Linux. #139

Closed
Craftit7 opened this issue Nov 24, 2021 · 1 comment
Closed

[HELP NEEDED] [Linux] Cuda drivers can't be built on Linux. #139

Craftit7 opened this issue Nov 24, 2021 · 1 comment

Comments

@Craftit7
Copy link

System: Kali Linux Latest Kernel/Update. (apt full upgrade and dist upgrade and update)
Files version: Latest (Installed now)
Command having the error: make-j$(nproc)
I think the error is: forgetting to '#include '.
Ran As super user (Root).
Error:-

In file included from /home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.cpp:20:
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:89:29: error: ‘size_t’ does not name a type
   89 |     static inline constexpr size_t l2(Id id)                { return family(id) == RANDOM_X ? (1U << ((id >> 8) & 0xff)) : 0U; }
      |                             ^~~~~~
In file included from /home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.cpp:20:
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:26:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
   25 | #include <vector>
  +++ |+#include <cstddef>
   26 | 
In file included from /home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.cpp:20:
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:90:29: error: ‘size_t’ does not name a type
   90 |     static inline constexpr size_t l3(Id id)                { return 1ULL << ((id >> 16) & 0xff); }
      |                             ^~~~~~
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:90:29: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:98:12: error: ‘size_t’ does not name a type
   98 |     inline size_t l2() const                                { return l2(m_id); }
      |            ^~~~~~
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:98:12: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:102:12: error: ‘size_t’ does not name a type
  102 |     inline size_t l3() const
      |            ^~~~~~
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:102:12: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
In file included from /home/craftit7/Downloads/xmrig-cuda/src/cryptonight.h:30,
                 from /home/craftit7/Downloads/xmrig-cuda/src/xmrig-cuda.cpp:26:
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:89:29: error: ‘size_t’ does not name a type
   89 |     static inline constexpr size_t l2(Id id)                { return family(id) == RANDOM_X ? (1U << ((id >> 8) & 0xff)) : 0U; }
      |                             ^~~~~~
In file included from /home/craftit7/Downloads/xmrig-cuda/src/cryptonight.h:30,
                 from /home/craftit7/Downloads/xmrig-cuda/src/xmrig-cuda.cpp:26:
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:26:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
   25 | #include <vector>
  +++ |+#include <cstddef>
   26 | 
In file included from /home/craftit7/Downloads/xmrig-cuda/src/cryptonight.h:30,
                 from /home/craftit7/Downloads/xmrig-cuda/src/xmrig-cuda.cpp:26:
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:90:29: error: ‘size_t’ does not name a type
   90 |     static inline constexpr size_t l3(Id id)                { return 1ULL << ((id >> 16) & 0xff); }
      |                             ^~~~~~
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:90:29: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:98:12: error: ‘size_t’ does not name a type
   98 |     inline size_t l2() const                                { return l2(m_id); }
      |            ^~~~~~
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:98:12: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:102:12: error: ‘size_t’ does not name a type
  102 |     inline size_t l3() const
      |            ^~~~~~
/home/craftit7/Downloads/xmrig-cuda/src/crypto/common/Algorithm.h:102:12: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
make[2]: *** [CMakeFiles/xmrig-cuda.dir/build.make:90: CMakeFiles/xmrig-cuda.dir/src/crypto/common/Algorithm.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/xmrig-cuda.dir/build.make:104: CMakeFiles/xmrig-cuda.dir/src/xmrig-cuda.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Maybe this also would help idk.

/home/craftit7/Downloads/xmrig-cuda/src/cuda_extra.cu: In function ‘void cryptonight_extra_cpu_prepare(nvid_ctx*, uint32_t, const xmrig_cuda::Algorithm&)’:
/home/craftit7/Downloads/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<Algorithm::CN_0><<<grid, block >>>(wsize, ctx->d_input, ctx->inputlen, startNonce,
      |                                                                                                                                                                          ^                            
/home/craftit7/Downloads/xmrig-cuda/src/cuda_extra.cu: In function ‘int cuda_get_deviceinfo(nvid_ctx*)’:
/home/craftit7/Downloads/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) {
      |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
@Craftit7
Copy link
Author

Adding #include <cstddef> fixes everything. Please merge with #120 so the fix is global.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant