There have been a couple of attempts to get c-lightning running on Android devices, and I thought it might be a good idea to pull experiences together to see what can be done to make Android support a possibility and make the process of getting it running on Android simpler.
I know that the abcore team (@greenaddress and @lvaccaro) has done some preliminary work to get c-lightning to compile on Android (greenaddress/bitcoin_ndk#21). The approach they followed is:
- Patch the makefile, the endiannes library and the JSON-RPC
- Generate the
config.vars and gen_header_versions.h on device, since the configurator runs on the compiler host
- Finally compile the dependencies and
lightningd using clang for the target arch
Ideally we'd backport the patches they needed to apply in order to internalize that part. @NickeZ on the other hand has been tackling the need to pre-generate the target config.vars and gen_header_versions.h files in #3464. That'd allow us to compile the configurator for the target arch and run it using the QEMU wrapper. Hopefully that eliminates the need for pre-canned "generated files".
Finally @remyers is also working on getting Android support working, with a host configurator but otherwise cross-compiling for ARM: #3473
Ideally we'd pool our collective experiences in getting the cross-compiled flow working, and document it for others to find in future.
What do you guys think? Are there any stumbling stones that I am missing? Could this allow us to cross-compile reproducible builds as well?
There have been a couple of attempts to get c-lightning running on Android devices, and I thought it might be a good idea to pull experiences together to see what can be done to make Android support a possibility and make the process of getting it running on Android simpler.
I know that the abcore team (@greenaddress and @lvaccaro) has done some preliminary work to get c-lightning to compile on Android (greenaddress/bitcoin_ndk#21). The approach they followed is:
config.varsandgen_header_versions.hon device, since theconfiguratorruns on the compiler hostlightningdusingclangfor the target archIdeally we'd backport the patches they needed to apply in order to internalize that part. @NickeZ on the other hand has been tackling the need to pre-generate the target
config.varsandgen_header_versions.hfiles in #3464. That'd allow us to compile theconfiguratorfor the target arch and run it using the QEMU wrapper. Hopefully that eliminates the need for pre-canned "generated files".Finally @remyers is also working on getting Android support working, with a host
configuratorbut otherwise cross-compiling for ARM: #3473Ideally we'd pool our collective experiences in getting the cross-compiled flow working, and document it for others to find in future.
What do you guys think? Are there any stumbling stones that I am missing? Could this allow us to cross-compile reproducible builds as well?