Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android nightly failing again #10339

Closed
Ms2ger opened this issue Apr 1, 2016 · 10 comments
Closed

Android nightly failing again #10339

Ms2ger opened this issue Apr 1, 2016 · 10 comments
Assignees
Labels

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Apr 1, 2016

CC @larsbergstrom

 (view as text)

./mach package -r
 in dir /home/servo/buildbot/slave/android-nightly/build (timeout 1200 secs)
 watching logfiles {}
 argv: ['./mach', 'package', '-r']
 environment:
  ANDROID_NDK=/home/servo/android/ndk/current/
  ANDROID_SDK=/home/servo/android/sdk/current/
  ANDROID_TOOLCHAIN=/home/servo/android/toolchain/current/
  CARGO_HOME=/home/servo/.cargo
  CCACHE=/usr/bin/ccache
  DISPLAY=:0
  HOME=/home/servo
  PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/home/servo/android/sdk/current/platform-tools:/home/servo/android/toolchain/current/bin
  PWD=/home/servo/buildbot/slave/android-nightly/build
  RUST_BACKTRACE=1
  SERVO_CACHE_DIR=/home/servo/.servo
  SHELL=/bin/bash
  TERM=linux
  UPSTART_INSTANCE=
  UPSTART_JOB=buildbot-slave
 using PTY: False
   Compiling winapi v0.2.5
   Compiling winapi-build v0.1.1
   Compiling kernel32-sys v0.2.1
   Compiling walkdir v0.1.5
   Compiling build-apk v0.0.1 (file:///home/servo/buildbot/slave/android-nightly/build/support/android/build-apk)
     Running `/home/servo/buildbot/slave/android-nightly/build/target/debug/build-apk  -o /home/servo/buildbot/slave/android-nightly/build/target/arm-linux-androideabi/release/servo.apk -t /home/servo/buildbot/slave/android-nightly/build/target/arm-linux-androideabi/release -r /home/servo/buildbot/slave/android-nightly/build`
Copying the file "/home/servo/buildbot/slave/android-nightly/build/target/arm-linux-androideabi/release/libservo.so" to "/home/servo/buildbot/slave/android-nightly/build/support/android/apk/jni/armeabi/libmain.so"
rm -f ./libs/arm64-v8a/lib*.so ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/armeabi-v7a-hard/lib*.so ./libs/mips/lib*.so ./libs/mips64/lib*.so ./libs/x86/lib*.so ./libs/x86_64/lib*.so
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/armeabi-v7a-hard/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/armeabi-v7a-hard/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
[armeabi] Prebuilt       : libmain.so <= jni/armeabi/
cp -f jni/armeabi/libmain.so obj/local/armeabi/libmain.so
[armeabi] Install        : libmain.so => libs/armeabi/libmain.so
install -p ./obj/local/armeabi/libmain.so ./libs/armeabi/libmain.so
/home/servo/android/ndk/r10e/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded  ./libs/armeabi/libmain.so
Error: Target id 'android-18' is not valid. Use 'android list targets' to get the target ids.
Error while updating the project with the android command
error: Process didn't exit successfully: `/home/servo/buildbot/slave/android-nightly/build/target/debug/build-apk  -o /home/servo/buildbot/slave/android-nightly/build/target/arm-linux-androideabi/release/servo.apk -t /home/servo/buildbot/slave/android-nightly/build/target/arm-linux-androideabi/release -r /home/servo/buildbot/slave/android-nightly/build` (exit code: 1)
Packaging Android exited with return value 1
program finished with exit code 1
elapsedTime=5.288602
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 2, 2016

Thanks!

I think this is just a failure to run the android android tool with the proper toolkits. I think we can hopefully just steal this from other folks' salt rules :-)

CC @edunham @aneeshusa

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Apr 2, 2016

My first guess would be that the menu entries in the output of android list sdk have changed. See https://github.com/servo/saltfs/blob/6e59cb1ed42c005e225c184d5809930b0c2c9906/servo-build-dependencies/android.sls#L50 for reference; if the menu entries have changed, 9 will no longer provide the android-18 target. This might happen if we update the SDK, for example.

Have there been any changes on the Android builders lately?

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Apr 2, 2016

I just ssh'ed into servo-linux-cross1 and the output of android list sdk indicates that the android-18 target is now 8 in the list, not 9.

However, this shouldn't matter - the proper SDK should already be installed from whenever we set up the builder.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 2, 2016

Aha! I think that we somewhat-recently upgraded SDK & NDK versions, because I remember having to propagate the changes to the environment variables.

I think that happened with the old builders (which would already have had the original SDKs installed) and now when we provisioned the new ones, the new bits were not installed.

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Apr 2, 2016

Nope, checking in the platforms subdir shows only android-19, not android-18, so it looks like this is the cause. The fact that the menu entries changed like that without a version bump is worrying!

I'll put in a PR for a quick fix, but I'll need to rejigger these states to work better long term.

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Apr 2, 2016

You're right, I bumped the SDK version in November. Maybe I don't need to fix the states after all.

Are these the first Android builds we've run on the new builders? I'm surprised we haven't had any other failures since moving to the cross builders.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 2, 2016

I think that the rest of the Android stuff is somehow working fine (it got the platform). The nightly build has been broken since the move, though, because though the platform is there the platform build tools are not. Those are only used in the android-nightly build - the others just need the headers to link against, etc.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 2, 2016

In fact, I think we only need the NDK for the rest of the Servo android build! It's only when we build the packaging and java library goop that we touch anything from the SDK.

@frewsxcv frewsxcv added the P-android label Apr 29, 2016
bors-servo added a commit to servo/saltfs that referenced this issue May 24, 2016
…24, r=larsbergstrom

Update android-18 menu entry to 8 for SDK r24

We're ignoring Travis builds for the cross builder and this fix needs to be verified in Vagrant (this VM takes a while to provision unfortunately). We may want to actually try running a build in Vagrant to see if this works.

We updated to Android SDK r24 in November from r23, but did not update
the menu entry to install the android-18 target. The new number comes
from the output of `./android sdk list`.

We need to delete the `/home/servo/android/sdk/r24.4.1` folder before applying this fix to the builders. Ideally this would get checked for by Salt, but currently you can only specify one file for the ` - creates: ` key of `cmd.run`, and our state creates the `platform-tools` dir and the `android-18` dir. I'll open a Salt issue for this.

cc @larsbergstrom, servo/servo#10339

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/290)
<!-- Reviewable:end -->
@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented May 25, 2016

servo/saltfs#290 landed and seems to have fixed the compile step: http://build.servo.org/builders/android-nightly/builds/57. Looking into the other failures now.

@aneeshusa aneeshusa mentioned this issue May 25, 2016
3 of 5 tasks complete
bors-servo added a commit that referenced this issue May 27, 2016
…brubeck

Fix Android APK building (packaging)

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [ ] These changes help with #10339.

Either:
- [x] There are tests for these changes (android-nightly builder) OR
- [ ] These changes do not require tests because _____

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

I missed this syntax error during my review, and we don't check that
packaging succeeds in regular build suite, but only as a Nightly build.

@larsbergstrom should we run the packaging as part of the regular build? I think it is important that this continue to stay working, especially with #9918. In that case, the only difference with the nightly builder is whether or not to upload to S3.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11406)
<!-- Reviewable:end -->
@aneeshusa aneeshusa self-assigned this May 27, 2016
bors-servo added a commit to servo/saltfs that referenced this issue Jun 20, 2016
Install Android build tools for cross compilation

The Android build tools are required for building an APK.
They are versioned separately from the SDK and do not have a version
requirement - best practice is to use the latest (stable) release.

After servo/servo#11406 landed, I forced an android-nightly build, which now gets further but still fails. The new failure is http://build.servo.org/builders/android-nightly/builds/60/steps/shell_1/logs/stdio, so install the build tools to fix this.

Edit: relevant error for posterity:
```
BUILD FAILED
/home/servo/android/sdk/current/tools/ant/build.xml:483: SDK does not have any Build Tools installed.
```

Another step for servo/servo#10339.

I think this would benefit from #374 - I had a lot of errors trying to get the android tool to install the build tools where blowing away the directory fixed it. I think the --all parameter should take care of it, but I'd like to be more sure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/388)
<!-- Reviewable:end -->
bors-servo added a commit to servo/saltfs that referenced this issue Jun 23, 2016
…larsbergstrom

Add --android option to ./mach package

servo/servo#11210 recently updated `./mach
package` to make it a first-class Mach command and add support for
simple Linux packaging as well (in the form of tarballs). Android used
to be the only packaging target supported, so a naked `./mach package`
sufficed, but now we need to explicitly build the Android packaging.

Another step for servo/servo#10339.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/401)
<!-- Reviewable:end -->
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jul 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.