cygnusxi / CurecoinSource

Curecoin 2.0+ Source Code
https://curecoin.net
MIT License
146 stars 57 forks source link

Building wallet on Raspbian running into issues. #44

Closed oshura3 closed 2 years ago

oshura3 commented 5 years ago

Hello there.

Following the instructions found in the README.md file to the letter but encountering the following errors, please advise:

pi@raspberrypi:~/curecoin/CurecoinSource $ qmake Info: creating stash file /home/pi/curecoin/CurecoinSource/.qmake.stash Project MESSAGE: Building with UPNP support Warning: ignoring [defaultcodec] element (every time you see "ignoring" and then "element", defaultcodec shows up with < and then > in it, since it wasn't showing I just changed one to [ ] instead) Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Removed plural forms as the target language has less forms. If this sounds wrong, possibly the target language is not set or recognized. Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Warning: ignoring element Removed plural forms as the target language has less forms. If this sounds wrong, possibly the target language is not set or recognized. Warning: ignoring element Warning: ignoring element Warning: ignoring element

Then when typing in "make", the following comes out:

cd /home/pi/curecoin/CurecoinSource; /bin/sh share/genbuild.sh /home/pi/curecoin/CurecoinSource/build/build.h /usr/lib/qt5/bin/uic src/qt/forms/sendcoinsdialog.ui -o build/ui_sendcoinsdialog.h /usr/lib/qt5/bin/uic src/qt/forms/addressbookpage.ui -o build/ui_addressbookpage.h /usr/lib/qt5/bin/uic src/qt/forms/signverifymessagedialog.ui -o build/ui_signverifymessagedialog.h /usr/lib/qt5/bin/uic src/qt/forms/aboutdialog.ui -o build/ui_aboutdialog.h /usr/lib/qt5/bin/uic src/qt/forms/editaddressdialog.ui -o build/ui_editaddressdialog.h /usr/lib/qt5/bin/uic src/qt/forms/transactiondescdialog.ui -o build/ui_transactiondescdialog.h /usr/lib/qt5/bin/uic src/qt/forms/overviewpage.ui -o build/ui_overviewpage.h /usr/lib/qt5/bin/uic src/qt/forms/sendcoinsentry.ui -o build/ui_sendcoinsentry.h /usr/lib/qt5/bin/uic src/qt/forms/askpassphrasedialog.ui -o build/ui_askpassphrasedialog.h /usr/lib/qt5/bin/uic src/qt/forms/rpcconsole.ui -o build/ui_rpcconsole.h /usr/lib/qt5/bin/uic src/qt/forms/optionsdialog.ui -o build/ui_optionsdialog.h g++ -c -pipe -fstack-protector-all --param ssp-buffer-size=1 -msse2 -O2 -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -D_REENTRANT -fPIC -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -DBOOST_ASIO_ENABLE_OLD_SERVICES -D__NO_SYSTEM_INCLUDES -DQT_DISABLE_DEPRECATED_BEFORE=0 -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DHAVE_BUILD_INFO -DLINUX -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -Isrc -Isrc/json -Isrc/qt -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtPrintSupport -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtNetwork -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -Ibuild -Ibuild -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o build/curecoin.o src/qt/curecoin.cpp g++: error: unrecognized command line option ‘-msse2’ make: *** [Makefile:1196: build/curecoin.o] Error 1

Not sure what to do next.

oliviergareau commented 5 years ago

g++: error: unrecognized command line option ‘-msse2’

SSE2 is for SIMD instructions for Intel and AMD processors, which are not present on the ARM processor of a Raspberry Pi. These instructions offer better performance for parallel workloads.

You could try commenting out these specific compilation flags at line 115 and 116 of the .pro file:

https://github.com/cygnusxi/CurecoinSource/blob/cb6999622774f4340b0194882f453024112e0348/curecoin-qt.pro#L115

oshura3 commented 4 years ago

Hey there oliviergareau,

I tried what you suggested but got all these errors coming out. I will try to put the pastebin of what came up.

Here's the link for the pastebin, I hope it works. https://pastebin.com/v4dzpdzR

oliviergareau commented 4 years ago

These compilation errors are known to be caused by libssl, have a look at #28 for a fix.

oshura3 commented 4 years ago

Morning,

I tried the fix listed on #28 and this pastebin is what came up

https://pastebin.com/t6YBKixA

It's a little too in-depth, coding-wise, for me to be able to decipher. I was hoping someone involved with the development of the wallet could help me figure out what's going on.

Thanks again

oliviergareau commented 4 years ago

These compilation errors are due to a function signature change in miniupnpc. You could apply the patch described in PR #42 .

oliviergareau commented 4 years ago

@oshura3 The PR to fix miniupnpc was merged, please report if you had any other issues building.

trourance commented 4 years ago

I'm trying to compile on raspbian buster. I've installed libssl1.0-dev and applied the patch in PR #42, but now I'm facing another issue.

curecoinrpc.cpp: At global scope:
curecoinrpc.cpp:653:102: error: wrong number of template arguments (2, should be 1)
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                                                      ^
In file included from /usr/include/boost/asio.hpp:30,
                 from curecoinrpc.cpp:15:
/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
       ^~~~~~~~~~~~~~~~~~~~~
curecoinrpc.cpp:653:104: error: template argument 1 is invalid
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                                                        ^
curecoinrpc.cpp:663:95: error: wrong number of template arguments (2, should be 1)
 static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                                               ^
In file included from /usr/include/boost/asio.hpp:30,
                 from curecoinrpc.cpp:15:
/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
       ^~~~~~~~~~~~~~~~~~~~~
curecoinrpc.cpp:663:97: error: template argument 1 is invalid
 static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                                                 ^
curecoinrpc.cpp: In function ‘void RPCListen(int, boost::asio::ssl::context&, bool)’:
curecoinrpc.cpp:668:91: error: base operand of ‘->’ is not a pointer
     AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
                                                                                           ^~
curecoinrpc.cpp:670:13: error: base operand of ‘->’ is not a pointer
     acceptor->async_accept(
             ^~
curecoinrpc.cpp: At global scope:
curecoinrpc.cpp:685:102: error: wrong number of template arguments (2, should be 1)
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                                                      ^
In file included from /usr/include/boost/asio.hpp:30,
                 from curecoinrpc.cpp:15:
/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
       ^~~~~~~~~~~~~~~~~~~~~
curecoinrpc.cpp:685:104: error: template argument 1 is invalid
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                                                        ^
curecoinrpc.cpp: In function ‘void RPCAcceptHandler(int, boost::asio::ssl::context&, bool, AcceptedConnection*, const boost::system::error_code&)’:
curecoinrpc.cpp:695:17: error: base operand of ‘->’ is not a pointer
      && acceptor->is_open())
                 ^~
curecoinrpc.cpp:696:45: error: no matching function for call to ‘RPCListen(int&, boost::asio::ssl::context&, const bool&)’
         RPCListen(acceptor, context, fUseSSL);
                                             ^
curecoinrpc.cpp:663:13: note: candidate: ‘template<class Protocol, class SocketAcceptorService> void RPCListen(int, boost::asio::ssl::context&, bool)’
 static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
             ^~~~~~~~~
curecoinrpc.cpp:663:13: note:   template argument deduction/substitution failed:
curecoinrpc.cpp:696:45: note:   couldn't deduce template parameter ‘Protocol’
         RPCListen(acceptor, context, fUseSSL);
                                             ^
curecoinrpc.cpp: In function ‘void ThreadRPCServer2(void*)’:
curecoinrpc.cpp:801:45: error: no matching function for call to ‘RPCListen(boost::shared_ptr<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp> >&, boost::asio::ssl::context&, const bool&)’
         RPCListen(acceptor, context, fUseSSL);
                                             ^
curecoinrpc.cpp:663:13: note: candidate: ‘template<class Protocol, class SocketAcceptorService> void RPCListen(int, boost::asio::ssl::context&, bool)’
 static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
             ^~~~~~~~~
curecoinrpc.cpp:663:13: note:   template argument deduction/substitution failed:
curecoinrpc.cpp:801:45: note:   couldn't deduce template parameter ‘Protocol’
         RPCListen(acceptor, context, fUseSSL);
                                             ^
curecoinrpc.cpp:827:49: error: no matching function for call to ‘RPCListen(boost::shared_ptr<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp> >&, boost::asio::ssl::context&, const bool&)’
             RPCListen(acceptor, context, fUseSSL);
                                                 ^
curecoinrpc.cpp:663:13: note: candidate: ‘template<class Protocol, class SocketAcceptorService> void RPCListen(int, boost::asio::ssl::context&, bool)’
 static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
             ^~~~~~~~~
curecoinrpc.cpp:663:13: note:   template argument deduction/substitution failed:
curecoinrpc.cpp:827:49: note:   couldn't deduce template parameter ‘Protocol’
             RPCListen(acceptor, context, fUseSSL);
                                                 ^
make: *** [makefile.raspberrypi:149: obj/curecoinrpc.o] Error 1
trourance commented 4 years ago

I've found it. Raspbian buster is using boost 1.67. This is due to a change in boost 1.66 as stated here: https://www.boost.org/users/history/version_1_66_0.html For version 1.66 and upward, the following macro has to be defined: BOOST_ASIO_ENABLE_OLD_SERVICES

benzmuircroft commented 3 years ago

@trourance where did you define BOOST_ASIO_ENABLE_OLD_SERVICES?

were you able to put is as a flag when ./configure

or does it go in the code?

I tried adding it to main.h and then I took it out and put it into configure.ac (I'm guessing)

I'm trying to compile a similar coin for raspberry pi https://github.com/zer-dex-coin/zerdex-core