Closed Bug 1637429 Opened 5 years ago Closed 5 years ago

:glean:assembleDebug failed: Toolchain for arch arm version 21 does not exist

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcomella, Assigned: janerik)

References

Details

(Whiteboard: [telemetry:glean-rs:m?])

Attachments

(1 file)

I'm trying to build a local version of Glean to put into android-components. I followed the guide – https://mozilla.github.io/glean/book/dev/android/setup-android-build-environment.html?highlight=android-components#doing-a-local-build-of-the-android-components – but the build fails. The build command I run (because the guide does not specify a specific one) is ./gradlew :gradle:assembledebug.

I get the following failure:

> Task :glean:generateToolchains FAILED
Toolchain for arch arm version 21 does not exist: checked /var/folders/p5/rz_tx0_51vgbs4kryfg7q17c0000gn/T/rust-android-ndk-toolchains/arm-21
/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/Resources/
Python.app/Contents/MacOS/Python: can't open file 'null/build/tools/make_standalone_toolchain.py': [Errno 2] No such file or directory

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':glean:generateToolchains'.
> Process 'command 'python'' finished with non-zero exit value 2

I'm not totally sure but this null/build/tools/make_standalone_toolchain.py makes me think that ANDROID_NDK_HOME isn't set (or being picked up).

Michael, do you have ANDROID_NDK_HOME defined somewhere?
This is something we're not calling out in our docs, so it's definitely a bug on our end. If you could confirm that's the problem, then we'll take care of updating the docs.

Sorry for the inconvenience!

Flags: needinfo?(michael.l.comella)
Priority: -- → P3
Whiteboard: [telemetry:glean-rs:m?]

Setting ANDROID_NDK_HOME fixed the issue and I can now compile – thanks!

I will also note that the suggested ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle from the docs seems to be incorrect: /Users/mcomella/Library/Android/sdk/ndk/21.1.6352462 is what worked for me (for both NDK_HOME and NDK_ROOT).

Flags: needinfo?(michael.l.comella)

ANDROID_NDK_HOME=$ANDROID_HOME/ndk also does not seem to work (I double checked because keeping the version up-to-date sounds messy).

I'll double-check the docs on this and will update them accordingly.

Assignee: nobody → jrediger
Priority: P3 → P1
See Also: → 1638448
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: