<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bitmask_android.git/docker/android-sdk.dockerfile, branch 1.1.2</title>
<subtitle>[bitmask_android] 
</subtitle>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/'/>
<entry>
<title>Build docker images from CI</title>
<updated>2017-09-29T06:56:24+00:00</updated>
<author>
<name>Varac</name>
<email>varac@leap.se</email>
</author>
<published>2017-09-25T14:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=e0aa1cd978f978ed3ac90adaf8415b60ce039c79'/>
<id>e0aa1cd978f978ed3ac90adaf8415b60ce039c79</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ag] modify sdk dockerfile to ensure android-23 platform installs</title>
<updated>2017-05-01T00:05:44+00:00</updated>
<author>
<name>aguestuser</name>
<email>aguestuser@risup.net</email>
</author>
<published>2017-04-30T23:03:59+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=730ab74a2a38cdbe8ac735f2d641d3d19055bf34'/>
<id>730ab74a2a38cdbe8ac735f2d641d3d19055bf34</id>
<content type='text'>
* on remote builds, failure of Android SDK Platform 23 to properly
  install was causing build failures undetected in local container.
  see: &lt;https://0xacab.org/aguestuser/bitmask_android/builds/9906&gt;
* to fix this, tweak order of `sdkmanager` calls and remove `echo -y`
  flags to ensure platform installation completes successfully and
  build step never tries to install Platform 23
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* on remote builds, failure of Android SDK Platform 23 to properly
  install was causing build failures undetected in local container.
  see: &lt;https://0xacab.org/aguestuser/bitmask_android/builds/9906&gt;
* to fix this, tweak order of `sdkmanager` calls and remove `echo -y`
  flags to ensure platform installation completes successfully and
  build step never tries to install Platform 23
</pre>
</div>
</content>
</entry>
<entry>
<title>[ag] extract sdk, ndk, emulator configs to separate dockerfiles</title>
<updated>2017-05-01T00:05:44+00:00</updated>
<author>
<name>aguestuser</name>
<email>aguestuser@risup.net</email>
</author>
<published>2017-04-30T21:09:41+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=690364e6debe88ae052d93808d715b9ac79d4bc1'/>
<id>690364e6debe88ae052d93808d715b9ac79d4bc1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ag] generate all locales in android-sdk dockerfile to pass build</title>
<updated>2017-05-01T00:05:44+00:00</updated>
<author>
<name>aguestuser</name>
<email>aguestuser@risup.net</email>
</author>
<published>2017-04-30T19:35:42+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=7ed71d793c24b0b074cf61a85ea96c45c21f07f1'/>
<id>7ed71d793c24b0b074cf61a85ea96c45c21f07f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ag] eliminate hacky workaround for 64-bit builds</title>
<updated>2017-05-01T00:05:35+00:00</updated>
<author>
<name>aguestuser</name>
<email>aguestuser@risup.net</email>
</author>
<published>2017-04-24T00:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=215edb9840e5a75ed961fbf8b6ce423116deef28'/>
<id>215edb9840e5a75ed961fbf8b6ce423116deef28</id>
<content type='text'>
* HACK: replace all toolchain references to `linux-x86_64` with `linux-x86`
* FIX: provide dependency on `file` package that will allow `ndk-build` to
  detect 32-bit userland, making this

* side-effects:
  * group sdk/env vars with installation code that uses them
  * add explanatory note about why we use outdated version of `android-ndk`

------------------

*Explanation:*

More careful analysis of the meaning of the word `file` in this (subtle!) error message:

```shell
/opt/android-sdk-linux/android-ndk-r12b/build/ndk-build: 143: /opt/android-sdk-linux/android-ndk-r12b/build/ndk-build: file: not found
```

led to inspecting line 143 of `ndk-build`, revealing an undefined variable
called `file` that would allow `ndk-build` to detect a 32-bit userland:

```shell
file -L "$SHELL" | grep -q "x86[_-]64"
```
Thus the error messsage was *not* trying to tell us that a file could
not be found, but that the program called `file` could not be
found. FUN! :)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* HACK: replace all toolchain references to `linux-x86_64` with `linux-x86`
* FIX: provide dependency on `file` package that will allow `ndk-build` to
  detect 32-bit userland, making this

* side-effects:
  * group sdk/env vars with installation code that uses them
  * add explanatory note about why we use outdated version of `android-ndk`

------------------

*Explanation:*

More careful analysis of the meaning of the word `file` in this (subtle!) error message:

```shell
/opt/android-sdk-linux/android-ndk-r12b/build/ndk-build: 143: /opt/android-sdk-linux/android-ndk-r12b/build/ndk-build: file: not found
```

led to inspecting line 143 of `ndk-build`, revealing an undefined variable
called `file` that would allow `ndk-build` to detect a 32-bit userland:

```shell
file -L "$SHELL" | grep -q "x86[_-]64"
```
Thus the error messsage was *not* trying to tell us that a file could
not be found, but that the program called `file` could not be
found. FUN! :)
</pre>
</div>
</content>
</entry>
<entry>
<title>[ag] Fix native build step with revised dockerfile</title>
<updated>2017-05-01T00:05:35+00:00</updated>
<author>
<name>aguestuser</name>
<email>aguestuser@risup.net</email>
</author>
<published>2017-04-23T20:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=e79058d8797c918d37e406245ca7683cf07240d1'/>
<id>e79058d8797c918d37e406245ca7683cf07240d1</id>
<content type='text'>
* PROBLEM:
  * most recent version (r14b) of `android-ndk` uses `clang` for cross-compilation
  * BUT: `openssl` cannot compile successfully w/ `clang`
  * AND: we depend on `openssl` transitively through `ics-openvpn`
    while trying to use `android-ndk` r14b

* FIX:
  * downgrade to `android-ndk` (12b) (most recent versoin that still
    uses `gcc` instead of `clang`)
  * modify some of the default

* REMAINING PROBLEMS:
  * some string translations for Jamaica now break the build (unclear
    why -- outdated country abbreviation? ja for jm???)
  * we are now using a version of ndk that is 2 versions old and a
    version of ics-openvpn (pinned to a 3.1.2016 commit via submodule)
    that depends on an outdated version of `openssl`, which raises
    security concerns. updating to the most recent version will force
    us to wade into all the dependency problems amongst `ics-openvpn`/`openssl`/`ndk`

* REFERENCES:
  * on `openssl` incompatibility w/ clang: https://github.com/openssl/openssl/pull/2229
  * on `ics-openvpn` problems with `ndk`: https://github.com/android-ndk/ndk/issues/144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PROBLEM:
  * most recent version (r14b) of `android-ndk` uses `clang` for cross-compilation
  * BUT: `openssl` cannot compile successfully w/ `clang`
  * AND: we depend on `openssl` transitively through `ics-openvpn`
    while trying to use `android-ndk` r14b

* FIX:
  * downgrade to `android-ndk` (12b) (most recent versoin that still
    uses `gcc` instead of `clang`)
  * modify some of the default

* REMAINING PROBLEMS:
  * some string translations for Jamaica now break the build (unclear
    why -- outdated country abbreviation? ja for jm???)
  * we are now using a version of ndk that is 2 versions old and a
    version of ics-openvpn (pinned to a 3.1.2016 commit via submodule)
    that depends on an outdated version of `openssl`, which raises
    security concerns. updating to the most recent version will force
    us to wade into all the dependency problems amongst `ics-openvpn`/`openssl`/`ndk`

* REFERENCES:
  * on `openssl` incompatibility w/ clang: https://github.com/openssl/openssl/pull/2229
  * on `ics-openvpn` problems with `ndk`: https://github.com/android-ndk/ndk/issues/144
</pre>
</div>
</content>
</entry>
<entry>
<title>[ag] Update dockerfile to match config in passing local build</title>
<updated>2017-05-01T00:05:09+00:00</updated>
<author>
<name>aguestuser</name>
<email>aguestuser@risup.net</email>
</author>
<published>2017-04-17T04:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://leap.se/git/bitmask_android.git/commit/?id=a7b4f463e4ffc282814ef74daf18c74581fc3a7d'/>
<id>a7b4f463e4ffc282814ef74daf18c74581fc3a7d</id>
<content type='text'>
* PROBLEM: the build fails on gitlab in a debian-based docker container
* BUT: i (@aguestuser) have a recently-achieved passing build on a
  debian laptop
* ATTEMPTED SOLUTION: construct a dockerfile that matches my local
  configuration as precisely as possible
* PROGRESS: the build gets further than it did before -- getting part of
  the way through the `buildNative` gradle script before failing
* REMAINING FAILURE: several arm64 cross-compile steps in the
  `ndk-build` step fail because they depend on
  [neon](https://developer.android.com/ndk/guides/cpu-arm-neon.html):

```shell
[arm64-v8a] Compile        : crypto_static &lt;= aesv8-armx-64.S
openssl/crypto/aes/asm/aesv8-armx-64.S:35:2: error: instruction requires: neon
 eor v0.16b,v0.16b,v0.16b
 ^
openssl/crypto/aes/asm/aesv8-armx-64.S:36:2: error: instruction requires: neon
 ld1 {v3.16b},[x0],#16
 ^
openssl/crypto/aes/asm/aesv8-armx-64.S:38:2: error: instruction requires: neon
 ld1 {v1.4s,v2.4s},[x3],#32
```

* PROPOSED NEXT STEPS:
  * consult team to see if there's any collective wisdom about `neon`
  * look for ways to analyze diff of c dependencies in local machine
    v. docker instance
  * consider using ubuntu or debian:sid as the base image for the
    android container?
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PROBLEM: the build fails on gitlab in a debian-based docker container
* BUT: i (@aguestuser) have a recently-achieved passing build on a
  debian laptop
* ATTEMPTED SOLUTION: construct a dockerfile that matches my local
  configuration as precisely as possible
* PROGRESS: the build gets further than it did before -- getting part of
  the way through the `buildNative` gradle script before failing
* REMAINING FAILURE: several arm64 cross-compile steps in the
  `ndk-build` step fail because they depend on
  [neon](https://developer.android.com/ndk/guides/cpu-arm-neon.html):

```shell
[arm64-v8a] Compile        : crypto_static &lt;= aesv8-armx-64.S
openssl/crypto/aes/asm/aesv8-armx-64.S:35:2: error: instruction requires: neon
 eor v0.16b,v0.16b,v0.16b
 ^
openssl/crypto/aes/asm/aesv8-armx-64.S:36:2: error: instruction requires: neon
 ld1 {v3.16b},[x0],#16
 ^
openssl/crypto/aes/asm/aesv8-armx-64.S:38:2: error: instruction requires: neon
 ld1 {v1.4s,v2.4s},[x3],#32
```

* PROPOSED NEXT STEPS:
  * consult team to see if there's any collective wisdom about `neon`
  * look for ways to analyze diff of c dependencies in local machine
    v. docker instance
  * consider using ubuntu or debian:sid as the base image for the
    android container?
</pre>
</div>
</content>
</entry>
</feed>
