error: conflicting types for ‘SSL_SESSION_get_master_key
I'm using Debian 11, python 3.9 and I just updated everything.
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install -y git unzip build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libgmp-dev libevent-dev autogen automake libtool libcurl4-openssl-dev
git clone https://github.com/carsenk/denarius
cd denarius
git checkout master
git pull
cd src
make -f makefile.unix
make -f makefile.unix error-ed out with the following: (this is just a partial list)
In file included from tor/tortls.c:52: tor/tortls.h:140:15: error: conflicting types for ‘SSL_SESSION_get_master_key’ 140 | STATIC size_t SSL_SESSION_get_master_key(SSL_SESSION *s, uint8_t *out, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from tor/tortls.c:40: /usr/include/openssl/ssl.h:2007:15: note: previous declaration of ‘SSL_SESSION_get_master_key’ was here 2007 | __owur size_t SSL_SESSION_get_master_key(const SSL_SESSION *sess,
tor/tortls.c: In function ‘tor_tls_client_is_using_v2_ciphers’: tor/tortls.c:1511:20: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’} 1511 | ciphers = session->ciphers; | ^~ tor/tortls.c: At top level: tor/tortls.c:2405:1: error: conflicting types for ‘SSL_get_client_random’ 2405 | SSL_get_client_random(SSL *s, uint8_t *out, size_t len) | ^~~~~~~~~~~~~~~~~~~~~ In file included from tor/tortls.c:40: /usr/include/openssl/ssl.h:2003:15: note: previous declaration of ‘SSL_get_client_random’ was here 2003 | __owur size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, | ^~~~~~~~~~~~~~~~~~~~~ In file included from tor/tortls.c:27: tor/tortls.c: In function ‘SSL_get_client_random’: tor/tortls.c:2410:15: error: invalid use of incomplete typedef ‘SSL’ {aka ‘struct ssl_st’} 2410 | tor_assert(s->s3); | ^~
tor/tortls.c:2424:16: error: invalid use of incomplete typedef ‘SSL’ {aka ‘struct ssl_st’} 2424 | memcpy(out, s->s3->server_random, len); | ^~ tor/tortls.c: In function ‘SSL_SESSION_get_master_key’: tor/tortls.c:2435:13: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’} 2435 | return s->master_key_length; | ^~ In file included from tor/tortls.c:27: tor/tortls.c:2436:30: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’} 2436 | tor_assert(len == (size_t)s->master_key_length); | ^~ tor/torcompat.h:196:51: note: in definition of macro ‘PREDICT_UNLIKELY’ 196 | #define PREDICT_UNLIKELY(exp) __builtin_expect(!!(exp), 0) | ^~~ tor/tortls.c:2436:3: note: in expansion of macro ‘tor_assert’ 2436 | tor_assert(len == (size_t)s->master_key_length); | ^~~~~~~~~~ tor/tortls.c:2438:16: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’} 2438 | memcpy(out, s->master_key, len); | ^~ make: *** [makefile.unix:465: obj/tortls.o] Error 1
It appears that the majority of the issues is syntac.
Major changes to OpenSSL with Denarius lately, latest development branch is secp256k1, you will need the dep libsecp256k1, OpenSSL is being removed in favor of secp256k1. You will also need to add the flag USE_NATIVETOR=- when compiling the QT until native tor (which uses OpenSSL is removed)
Try this, you were close, guides will be updated eventually.
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install -y git unzip build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libgmp-dev libevent-dev autogen automake libtool libcurl4-openssl-dev libgmp-dev libsecp256k1-dev
git clone https://github.com/carsenk/denarius
cd denarius
git checkout secp256k1
git pull
cd src
make -f makefile.arm
An example for ubuntu 20.04 QT, which should work on Debian 11, for anyone else coming across this issue. https://denarius.wiki/wallet/compile/#ubuntu-2004-qt-secp256k1-branch
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install -y git unzip build-essential libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libevent-dev autogen automake libtool libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qt5-default zlib1g-dev jq libcurl4-openssl-dev libgmp-dev libsecp256k1-dev
git clone https://github.com/carsenk/denarius
cd denarius
git checkout secp256k1
qmake "USE_UPNP=1" "USE_QRCODE=1" "USE_NATIVETOR=-" denarius-qt.pro
make
./Denarius