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

Fails to build (Arch Linux) (Fix in post) #137

Open
Markon101 opened this issue Nov 20, 2021 · 2 comments
Open

Fails to build (Arch Linux) (Fix in post) #137

Markon101 opened this issue Nov 20, 2021 · 2 comments

Comments

@Markon101
Copy link

Markon101 commented Nov 20, 2021

It fails to build with the following errors. Anyone have any idea what is wrong?

In file included from /home/anon/git/xmrig-cuda/src/crypto/common/Algorithm.cpp:20:
/home/anon/git/xmrig-cuda/src/crypto/common/Algorithm.h:89:29: error: ‘size_t’ does not name a type
   89 | ic inline constexpr size_t l2(Id id)                { return family(id) == RANDOM_X ? (1U << ((id >> 8) & 0xff)) : 0U; }
      |                     ^~~~~~

In file included from /home/anon/git/xmrig-cuda/src/crypto/common/Algorithm.cpp:20:
/home/anon/git/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/anon/git/xmrig-cuda/src/crypto/common/Algorithm.cpp:20:
/home/anon/git/xmrig-cuda/src/crypto/common/Algorithm.h:90:29: error: ‘size_t’ does not name a type
   90 | ic inline constexpr size_t l3(Id id)                { return 1ULL << ((id >> 16) & 0xff); }
      |                     ^~~~~~

/home/anon/git/xmrig-cuda/src/crypto/common/Algorithm.h:90:29: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/home/anon/git/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/anon/git/xmrig-cuda/src/crypto/common/Algorithm.h:98:12: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
/home/anon/git/xmrig-cuda/src/crypto/common/Algorithm.h:102:12: error: ‘size_t’ does not name a type
  102 |     inline size_t l3() const
      |            ^~~~~~
/home/anon/git/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[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/xmrig-cuda.dir/all] Error 2

I am building with gcc 11.1.0-1
Edit: This happens with GCC 10 too.
Might this be related to #106?

Edit2: This also doesn't fix it make CC=gcc-9.4.0-1 CPP=g++-9.4.0-1 CXX=g++-9.4.0-1 LD=g++-9.4.0-1

Edit3: Adding #include <cstddef> to the Algorithms.h file worked! That is the fix for this!

@Markon101 Markon101 reopened this Nov 21, 2021
@Markon101
Copy link
Author

I reopened this issue because it is still an active issue that needs patching.

@Markon101 Markon101 changed the title Fails to build (Arch Linux) Fails to build (Arch Linux) (Fix in post) Nov 21, 2021
@Spudz76
Copy link
Contributor

Spudz76 commented Nov 22, 2021

#120 has been ready for merge for a long time

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

2 participants