oliverw / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
https://store.miningcore.pro
MIT License
721 stars 661 forks source link

Error build ubuntu 20.04 #993

Closed danicraft closed 2 years ago

danicraft commented 2 years ago

Hi, I have a problem installing MiningCore It reports these errors to me

`x25x.c(183,42): warning GF36A18D9: passing argument 2 of ‘blake2s’ makes integer from pointer without a cast [-Wint-conversion] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 183 blake2s_simple((uint8_t) &hash[24], (void) &hash[0], 64 * 24); ^~~~
void *
x25x.c:37:53: note: in definition of macro ‘blake2s_simple’ 37 #define blake2s_simple(out, in, inlen) blake2s(out, in, NULL, 32, inlen, 0) ^~ In file included from x25x.c:33: blake2/sse/blake2.h:179:34: note: expected ‘size_t’ {aka ‘long unsigned int’} but argument is of type ‘void *’ 179 int blake2s( void out, size_t outlen, const void in, size_t inlen, const void *key, size_t keylen ); ~^~~~ x25x.c(183,60): warning G368195C6: passing argument 5 of ‘blake2s’ makes pointer from integer without a cast [-Wint-conversion] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 183 blake2s_simple((uint8_t) &hash[24], (void) &hash[0], 64 * 24); ^~~
int

x25x.c:37:67: note: in definition of macro ‘blake2s_simple’ 37 | #define blake2s_simple(out, in, inlen) blake2s(out, in, NULL, 32, inlen, 0) | ^~~~~ In file included from x25x.c:33: blake2/sse/blake2.h:179:84: note: expected ‘const void ’ but argument is of type ‘int’ 179 | int blake2s( void out, size_t outlen, const void in, size_t inlen, const void key, size_t keylen ); `

crypto/oaes_lib.c(514,2): warning G94C2E082: ‘ftime’ is deprecated [-Wdeprecated-declarations] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 514 | ftime (&timer); | ^~~~~ In file included from crypto/oaes_lib.c:44: /usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here 39 | extern int ftime (struct timeb *__timebuf) | ^~~~~ cc -g -Wall -c -fPIC -maes -O2 -I. -Icontrib/epee/include -Wno-strict-aliasing -c -o crypto/random.o crypto/random.c cc -g -Wall -c -fPIC -maes -O2 -I. -Icontrib/epee/include -Wno-strict-aliasing -c -o crypto/skein.o crypto/skein.c cc -g -Wall -c -fPIC -maes -O2 -I. -Icontrib/epee/include -Wno-strict-aliasing -c -o crypto/tree-hash.o crypto/tree-hash.c cc -g -Wall -c -fPIC -maes -O2 -I. -Icontrib/epee/include -Wno-strict-aliasing -c -o crypto/slow-hash-lite.o crypto/slow-hash-lite.c g++ -Wall -Wno-unused-function -fPIC -fpermissive -std=c++0x -fexceptions -frtti -O2 -g -I. -Icontrib/epee/include -c -o cryptonote_basic/cryptonote_format_utils.o cryptonote_basic/cryptonote_format_utils.cpp In file included from ./serialization/crypto.h:37, from cryptonote_basic/cryptonote_basic.h:44, from cryptonote_basic/cryptonote_basic_impl.h:33, from cryptonote_basic/cryptonote_format_utils.h:33, from cryptonote_basic/cryptonote_format_utils.cpp:39: ./crypto/chacha.h: In function ‘void crypto::generate_chacha_key(const void*, size_t, crypto::chacha_key&)’: ./crypto/chacha.h(76,46): warning G046D9EBB: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’}; use copy-assignment or copy-initialization instead [-Wclass-memaccess] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 76 | memcpy(&key, pwd_hash.data(), sizeof(key)); | ^ In file included from contrib/epee/include/string_tools.h:48, from contrib/epee/include/misc_log_ex.h:32, from contrib/epee/include/include_base_utils.h:32, from cryptonote_basic/cryptonote_format_utils.cpp:31: contrib/epee/include/memwipe.h:53:10: note: ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’} declared here 53 | struct scrubbed : public T { | ^~~~~~~~ In file included from ./serialization/crypto.h:37, from cryptonote_basic/cryptonote_basic.h:44, from cryptonote_basic/cryptonote_basic_impl.h:33, from cryptonote_basic/cryptonote_format_utils.h:33, from cryptonote_basic/cryptonote_format_utils.cpp:39: ./crypto/chacha.h: In function ‘void crypto::generate_chacha_key_prehashed(const void*, size_t, crypto::chacha_key&)’: ./crypto/chacha.h(83,46): warning G046D9EBB: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’}; use copy-assignment or copy-initialization instead [-Wclass-memaccess] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 83 | memcpy(&key, pwd_hash.data(), sizeof(key)); | ^ In file included from contrib/epee/include/string_tools.h:48, from contrib/epee/include/misc_log_ex.h:32, from contrib/epee/include/include_base_utils.h:32, from cryptonote_basic/cryptonote_format_utils.cpp:31: contrib/epee/include/memwipe.h:53:10: note: ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’} declared here 53 | struct scrubbed : public T { | ^~~~~~~~ g++ -Wall -Wno-unused-function -fPIC -fpermissive -std=c++0x -fexceptions -frtti -O2 -g -I. -Icontrib/epee/include -c -o exports.o exports.cpp In file included from ./serialization/crypto.h:37, from cryptonote_basic/cryptonote_basic.h:44, from exports.cpp:21: ./crypto/chacha.h: In function ‘void crypto::generate_chacha_key(const void*, size_t, crypto::chacha_key&)’: ./crypto/chacha.h(76,46): warning G046D9EBB: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’}; use copy-assignment or copy-initialization instead [-Wclass-memaccess] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 76 | memcpy(&key, pwd_hash.data(), sizeof(key)); | ^ In file included from ./crypto/chacha.h:42, from ./serialization/crypto.h:37, from cryptonote_basic/cryptonote_basic.h:44, from exports.cpp:21: contrib/epee/include/memwipe.h:53:10: note: ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’} declared here 53 | struct scrubbed : public T { | ^~~~~~~~ In file included from ./serialization/crypto.h:37, from cryptonote_basic/cryptonote_basic.h:44, from exports.cpp:21: ./crypto/chacha.h: In function ‘void crypto::generate_chacha_key_prehashed(const void*, size_t, crypto::chacha_key&)’: ./crypto/chacha.h(83,46): warning G046D9EBB: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’}; use copy-assignment or copy-initialization instead [-Wclass-memaccess] [/home/miningcore/miningcore/src/Miningcore/Miningcore.csproj] 83 | memcpy(&key, pwd_hash.data(), sizeof(key)); | ^ In file included from ./crypto/chacha.h:42, from ./serialization/crypto.h:37, from cryptonote_basic/cryptonote_basic.h:44, from exports.cpp:21: contrib/epee/include/memwipe.h:53:10: note: ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’} declared here 53 | struct scrubbed : public T { | ^~~~~~~~ g++ -Wall -Wno-unused-function -fPIC -fpermissive -std=c++0x -fexceptions -frtti -O2 -g -I. -Icontrib/epee/include -shared -o libcryptonote.so contrib/epee/src/hex.o common/base58.o crypto/aesb.o crypto/blake256.o crypto/chacha.o contrib/epee/src/memwipe.o crypto/crypto-ops-data.o crypto/crypto-ops.o crypto/crypto.o crypto/groestl.o crypto/hash-extra-blake.o crypto/hash-extra-groestl.o crypto/hash-extra-jh.o crypto/hash-extra-skein.o crypto/hash.o crypto/jh.o crypto/keccak.o crypto/oaes_lib.o crypto/random.o crypto/skein.o crypto/tree-hash.o crypto/slow-hash-lite.o cryptonote_basic/cryptonote_format_utils.o exports.o -lboost_system -lboost_date_time Cloning into 'RandomX'... Note: switching to 'tags/v1.1.9'.

oliverw commented 2 years ago

Hmm. I don't see a compiler error. Just a warning.

riabikov commented 2 years ago

@danicraft Did you end up compiling src/build/Miningcore.dll or not? What you described are warnings, the compiler swears at possibly old methods used inside the libraries, but this does not affect the work of the compiled project. I also get such warnings, about 8 pieces, but the pool starts up and works. If everything is in order with you, then the issue can be closed. Waiting for an answer.

oliverw commented 2 years ago

Closing due to inactivity.