MazaCoin / maza

Ⓜ️ MAZA Network Core integration/staging tree
https://mazacoin.org/
MIT License
20 stars 17 forks source link

ERROR WHEN WE TRY TO COMPILE TO LINUX #38

Closed red0bear closed 2 years ago

red0bear commented 6 years ago

ecwrapper.cpp: In function ‘int {anonymous}::ECDSA_SIG_recover_key_GFp(EC_KEY, ECDSA_SIG, const unsigned char, int, int, int)’: ecwrapper.cpp:50:28: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ if (!BN_add(x, x, ecsig->r)) { ret=-1; goto err; } ^~ In file included from ecwrapper.h:11:0, from ecwrapper.cpp:5: /usr/include/openssl/ec.h:1039:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ typedef struct ECDSA_SIG_st ECDSA_SIG; ^~~~ ecwrapper.cpp:71:34: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) { ret=-1; goto err; } ^~ In file included from ecwrapper.h:11:0, from ecwrapper.cpp:5: /usr/include/openssl/ec.h:1039:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ typedef struct ECDSA_SIG_st ECDSA_SIG; ^~~~ ecwrapper.cpp:73:31: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) { ret=-1; goto err; } ^~ In file included from ecwrapper.h:11:0, from ecwrapper.cpp:5: /usr/include/openssl/ec.h:1039:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ typedef struct ECDSA_SIG_st ECDSA_SIG; ^~~~ ecwrapper.cpp: In member function ‘bool CECKey::Recover(const uint256&, const unsigned char, int)’: ecwrapper.cpp:155:32: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ BN_bin2bn(&p64[0], 32, sig->r); ^~ In file included from ecwrapper.h:11:0, from ecwrapper.cpp:5: /usr/include/openssl/ec.h:1039:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ typedef struct ECDSA_SIG_st ECDSA_SIG; ^~~~ ecwrapper.cpp:156:32: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ BN_bin2bn(&p64[32], 32, sig->s); ^~ In file included from ecwrapper.h:11:0, from ecwrapper.cpp:5: /usr/include/openssl/ec.h:1039:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’ typedef struct ECDSA_SIG_st ECDSA_SIG; ^~~~

guruvan commented 6 years ago

what distribution are you trying to compile under?

red0bear commented 6 years ago

Opensuse Leap 15. i wish compile it but it give error.

guruvan commented 6 years ago

opensuse isn't something that any of us really use. I recommend that you take a look into https://build.opensuse.org/package/show/home:marec2000:cryptocoins/bitcoin - the bitcoin.spec appears to contain most of the information you'll need for installing the prerequisites.

Current maza is based on bitcoin v0.10.2 while the link above is for the current version, 0.16.1 (bitcoin)

You may have difficulty finding the proper dependency packages, so compiling this version of maza on your opensuse may prove difficult.

If docker is an option, you might prefer that. you can find my alpine linux Dcokerfiles at https://github.com/mazanetwork/mazanode/blob/master/coind-base/Dockerfile.openssl.base https://github.com/mazanetwork/mazanode/blob/master/mazad/Dockerfile.mazad

Those images are available on dockerhub as well

guruvan commented 6 years ago

You can find those images at https://hub.docker.com/r/maza/

red0bear commented 6 years ago

but you cant provide a binary one ? Anyway thank you to respond.

guruvan commented 6 years ago

https://ipfs.io/ipfs/QmeFphaDUMjMhqih5w54g5mvqKzNMibPJJ8DNehhWtaVME/linux

Can't say it'll run or not on your opensuse - that's never been tested to my knowledge (there's a lot of linux distributions for a small team to test, we can't test them all )

TIM3H3AD commented 5 years ago

I had the same issue installing Mazacoin Lakota 0.10.2 on linux 18.04.

Downgrading OpenSSL worked for me.

sudo apt-get install libssl1.0-dev

owlhooter commented 2 years ago

Will be resolved in 0.16.3 release.