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

Compiling issues with openssl 1.1 #10

Open
sats0k opened this issue Jul 15, 2018 · 8 comments
Open

Compiling issues with openssl 1.1 #10

sats0k opened this issue Jul 15, 2018 · 8 comments

Comments

@sats0k
Copy link
Contributor

sats0k commented Jul 15, 2018

Installing a new linux with openssl 1.1 in one of my pc's, i have some errors to compile the wallet.

First thing who i did was to downgrade to openssl 1.0 and the compilation started but faced with another error.

src/bitcoinrpc.cpp:2911:102: error: wrong number of template arguments (2, should be 1) t::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, ^ In file included from /usr/include/boost/asio.hpp:30:0, from src/bitcoinrpc.cpp:19: /usr/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: provided for ‘template<class Protocol> class boost::asio::basic_socket_acceptor’ class basic_socket_acceptor ^~~~~~~~~~~~~~~~~~~~~
Is there a way to compile without to downgrade openssl?

I tried to change the BN_init to BN_new in the bignum.h file but without any success.

@sats0k
Copy link
Contributor Author

sats0k commented Jul 15, 2018

After some search i found this commit 14c5880
replacing the code in bitcoinrpc.cpp everything builded fine.

@ghostlander
Copy link
Owner

OpenSSL v1.1.x is untested with PXC currently, though v1.0.x should work fine.

It isn't the first time Boost breaks things, though v1.65.1 seems to work fine without the patch.

@sats0k
Copy link
Contributor Author

sats0k commented Feb 9, 2019

I finally managed to build the wallet with OpenSSL v1.1
everything seems to work fine but more tests needed
I made a fork and changes are on this commit 486112c
some of the changes are for gcc 8
Builded on openSUSE Tumbleweed

but remained a warning:

-Ibuild -I/usr/lib64/qt5/mkspecs/linux-g++ -o build/protocol.o src/protocol.cpp src/ ::CMessageHeader(const char*, unsigned int, bool)’: src/protocol.cpp:35:12: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 12 equals destination size [-Wstringop-truncation] strncpy(pchCommand, pszCommand, COMMAND_SIZE); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -c -pipe -O2 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wformat

Replacing strncpy with memcpy the warning disapear but end up with an unworked wallet.

edit: resolved the warning

@sats0k
Copy link
Contributor Author

sats0k commented Feb 12, 2019

The warning of gcc8 [-Wstringop-truncation] resolved on this commit bc1eaa2
everything seems fine now

@ghostlander
Copy link
Owner

Would you make a pull request?

@sats0k
Copy link
Contributor Author

sats0k commented Feb 12, 2019

I am new to all of this and to avoid any kind of mistake please check the code and if you find it ok i will do a pull request.

@ghostlander
Copy link
Owner

bignum.h:61 BIGNUM *self = nullptr; seems to break C++03 compatibility. Replaced nullptr with NULL. The rest seems fine.

@sats0k
Copy link
Contributor Author

sats0k commented Feb 13, 2019

I have sync my fork with the base.

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