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

Fix Android build jobs #1344

Merged
merged 25 commits into from May 23, 2019
Merged

Fix Android build jobs #1344

merged 25 commits into from May 23, 2019

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented May 16, 2019

No description provided.

@rust-highfive
Copy link

@gnzlbg: no appropriate reviewer found, use r? to override

@mati865
Copy link
Contributor

mati865 commented May 16, 2019

For

Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found

you should replace

with openjdk-8-jdk.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 16, 2019

That used to work with the old NDK 15, but if interpreted the errors from the previous build correctly, doesn't work with the NDK19c. AFAICT, downgrading this to openjdk 10 should work, but should not work with the ndk20, which is in beta, so... i'm trying to see if there is a way to make this work with openjdk 11 and if not, i'll downgrade java till it works.

@mati865
Copy link
Contributor

mati865 commented May 16, 2019

java.se.ee was deprecated in Java 9 and 10 to be finally removed in 11.
Ubuntu 19.04 repository contains OpenJDK 8, 11, 12 and 13.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 16, 2019

Oh, damn.

ci/android-install-sdk.sh Outdated Show resolved Hide resolved
ci/android-install-sdk.sh Outdated Show resolved Hide resolved
@gnzlbg gnzlbg force-pushed the fix_android_bj branch 2 times, most recently from bf43349 to 2cf78df Compare May 16, 2019 12:23
@bors
Copy link
Contributor

bors commented May 16, 2019

☔ The latest upstream changes (presumably #1335) made this pull request unmergeable. Please resolve the merge conflicts.

@gnzlbg gnzlbg force-pushed the fix_android_bj branch 2 times, most recently from 867b0d7 to 23150ec Compare May 16, 2019 12:44
@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 16, 2019

Progress, now:

The job exceeded the maximum log length, and has been terminated.

@mati865
Copy link
Contributor

mati865 commented May 16, 2019

I'd rather silence unzip by adding -q but whatever.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 16, 2019

@mati865 we can do that to, unzip does dump quite a bit of output, but sdkmanager dumps 90% of the raw log file (check the raw output).

@mati865
Copy link
Contributor

mati865 commented May 16, 2019

It didn't show on the website but you are right that progress bar was horrible.

@gnzlbg gnzlbg force-pushed the fix_android_bj branch 2 times, most recently from 6a598d8 to 3ff2bd8 Compare May 16, 2019 13:39
@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 16, 2019

So now the x86 and x86_64 targets are green, but the arm and aarch64 targets fail to link:

= note: /android/ndk-arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
          /android/ndk-arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
          /android/ndk-arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -llog
          external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork'
          external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork'
          external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork'
          external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork'
          external/jemalloc/src/jemalloc.c:1358: error: undefined reference to 'atexit'
          clang80: error: linker command failed with exit code 1 (use -v to see invocation)

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 16, 2019

Also, this error:

cannot find crtbegin_dynamic.o: No such file or directory
          clang80: error: linker command failed with exit code 1 (use -v to see invocation)

@mati865
Copy link
Contributor

mati865 commented May 19, 2019

I think you might have picked unfortunate API version for arm and aarch64:

find missing numbers 😆
$ find . -name "crtbegin_dynamic.o" | sort 
./platforms/android-16/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-16/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-17/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-17/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-18/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-18/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-19/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-19/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-21/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-21/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-21/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-21/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-22/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-22/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-22/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-22/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-23/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-23/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-23/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-23/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-24/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-24/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-24/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-24/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-26/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-26/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-26/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-26/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-27/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-27/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-27/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-27/arch-x86/usr/lib/crtbegin_dynamic.o
./platforms/android-28/arch-arm64/usr/lib/crtbegin_dynamic.o
./platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o
./platforms/android-28/arch-x86_64/usr/lib64/crtbegin_dynamic.o
./platforms/android-28/arch-x86/usr/lib/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/23/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/26/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/27/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/28/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/16/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/17/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/18/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/19/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/21/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/22/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/23/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/24/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/26/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/27/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/28/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/16/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/17/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/18/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/19/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/21/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/22/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/23/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/24/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/26/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/27/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/28/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/22/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/23/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/26/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/27/crtbegin_dynamic.o
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/28/crtbegin_dynamic.o

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 21, 2019

@mati865, that's accuracy 😆

We have to pick an NDK that has these, for which also a corresponding SDK image exists so that we can run the tests in the emulator, but there appear to be no SDK images for APIs > 25 for arm64 = /

I don't recall if there were images for API == 24, but we need to find the intersection of NDK version that links properly and SDK with an emulator image for it to be able to run the tests.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 22, 2019

So @mati865 the build is now green with API 24. I've started cleaning up the build.rs for Android here, and I've run into ENOATTR. IIUC the motivation for adding it here was that #1030 it was available, as opposed as in Linux, and therefore the workaround wasn't necessary. But then... test failed, making the workaround necessary, yet the PR was merged anyways.

@mati865
Copy link
Contributor

mati865 commented May 22, 2019

Yeah it's absent in NDK. Somehow it worked in toolchain I used back then, sorry for that.

@bors
Copy link
Contributor

bors commented May 22, 2019

☔ The latest upstream changes (presumably #1355) made this pull request unmergeable. Please resolve the merge conflicts.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 23, 2019

let's land this

@bors: r+

@bors
Copy link
Contributor

bors commented May 23, 2019

📌 Commit ea31f5a has been approved by gnzlbg

bors added a commit that referenced this pull request May 23, 2019
@bors
Copy link
Contributor

bors commented May 23, 2019

⌛ Testing commit ea31f5a with merge f775bea...

@bors
Copy link
Contributor

bors commented May 23, 2019

☀️ Test successful - checks-cirrus, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing f775bea to master...

@bors bors merged commit ea31f5a into rust-lang:master May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants