mach mochitest doesn't work for Android emulator
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: hiro, Assigned: ahochheiden)
References
Details
Attachments
(1 file, 1 external file)
|
7.52 KB,
text/plain
|
Details |
I am quite unsure this component is the right component for this issue. Anyway, whenever I run mach mochitest, it fails with an weird error message.
Attaching file contains the error message.
The mach mochitest command tries to build then fails to find C compiler.
Oddly mach build can find the proper C compiler:
0:01.24 checking whether the target C compiler can be used... yes
0:01.24 checking for the target C++ compiler... /home/hiro/.mozbuild/clang/bin/clang++
0:01.25 checking whether the target C++ compiler can be used... yes
My local mozconfig just has:
mk_add_options MOZ_PARALLEL_BUILD=20
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-project=mobile/android
ac_add_options --enable-debug
Comment 1•1 month ago
|
||
The severity field is not set for this bug.
:florian, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 month ago
|
Comment 2•1 month ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)
I am quite unsure this component is the right component for this issue.
Tentatively moving to the android build system component.
Comment 3•1 month ago
|
||
The severity field is not set for this bug.
:polly, could you have a look please?
For more information, please visit BugBot documentation.
Comment 4•1 month ago
|
||
GypProcessor set CC and CFLAGS in os.environ of the calling process (for NSS's gyp, which shells out to $CC). When mach mochitest (via moztest's BuildBackendLoader, "Test configuration changed. Regenerating backend.") regenerates the build backend in-process, those variables then stay set for the rest of the mach invocation. The subsequent mach android install-geckoview-test_runner gradle run inherits CC, and MachTasksPlugin's normalizedMachEnv rewrites it from the list-valued CC subst as "/path/clang,--target=x86_64-linux-android26", making the reentrant configure in :machBuildFaster fail with "Cannot find the target C compiler".
Gyp files are loaded in ProcessPoolExecutor workers, so set those variables in the worker (in load_gyp) and leave the parent's environment alone.
Separately, the gradle plugin comma-joining every list-valued subst that also exists as an env var (meant for GRADLE_MAVEN_REPOSITORIES) is fragile for things like CC. It may be worth limiting that to the substs that really are comma-separated options.
Comment 5•1 month ago
|
||
i intended to get hackbot to triage this but it seems to have submitted a fix (:
given that the entire proposed fix is outside the android gradle area, i will try and find a more suitable component to expose this to the required expertise to progress it
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Comment 6•1 month ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Android Studio and Gradle Integration' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 12•1 month ago
|
||
Comment 13•1 month ago
|
||
| bugherder | ||
Description
•