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

Error during the build of libtorrent #48

Closed
Sklinay opened this issue Jul 11, 2017 · 1 comment
Closed

Error during the build of libtorrent #48

Sklinay opened this issue Jul 11, 2017 · 1 comment

Comments

@Sklinay
Copy link

Sklinay commented Jul 11, 2017

Hi ! I am posting here because I dont get the activation mail on QuickBox's website.

There are some errors during the build of lib torrent :

make[3]: Entering directory '/root/tmp/libtorrent-0.13.6/src/utils'
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -I/usr/include -I/usr/include -pthread -g -O2 -g -DDEBUG -fvisibility=hidden -MT diffie_hellman.lo -MD -MP -MF .deps/diffie_hellman.Tpo -c -o diffie_hellman.lo diffie_hellman.cc
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -I/usr/include -I/usr/include -pthread -g -O2 -g -DDEBUG -fvisibility=hidden -MT instrumentation.lo -MD -MP -MF .deps/instrumentation.Tpo -c -o instrumentation.lo instrumentation.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -I/usr/include -I/usr/include -pthread -g -O2 -g -DDEBUG -fvisibility=hidden -MT instrumentation.lo -MD -MP -MF .deps/instrumentation.Tpo -c instrumentation.cc -fPIC -DPIC -o .libs/instrumentation.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -I/usr/include -I/usr/include -pthread -g -O2 -g -DDEBUG -fvisibility=hidden -MT diffie_hellman.lo -MD -MP -MF .deps/diffie_hellman.Tpo -c diffie_hellman.cc -fPIC -DPIC -o .libs/diffie_hellman.o
diffie_hellman.cc: In constructor 'torrent::DiffieHellman::DiffieHellman(const unsigned char*, int, const unsigned char*, int)':
diffie_hellman.cc:57:7: error: invalid use of incomplete type 'DH {aka struct dh_st}'
m_dh->p = BN_bin2bn(prime, primeLength, NULL);
^
In file included from /usr/include/openssl/bn.h:32:0,
from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'DH {aka struct dh_st}'
typedef struct dh_st DH;
^
diffie_hellman.cc:58:7: error: invalid use of incomplete type 'DH {aka struct dh_st}'
m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
^
In file included from /usr/include/openssl/bn.h:32:0,
from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'DH {aka struct dh_st}'
typedef struct dh_st DH;
^
diffie_hellman.cc: In member function 'bool torrent::DiffieHellman::is_valid() const':
diffie_hellman.cc:76:30: error: invalid use of incomplete type 'DH {aka struct dh_st}'
return m_dh != NULL && m_dh->pub_key != NULL;
^
In file included from /usr/include/openssl/bn.h:32:0,
from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'DH {aka struct dh_st}'
typedef struct dh_st DH;
^
In file included from diffie_hellman.cc:43:0:
diffie_hellman.cc: In member function 'void torrent::DiffieHellman::store_pub_key(unsigned char*, unsigned int)':
diffie_hellman.cc:105:39: error: invalid use of incomplete type 'DH {aka struct dh_st}'
if ((int)length >= BN_num_bytes(m_dh->pub_key))
^
In file included from /usr/include/openssl/bn.h:32:0,
from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'DH {aka struct dh_st}'
typedef struct dh_st DH;
^
diffie_hellman.cc:106:19: error: invalid use of incomplete type 'DH {aka struct dh_st}'
BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
^
In file included from /usr/include/openssl/bn.h:32:0,
from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'DH {aka struct dh_st}'
typedef struct dh_st DH;
^
In file included from diffie_hellman.cc:43:0:
diffie_hellman.cc:106:63: error: invalid use of incomplete type 'DH {aka struct dh_st}'
BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
^
In file included from /usr/include/openssl/bn.h:32:0,
from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'DH {aka struct dh_st}'
typedef struct dh_st DH;

I did some research and its because of new version of Openssl. This bug should happen only with Openssl1.1 but in my case it is with OpenSsl 1.0.2.

A git am ready patch :
0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch.txt
I tested it, everything is working now !

Rakshasa already merge this patch in the libtorrent feature-bind branch's.

I think you should update libtorrent-0.13.x.tar.gz .

Bye !

@JMSDOnline
Copy link
Member

JMSDOnline commented Jul 11, 2017

Well aware and I am working on a solution for this already.

Bye !

Post Script
Thanks for posting, also, check your spam folder for the activation email.

@Sklinay Sklinay closed this as completed Jul 11, 2017
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