{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxc/issues/380","labels_url":"https://api.github.com/repos/lxc/lxc/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxc/issues/380/comments","events_url":"https://api.github.com/repos/lxc/lxc/issues/380/events","html_url":"https://github.com/lxc/lxc/pull/380","id":52193080,"number":380,"title":"RFC: Fixes required to build for Android 5 on AArch64","user":{"login":"pao","id":140497,"avatar_url":"https://avatars.githubusercontent.com/u/140497?v=3","gravatar_id":"","url":"https://api.github.com/users/pao","html_url":"https://github.com/pao","followers_url":"https://api.github.com/users/pao/followers","following_url":"https://api.github.com/users/pao/following{/other_user}","gists_url":"https://api.github.com/users/pao/gists{/gist_id}","starred_url":"https://api.github.com/users/pao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pao/subscriptions","organizations_url":"https://api.github.com/users/pao/orgs","repos_url":"https://api.github.com/users/pao/repos","events_url":"https://api.github.com/users/pao/events{/privacy}","received_events_url":"https://api.github.com/users/pao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-12-17T02:05:49Z","updated_at":"2015-01-25T04:45:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lxc/lxc/pulls/380","html_url":"https://github.com/lxc/lxc/pull/380","diff_url":"https://github.com/lxc/lxc/pull/380.diff","patch_url":"https://github.com/lxc/lxc/pull/380.patch"},"body":"I don't expect these to be in the right shape for merging (except possibly the first one, which I hope is uncontroversial), but since I'm about to be minimally available for over a month I thought I'd at least get the patches out there.\r\n\r\nThe first patch replaces `index` with `strchr`. The bionic libc defines `index` as part of the [`ndk_cruft.cpp`](https://github.com/android/platform_bionic/blob/d0944d9ed38be0d74c3d8876f0f36b9ddc0ce38c/libc/bionic/ndk_cruft.cpp#L301) file, whose definitions are disabled on 64-bit platforms.\r\n\r\nThe second patch updates the `lxcmntent` compatability implementations to remove most of them. They are defined by the latest version of bionic (API 21). These would be more properly gated by a feature test--I'm just not sure if there is one. They might also be able to be gated by a particular bionic version, but I haven't looked into how that works, either.\r\n\r\nThe third patch bluntly hacks in the `-pie -fPIE` flags while compiling the lxc executable files. Starting with Android 5, you can't run non-posiiton-independent binaries.\r\n\r\nEven with all this, LXC doesn't quite work--I can't actually mount multiple cgroups to a single mount point, so that part of `prepare.sh` fails.\r\n\r\n(cf https://github.com/flar2/ElementalX-N9/pull/1)"},"comment":{"url":"https://api.github.com/repos/lxc/lxc/issues/comments/71352066","html_url":"https://github.com/lxc/lxc/pull/380#issuecomment-71352066","issue_url":"https://api.github.com/repos/lxc/lxc/issues/380","id":71352066,"user":{"login":"stgraber","id":2230599,"avatar_url":"https://avatars.githubusercontent.com/u/2230599?v=3","gravatar_id":"","url":"https://api.github.com/users/stgraber","html_url":"https://github.com/stgraber","followers_url":"https://api.github.com/users/stgraber/followers","following_url":"https://api.github.com/users/stgraber/following{/other_user}","gists_url":"https://api.github.com/users/stgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/stgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stgraber/subscriptions","organizations_url":"https://api.github.com/users/stgraber/orgs","repos_url":"https://api.github.com/users/stgraber/repos","events_url":"https://api.github.com/users/stgraber/events{/privacy}","received_events_url":"https://api.github.com/users/stgraber/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T04:45:08Z","updated_at":"2015-01-25T04:45:08Z","body":"Sorry for the massive delay. In preparation for LXC 1.1, I've pushed the first of your patch to master since that one is obviously right. The other two I really need to attempt an arm64 build by myself to get a better idea of how to handle them since as they stand, they clearly break all other architectures."}}