Integrating this into the upstream build would likely be more maintainable, and it would make it possible to make the ndk build part of the gitian build set at some point, providing higher reassurance for the Android executables.
/opt/arm-linux-androideabi-clang/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../include/c++/4.9.x/fstream:826:20: error: use of undeclared identifier ‘ftello’
from a quick investigation this seems an issue with the ndk and the work around is to not set D_FILE_OFFSET_BITS=64 (but I couldn’t see an easy way to do it yet)
greenaddress
commented at 2:26 pm on December 13, 2017:
contributor
not setting FILE_OFFSET_BITS in core is not sufficient, I believe zlib is also enabling it (or maybe boost, not sure)
jonasschnelli
commented at 7:04 pm on December 13, 2017:
contributor
+1 for an Android build support
greenaddress
commented at 10:45 am on December 14, 2017:
contributor
looks like not building the samples for libevent is already in master (thanks @fanquake) so the set of patches needed is less going forward (hopefully at least!)
greenaddress
commented at 2:22 pm on January 31, 2018:
contributor
I’ve updated the bitcoin_ndk repo with a new branch for the 0.16 release candidate.
laanwj
commented at 7:48 am on February 1, 2018:
member
Great! Also good to hear that the required amount of patching is less for 0.16.
tofutim
commented at 2:25 pm on April 11, 2018:
none
Just curious if this is working now.
laanwj
commented at 2:34 pm on April 11, 2018:
member
Not with this repository, that’s why the issue is still open.
If you want to play with this, you need @greenaddress ’s stuff he links above.
tofutim
commented at 2:53 pm on April 11, 2018:
none
@greenaddress, do you have a gitian-descriptor for android ndk I can experiment with?
greenaddress
commented at 10:38 am on June 17, 2018:
contributor
@tofutim sorry just saw this. No I don’t have gitian-descriptor. Ideally it would have one but really I wanted to make sure we could use the latest NDK (still on r14b because of 32bit archs failing on later versions) and upstream necessary changes where possible. Right now I’m in the process of refreshing to 0.16.1 and at least build the 64 bit arch with r17b
greenaddress
commented at 3:46 pm on June 17, 2018:
contributor
@laanwj I updated to 0.16.1 and managed to upgrade to latest ndk compiler (r17b) for both 32/64 bit by passing ac_cv_sys_file_offset_bits accordingly.
I also had to hack zmq depend because of tautological-constant-compare and new compiler (patch is from zmq upstream)
greenaddress
commented at 9:23 am on June 19, 2018:
contributor
@fanquake eventually yes, with some guidance from you and others :)
For the ZMQ patch since it is upstream I don’t think we need to do anything other than wait until it trickles down in a stable release we move to? Also, I checked the latest update in the one we use in bitcoin core master and still suffers from the tautological-constant-compare Error (in zmq depends).
Actually I think the actual issue there is that we are not passing through/overriding depends compile flags when we build depends libraries but we do set tautological-constant-compare as a warning when we build bitcoin core. If we were to pass through/override depends CFLAGS/CPPFLAGS then we wouldn’t even need the ZMQ patch.
fanquake
commented at 1:53 pm on June 19, 2018:
member
@greenaddress we are already applying patches for zeromq in depends, so if we need to pull that patch in to fix a build issue, that isn’t a problem.
Given that zeromq/libzmq#3140 was only merged recently, I’d assume it’ll be part of zmq 4.2.6 if/when that’s released. However, a zeromq bump in the 0.16.x branch is pretty unlikely now, so just pulling that patch into depends is probably the best approach.
greenaddress
commented at 1:51 pm on July 18, 2018:
contributor
It has patches for depends, adds ifaddrs (missing on android) and patches leveldb fread/write/flush_unlocked to fread/write/flush. It also has the ZMQ fix for tautological constant compare directly from upstream (which, as you suggested, in bitcoin master already could be avoided by using –disable-Werror though that’s more impactful)
What do you think, if anything, that we should try to backport either into core or even upstream as applicable?
By the way, if you have other ideas (like –disable-Werror) or comments about the patches that would improve them or simplify them I am keen on feedback!
greenaddress
commented at 1:54 pm on July 18, 2018:
contributor
@fanquake I raised #13689 for the zmq patches (changed from patching in the disabling of tautological constant compare to patch in disabling of Werror as per @theuni feedback)
Note: the –disable-Werror can only be used in master/0.17.x because we use 4.2.3 zmq, in 0.16,{1,2} we use 4.2.2 which doesn’t support –disable-Werror.
theuni
commented at 5:37 pm on July 19, 2018:
member
@greenaddress I took a look at the ndk patches, a few quick notes:
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-03 15:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me