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
Building within termux fails with 'incomplete type CBlock' #11388
Comments
May have fixed this by avoiding the forward declaration(?). Will update if the build finishes. |
Fix(es): add hardcode OS_ANDROID in src/leveldb/port/port_posix.h (f{read,write,flush}_unlocked are not present) test_bitcoin doesn't work because the folders it wants to use are not present. Can probably work around this. Syncing up from a LAN node, block 40,000 so far. |
In the error message it seems like it may be possible to resolve the issue by including "primitives/block" in validationinterface.cpp instead of .h. Does that still work? |
Ha, termux - I'm also interested in having this work, would put it within reach to hack on bitcoin core from my phone. Back in the day I stumbled on some pretty obscure build system issues. It's promising that you get this far.
Does it hardcode any (global) folder names? |
I have uploaded two relevant files that allow bitcoind to compile with disablewallet on Termux using termux-chroot. It passes test_bitcoin, I haven't tried functional tests yet. https://esotericnonsense.com/tmp/bitcoin.ff4cd6075b12fb32b9a906deea3ed033e3f9560a.diff.txt is a patch on master (base commit in filename). Hack out boost::filesystem::temp_directory_path() (it returns an inaccessible directory on unrooted Android). https://esotericnonsense.com/tmp/libevent.8b0aa7b36a3250fad4953f194c8a94ab25032583.diff.txt is a patch on libevent master (base commit in filename). The libevent one is more of a termux issue than anything to do with us (we need libevent-pthreads which isn't in the termux package). I don't think we use the removed arc4random function (which doesn't exist on Android anyway). They are pretty lazy patches which basically hardcode stuff to get it to work. If more than a few are interested (?) I could look into the build system at some point. I don't have a full list of dependencies due to history issues on the system, but I think this should cover most of it:
Moto G first gen takes approx 15sec to process a block at the tip on mainnet. Not too shabby. |
@esotericnonsense can you test moving the extra validationinterface include to the cpp file instead of the h file?
…On September 30, 2017 1:14:07 AM EDT, Daniel Edgecumbe ***@***.***> wrote:
I have uploaded two relevant files that allow bitcoind to compile with
disablewallet on Termux using termux-chroot. It passes test_bitcoin, I
haven't tried functional tests yet.
https://esotericnonsense.com/tmp/bitcoin.ff4cd6075b12fb32b9a906deea3ed033e3f9560a.diff.txt
is a patch on master (base commit in filename).
Hack out boost::filesystem::temp_directory_path() (it returns an
inaccessible directory on unrooted Android).
Force OS_ANDROID to be true for leveldb to compile (should be fixable
in build system if we can detect android/termux?).
Fix forward declaration issue on Android NDK.
https://esotericnonsense.com/tmp/libevent.8b0aa7b36a3250fad4953f194c8a94ab25032583.diff.txt
is a patch on libevent master (base commit in filename).
The libevent one is more of a termux issue than anything to do with us
(we need libevent-pthreads which isn't in the termux package). I don't
think we use the removed arc4random function (which doesn't exist on
Android anyway).
They are pretty lazy patches which basically hardcode stuff to get it
to work. If anyone other than me is that interested (?) I could look
into the build system at some point.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#11388 (comment)
|
@TheBlueMatt apologies, I think I misread your comment earlier. |
This should fix all the non-dependancy issues for termux builds. See Github issue bitcoin#11388.
OK, well at least that we can fix without much overhead, see 11440. |
This should fix all the non-dependancy issues for termux builds. See Github issue bitcoin#11388. Github-Pull: bitcoin#11440 Rebased-From: 96c2ce9
96c2ce9 Fix validationinterface build on super old boost/clang (Matt Corallo) Pull request description: This should fix all the non-dependancy issues for termux builds. See Github issue #11388. Tree-SHA512: ff0918fa76a6d4639a6c5b5e045ef053ce1d93eb0b1fe94c5fdfcc4d5e54e1118eeb09676ffd8f6d1acd630a63656944c6274ee3dbd7c09b7129c30647dbf4f9
Fixed in #11440. |
This should fix all the non-dependancy issues for termux builds. See Github issue bitcoin#11388.
…/clang 96c2ce9 Fix validationinterface build on super old boost/clang (Matt Corallo) Pull request description: This should fix all the non-dependancy issues for termux builds. See Github issue bitcoin#11388. Tree-SHA512: ff0918fa76a6d4639a6c5b5e045ef053ce1d93eb0b1fe94c5fdfcc4d5e54e1118eeb09676ffd8f6d1acd630a63656944c6274ee3dbd7c09b7129c30647dbf4f9
…/clang 96c2ce9 Fix validationinterface build on super old boost/clang (Matt Corallo) Pull request description: This should fix all the non-dependancy issues for termux builds. See Github issue bitcoin#11388. Tree-SHA512: ff0918fa76a6d4639a6c5b5e045ef053ce1d93eb0b1fe94c5fdfcc4d5e54e1118eeb09676ffd8f6d1acd630a63656944c6274ee3dbd7c09b7129c30647dbf4f9
Describe the issue
Building within Termux fails in validationinterface. The error is below.
Can you reliably reproduce the issue?
If so, please list the steps to reproduce below:
Expected behaviour
A copy of bitcoind to appear for me to abuse my smartphone with. Obviously not a 'supported' configuration, but it'd be a fun toy to play with.
Actual behaviour
What version of bitcoin-core are you using?
v0.15.0.1, signed source package.
Other potentially relevant information
Termux doesn't ship g++ and hasn't for a while now.
The text was updated successfully, but these errors were encountered: