reddcoin-project / reddcoin-3.10

Reddcoin: the digital social currency
http://www.reddcoin.com
MIT License
287 stars 114 forks source link

Fixed build on arm devices, added build notes for arm #99

Closed hiddensphinx closed 11 months ago

hiddensphinx commented 7 years ago

How do I compile this on a Raspberry Pi 3 running Ubuntu-mate?

jschaeke commented 7 years ago

+1 to merge this

Dutchy-79 commented 6 years ago

Any help to get this working on a raspberry pi would be great.

bzhang443 commented 6 years ago

+1 to merge, the doc is a great help, not really understand code change.

sassman commented 6 years ago

this is great! Just there is a tiny piece missing. On raspbian there is a newer boost version libboost1.58-all-dev that causes compile errors on src/chainparams.cpp.

however the bitcoin folks took already care of it. See https://github.com/bitcoin/bitcoin/commit/a2b04ddfe6452e7d6274f4096bf3f2aee695a6d9 for details.

Maybe @joroob you could include that patch in your branch?

sassman commented 6 years ago

one more error seems to remain with the newer boost library:

make[3]: Entering directory '/home/pi/reddcoin/src'
  CXX      rpcrawtransaction.o
In file included from /usr/include/boost/move/utility_core.hpp:31:0,
                 from /usr/include/boost/move/utility.hpp:28,
                 from /usr/include/boost/thread/detail/move.hpp:27,
                 from /usr/include/boost/thread/lock_types.hpp:11,
                 from /usr/include/boost/thread/pthread/mutex.hpp:16,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from allocators.h:13,
                 from serialize.h:9,
                 from bignum.h:9,
                 from chainparams.h:9,
                 from base58.h:17,
                 from rpcrawtransaction.cpp:6:
/usr/include/boost/variant/get.hpp: In instantiation of 'typename boost::add_reference<T>::type boost::strict_get(boost::variant<T0, TN ...>&) [with U = const CScriptID&; T0 = CNoDestination; TN = {CKeyID, CScriptID}; typename boost::add_reference<T>::type = const CScriptID&]':
/usr/include/boost/variant/get.hpp:284:25:   required from 'typename boost::add_reference<T>::type boost::get(boost::variant<T0, TN ...>&) [with U = const CScriptID&; T0 = CNoDestination; TN = {CKeyID, CScriptID}; typename boost::add_reference<T>::type = const CScriptID&]'
rpcrawtransaction.cpp:299:77:   required from here
/usr/include/boost/variant/get.hpp:212:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get<U>(boost::variant<T...>&) will always throw boost::bad_get exception
     BOOST_STATIC_ASSERT_MSG(
     ^
Makefile:862: recipe for target 'rpcrawtransaction.o' failed

this line must be fixed from

                const CScriptID& hash = boost::get<const CScriptID&>(address);

to

                const CScriptID& hash = boost::get<CScriptID>(address);
reddink commented 6 years ago

the latest build of reddcoin v2.0.2.1 has both the rpcrawtransaction and chainparams updates included.

If someone would like to run through the build process again to confirm, that would be awesome

I also have a version of this on my private repo where I have kept the scrypt components in (this is so that if ever we need to do another testnet, we can create a mining period) https://github.com/reddink/reddcoin/commit/01d7c2a4b99cf4c4a07e76c10b2b2219c7ee2bfe

sassman commented 6 years ago

Well tag v2.0.2.1 does not exists? And the latest tag v2.0.1.2 ends up with an compilation error on raspian

scrypt.cpp:37:23: fatal error: emmintrin.h: No such file or directory
 #include <emmintrin.h>
                       ^
compilation terminated.
Dutchy-79 commented 6 years ago

And pi2?

Op 1 feb. 2018 09:49 schreef "Sven Aßmann" notifications@github.com:

@sassman commented on this pull request.

In doc/build-arm.md https://github.com/reddcoin-project/reddcoin/pull/99#discussion_r165289369 :

@@ -44,8 +44,6 @@ cd reddcoin ./autogen.sh ./configure --with-gui=no --disable-tests

  • (maybe this will work: ./configure --disable-tests CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" CXXFLAGS="-march=armv7-a -mfpu=vfpv3-d16" LDFLAGS="-L${BDB_PREFIX}/lib/" --enable-sse2=no --with-gui=no)

for PI3B use: -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/reddcoin-project/reddcoin/pull/99#pullrequestreview-93201369, or mute the thread https://github.com/notifications/unsubscribe-auth/AVshhOnLk9L9JSgOshLK-pwH81U3B2zyks5tQXqQgaJpZM4NxERj .

sassman commented 6 years ago

@Dutchy-79 you can find other pi optimization flags here

reddink commented 6 years ago

latest branch which compiles on raspberry pi2 https://github.com/reddcoin-project/reddcoin/tree/arm_support_v2