Replicant Native Development Kit (NDK) build and release
|Target version:||Any version|
It is great to have the Replicant SDK available for download. However, to build some native apps, the NDK is required. Any chance the replicant project can publish a NDK built from replicant sources?
Updated by Paul Kocialkowski about 3 years ago
I am not going to work on that, but perhaps someone else will.
Let me know if you have hints or a patch that will help building the NDK from Replicant's sources (I am not sure it actually uses the Android paltform source code).
Updated by Beuc Beuc almost 2 years ago
Please review NDKBuild for a first working set of NDK build instructions :)
Updated by Denis 'GNUtoo' Carikli over 1 year ago
- Category changed from 51 to Build system
- Device set to Not device specific
Updated by Paul Kocialkowski about 1 year ago
- Tracker changed from Issue to Feature
- Subject changed from Publish Native Development Kit (NDK) downloads? to Replicant Native Development Kit (NDK) build and release
- Device deleted (
Not device specific)
Updated by Wolfgang Wiedmeyer 11 days ago
Thank you very much for documenting the NDK build! I didn't try to reproduce it, but I went over the wiki page. Windows shouldn't be a target, it's enough if it's possible to provide a zip for GNU/Linux systems, so no need to get this working.
I know that Ubuntu is the reference platform Google is using, but afaik it still contains non-free software, even when only installing a build environment. On the BuildDependenciesInstallation page, Ubuntu was removed some time ago and only FSDG-compliant distros and Debian are listed. I'm not sure if we should include build instructions for Ubuntu on the wiki or not. Maybe someone else can chime in on this. If it indeed only worked with Ubuntu and not Debian or Trisquel, then the instructions should stay, because they are needed then as documentation to get it working on other distros that don't ship non-free software in the main package repository.
It looks like the git clone links need to be updated as the Replicant source code hosting has changed (at least for the init with the manifest). I'm not working on Replicant 4.2 and I'm focusing on Replicant 6.0. Not sure if Paul will resume work for Replicant 4.2 and get a NDK ready for it. At least, I wouldn't hold my breadth for it! But it's definitely a good thing to at least have the build documented!
As for Replicant 6.0, I spent quite some time to get rid of prebuilt binaries in the source tree. Building a NDK from the Replicant 6.0 sources would likely require to readd prebuilt binaries and the NDK build scripts may clash with the changes I did to get a toolchain built from source. I assume that the NDK scripts use the prebuilt toolchain from Google to build a new one. I broke that chain and got the toolchain built using the compilers that come with the GNU/Linux distribution. It's still not perfect as some prebuilts are still in use.
I would consider it a step back if we would use the NDK build scripts for Replicant 6.0 if they would use the prebuilt toolchain. I think a full NDK isn't even necessary. It would probably be enough to offer a zip with the Android cross compilers and some tools that are usually not available on GNU/Linux systems. This could be combined with the archive idea I described as a temporary solution in #1787.
In general, I consider offering such a zip with build tools only as a quick-and-dirty solution. The long-term solution is to get these tools packaged by GNU/Linux distributions.
Yeah at the time I used Ubuntu first and waited when Paul asked to review, then I moved to the SDK where I worked with Trisquel (cf. BuildEnvironments).
The NDK releases are independent from the SDK, about a year ago I provided instructions for NDK 10 (on another website since nothing was moving here).
with an automated build recipe:
with an Ubuntu base since I wanted to stay as close to the original as possible.
That can be used for porting to the Replicant branch.
Good job and tackling the prebuilts. Is there some documentation about your work?
I have some notes at http://android-rebuilds.beuc.net/Prebuilts/ but I remember the situation is a mess, with the prebuilt installation (headers...) being patched directly rather than having GCC rebuilt from source.
The NDK is more than cross-compilers and support tools, it also contains all the C-level API (e.g. access to EGL).
From your comment it seems to goal of the Replicant NDK is not well defined, for instance its level of compatibility with the official Android NDK.
Debian made some recent progress, see https://wiki.debian.org/AndroidTools, though for now coverage is minimal.
I'm not sure this will be enough to provide an environment that allow rebuilding a common F-Droid app.