xmrig / xmrig-cuda

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

error compiling 6.15.0 #119

Closed tymoteuszrogalewski closed 3 years ago

tymoteuszrogalewski commented 3 years ago

Since this version I have compile issue. How to fix this problem?

cd cmake && export PATH=/usr/local/cuda-10.0/bin:$PATH; cmake .. -DWITH_DRIVER_API=ON -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so && make -j12

-- The C compiler identification is GNU 7.5.0
(...)
[ 52%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o
[ 58%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/wownero/xmrig-cu_generated_randomx_wownero.cu.o
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(33): error: forward declaration of enum type is nonstandard
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(33): error: identifier "uint32_t" is undefined
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(33): error: incomplete type is not allowed
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(33): error: expected a ";"
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(66): warning: parsing restarts here after previous syntax error
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(68): error: forward declaration of enum type is nonstandard
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(68): error: expected an identifier
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(68): error: incomplete type is not allowed
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(69): error: identifier "UNKNOWN" is undefined
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(70): error: identifier "CN_ANY" is undefined
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(71): error: identifier "CN" is undefined
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(72): error: identifier "CN_LITE" is undefined
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(73): error: identifier "CN_HEAVY" is undefined
/home/miner/tym/xmrig-cuda/xmrig-cuda-6.15.0/src/crypto/common/Algorithm.h(74): error: identifier "CN_PICO" is undefined
RainbowMiner commented 3 years ago

I can second that. Same problem, mostly same errors:

-- Build files have been written to: /root/xmrig-cuda/build
[  5%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o
[ 11%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o
[ 17%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o
/root/xmrig-cuda/src/cuda_extra.cu: In function ‘int cuda_get_deviceinfo(nvid_ctx*)’:
/root/xmrig-cuda/src/cuda_extra.cu:571:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (ctx->device_blocks > max_blocks) {
         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-class-memaccess’
[ 23%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o
/root/xmrig-cuda/src/crypto/common/Algorithm.h(33): error: forward declaration of enum type is nonstandard
/root/xmrig-cuda/src/crypto/common/Algorithm.h(33): error: identifier "uint32_t" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(33): error: incomplete type is not allowed
/root/xmrig-cuda/src/crypto/common/Algorithm.h(33): error: expected a ";"
/root/xmrig-cuda/src/crypto/common/Algorithm.h(66): warning: parsing restarts here after previous syntax error
/root/xmrig-cuda/src/crypto/common/Algorithm.h(68): error: forward declaration of enum type is nonstandard
/root/xmrig-cuda/src/crypto/common/Algorithm.h(68): error: expected an identifier
/root/xmrig-cuda/src/crypto/common/Algorithm.h(68): error: incomplete type is not allowed
/root/xmrig-cuda/src/crypto/common/Algorithm.h(69): error: identifier "UNKNOWN" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(70): error: identifier "CN_ANY" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(71): error: identifier "CN" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(72): error: identifier "CN_LITE" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(73): error: identifier "CN_HEAVY" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(74): error: identifier "CN_PICO" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(75): error: identifier "CN_FEMTO" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(76): error: identifier "RANDOM_X" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(77): error: identifier "ARGON2" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(78): error: identifier "ASTROBWT" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(79): error: identifier "KAWPOW" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(82): error: expected an identifier
/root/xmrig-cuda/src/crypto/common/Algorithm.h(82): error: inline specifier allowed on function declarations only
/root/xmrig-cuda/src/crypto/common/Algorithm.h(82): error: expected an expression
/root/xmrig-cuda/src/crypto/common/Algorithm.h(83): error: expected a ")"
/root/xmrig-cuda/src/crypto/common/Algorithm.h(83): error: inline specifier allowed on function declarations only
/root/xmrig-cuda/src/crypto/common/Algorithm.h(83): error: expected a ";"
/root/xmrig-cuda/src/crypto/common/Algorithm.h(99): warning: parsing restarts here after previous syntax error
/root/xmrig-cuda/src/crypto/common/Algorithm.h(101): error: a type qualifier is not allowed on a nonmember function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(104): error: identifier "m_id" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(104): error: identifier "ASTROBWT_DERO" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(104): error: too many arguments in function call
/root/xmrig-cuda/src/crypto/common/Algorithm.h(110): error: class "xmrig_cuda::Algorithm" has no member "Id"
/root/xmrig-cuda/src/crypto/common/Algorithm.h(110): error: a type qualifier is not allowed on a nonmember function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(110): error: too few parameters for this operator function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(110): error: nonmember operator requires a parameter with class or enum type
/root/xmrig-cuda/src/crypto/common/Algorithm.h(110): error: identifier "m_id" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(111): error: a type qualifier is not allowed on a nonmember function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(111): error: too few parameters for this operator function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(111): error: identifier "isEqual" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(112): error: class "xmrig_cuda::Algorithm" has no member "Id"
/root/xmrig-cuda/src/crypto/common/Algorithm.h(112): error: a type qualifier is not allowed on a nonmember function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(112): error: too few parameters for this operator function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(112): error: nonmember operator requires a parameter with class or enum type
/root/xmrig-cuda/src/crypto/common/Algorithm.h(112): error: identifier "m_id" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(113): error: a type qualifier is not allowed on a nonmember function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(113): error: too few parameters for this operator function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(113): error: identifier "isEqual" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(114): error: expected an operator
/root/xmrig-cuda/src/crypto/common/Algorithm.h(114): error: a type qualifier is not allowed on a nonmember function
/root/xmrig-cuda/src/crypto/common/Algorithm.h(114): error: explicit type is missing ("int" assumed)
/root/xmrig-cuda/src/crypto/common/Algorithm.h(114): error: identifier "m_id" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(116): error: variable "xmrig_cuda::Id" is not a type name
/root/xmrig-cuda/src/crypto/common/Algorithm.h(116): error: identifier "uint32_t" is undefined
/root/xmrig-cuda/src/crypto/common/Algorithm.h(118): error: expected a declaration
/root/xmrig-cuda/src/crypto/common/Algorithm.h(123): error: expected a declaration
/usr/include/c++/7/cstdint(66): error: the global scope has no "uint8_t"
/root/xmrig-cuda/src/cryptonight.h(48): error: class "xmrig_cuda::Algorithm" has no member "INVALID"
/root/xmrig-cuda/src/cryptonight.h(151): error: identifier "uint8_t" is undefined
/root/xmrig-cuda/src/RandomX/blake2b_cuda.hpp(22): error: identifier "uint8_t" is undefined
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(72): error: identifier "uint8_t" is undefined
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1829): error: identifier "uint8_t" is undefined
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(427): error: identifier "uint8_t" is undefined
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(434): error: no instance of function template "RandomX_Arqma::set_buffer" matches the argument list
            argument types are: (<error-type>, int)
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2083): error: identifier "uint8_t" is undefined
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2083): error: expected an expression
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2083): error: expected a ")"
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2084): error: expected an expression
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2084): error: expected a ")"
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2085): error: expected an expression
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2085): error: expected a ")"
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2086): error: expected an expression
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2086): error: expected a ")"
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2089): error: "uint8_t" is not a type name
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2089): error: "uint8_t" is not a type name
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2102): error: identifier "scratchpad" is undefined
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2102): error: expected an expression
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(2102): error: expected a ")"
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1653): error: identifier "uint8_t" is undefined
          detected during instantiation of "void RandomX_Arqma::execute_vm<WORKERS_PER_HASH,HIGH_PRECISION>(void *, void *, void *, const void *, uint32_t, uint32_t, __nv_bool, __nv_bool) [with WORKERS_PER_HASH=8, HIGH_PRECISION=false]"
/root/xmrig-cuda/src/RandomX/hash.hpp(46): here
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1653): error: identifier "uint8_t" is undefined
          detected during instantiation of "void RandomX_Arqma::execute_vm<WORKERS_PER_HASH,HIGH_PRECISION>(void *, void *, void *, const void *, uint32_t, uint32_t, __nv_bool, __nv_bool) [with WORKERS_PER_HASH=8, HIGH_PRECISION=false]"
/root/xmrig-cuda/src/RandomX/hash.hpp(46): here
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1654): error: identifier "uint8_t" is undefined
          detected during instantiation of "void RandomX_Arqma::execute_vm<WORKERS_PER_HASH,HIGH_PRECISION>(void *, void *, void *, const void *, uint32_t, uint32_t, __nv_bool, __nv_bool) [with WORKERS_PER_HASH=8, HIGH_PRECISION=false]"
/root/xmrig-cuda/src/RandomX/hash.hpp(46): here
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1654): error: identifier "dst" is undefined
          detected during instantiation of "void RandomX_Arqma::execute_vm<WORKERS_PER_HASH,HIGH_PRECISION>(void *, void *, void *, const void *, uint32_t, uint32_t, __nv_bool, __nv_bool) [with WORKERS_PER_HASH=8, HIGH_PRECISION=false]"
/root/xmrig-cuda/src/RandomX/hash.hpp(46): here
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1654): error: expected an expression
          detected during instantiation of "void RandomX_Arqma::execute_vm<WORKERS_PER_HASH,HIGH_PRECISION>(void *, void *, void *, const void *, uint32_t, uint32_t, __nv_bool, __nv_bool) [with WORKERS_PER_HASH=8, HIGH_PRECISION=false]"
/root/xmrig-cuda/src/RandomX/hash.hpp(46): here
/root/xmrig-cuda/src/RandomX/randomx_cuda.hpp(1654): error: expected a ")"
          detected during instantiation of "void RandomX_Arqma::execute_vm<WORKERS_PER_HASH,HIGH_PRECISION>(void *, void *, void *, const void *, uint32_t, uint32_t, __nv_bool, __nv_bool) [with WORKERS_PER_HASH=8, HIGH_PRECISION=false]"
/root/xmrig-cuda/src/RandomX/hash.hpp(46): here

80 errors detected in the compilation of "/tmp/tmpxft_00005d1c_00000000-9_randomx_arqma.compute_70.cpp1.ii".
CMake Error at xmrig-cu_generated_randomx_arqma.cu.o.Release.cmake:279 (message):
  Error generating file
  /root/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/./xmrig-cu_generated_randomx_arqma.cu.o

CMakeFiles/xmrig-cu.dir/build.make:77: recipe for target 'CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o' failed
make[2]: *** [CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/xmrig-cu.dir/all' failed
make[1]: *** [CMakeFiles/xmrig-cu.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
xmrig commented 3 years ago

Should be fixed in dev branch. Thank you.

tymoteuszrogalewski commented 3 years ago

Yes. Now it compile ok, but has out of memory errorrs....but I see second issue opened with this error. This can be closed :)