Multi-locale build for android doesn't work
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: julienw, Unassigned)
Details
Hi,
I want to test if the localization for some code I'm working on works on Android.
I tried to follow the documentation in https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html#instructions-for-multi-locale-builds
but I'm running into problems.
./mach build
and ./mach package
work fine.
But not ./mach package-multi-locale
.
Here is the full output:
$ LC_ALL=C ./mach package-multi-locale --locales de it zh-TW
0:00.25 Processing chrome Gecko resources for locales ['de', 'it', 'zh-TW']
0:00.25 /usr/bin/gmake -C /home/julien/travail/git/mozilla-central-android/obj-android-x86_64-opt -j32 -s chrome-de chrome-it chrome-zh-TW
0:00.28 gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:00.28 gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:00.28 gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:00.29 Cloning into '/home/julien/.mozbuild/l10n-central'...
0:00.29 fatal: destination path '/home/julien/.mozbuild/l10n-central' already exists and is not an empty directory.
0:00.29 fatal: destination path '/home/julien/.mozbuild/l10n-central' already exists and is not an empty directory.
0:00.30 gmake[2]: *** [/home/julien/travail/git/mozilla-central-android/toolkit/locales/l10n.mk:164: merge-zh-TW] Error 128
0:00.30 gmake[1]: *** [Makefile:57: chrome-zh-TW] Error 2
0:00.30 gmake: *** [/home/julien/travail/git/mozilla-central-android/mobile/android/build.mk:28: chrome-zh-TW] Error 2
0:00.30 gmake: *** Waiting for unfinished jobs....
0:00.30 gmake[2]: *** [/home/julien/travail/git/mozilla-central-android/toolkit/locales/l10n.mk:164: merge-de] Error 128
0:00.30 gmake[1]: *** [Makefile:57: chrome-de] Error 2
0:00.30 gmake: *** [/home/julien/travail/git/mozilla-central-android/mobile/android/build.mk:28: chrome-de] Error 2
0:11.20 Updating files: 65% (28705/43636)
[...snip]
0:11.78 Updating files: 100% (43636/43636), done.
0:12.75 BUILDSTATUS@mobile/android/branding/unofficial/locales START_jar_maker mobile/android/branding/unofficial/locales/jar.mn
0:12.85 BUILDSTATUS@mobile/android/branding/unofficial/locales END_jar_maker mobile/android/branding/unofficial/locales/jar.mn
0:12.86 BUILDSTATUS@mobile/android/locales START_jar_maker mobile/android/locales/jar.mn
0:12.95 BUILDSTATUS@mobile/android/locales END_jar_maker mobile/android/locales/jar.mn
Error running mach:
mach package-multi-locale --locales de it zh-TW
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file package-multi-locale`` to report it. If ``./mach busted`` is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
Exception: Process executed with non-0 exit code 2: /usr/bin/gmake -C /home/julien/travail/git/mozilla-central-android/obj-android-x86_64-opt -j32 -s chrome-de chrome-it chrome-zh-TW
File "/home/julien/travail/git/mozilla-central-android/python/mozbuild/mozbuild/mach_commands.py", line 3458, in package_l10n
command_context._run_make(
File "/home/julien/travail/git/mozilla-central-android/python/mozbuild/mozbuild/base.py", line 811, in _run_make
return fn(**params)
^^^^^^^^^^^^
File "/home/julien/travail/git/mozilla-central-android/python/mozbuild/mozbuild/base.py", line 817, in _run_command_in_objdir
return self.run_process(cwd=self.topobjdir, **args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/julien/travail/git/mozilla-central-android/python/mach/mach/mixin/process.py", line 194, in run_process
raise Exception(
Sentry event ID: 31830b02936a48e4a8c4902942ba0621
It looks like the code is trying to clone once for each locale, which fails.
Running the same command again gives a different error:
$ LC_ALL=C ./mach package-multi-locale --locales de it zh-TW
0:00.25 Processing chrome Gecko resources for locales ['de', 'it', 'zh-TW']
0:00.25 /usr/bin/gmake -C /home/julien/travail/git/mozilla-central-android/obj-android-x86_64-opt -j32 -s chrome-de chrome-it chrome-zh-TW
0:00.29 gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:00.29 gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:00.29 gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:00.68 fatal: Cannot rebase onto multiple branches.
0:00.69 gmake[2]: *** [/home/julien/travail/git/mozilla-central-android/toolkit/locales/l10n.mk:165: merge-de] Error 128
0:00.69 gmake[1]: *** [Makefile:57: chrome-de] Error 2
0:00.69 gmake: *** [/home/julien/travail/git/mozilla-central-android/mobile/android/build.mk:28: chrome-de] Error 2
0:00.69 gmake: *** Waiting for unfinished jobs....
0:00.69 fatal: Cannot rebase onto multiple branches.
0:00.69 gmake[2]: *** [/home/julien/travail/git/mozilla-central-android/toolkit/locales/l10n.mk:165: merge-it] Error 128
0:00.69 gmake[1]: *** [Makefile:57: chrome-it] Error 2
0:00.69 gmake: *** [/home/julien/travail/git/mozilla-central-android/mobile/android/build.mk:28: chrome-it] Error 2
0:00.88 BUILDSTATUS@mobile/android/branding/unofficial/locales START_jar_maker mobile/android/branding/unofficial/locales/jar.mn
0:01.02 BUILDSTATUS@mobile/android/branding/unofficial/locales END_jar_maker mobile/android/branding/unofficial/locales/jar.mn
0:01.02 BUILDSTATUS@mobile/android/locales START_jar_maker mobile/android/locales/jar.mn
0:01.13 BUILDSTATUS@mobile/android/locales END_jar_maker mobile/android/locales/jar.mn
Comment 1•19 days 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.
Reporter | ||
Updated•19 days ago
|
Comment 2•19 days ago
|
||
This looks like it's busted in https://searchfox.org/mozilla-central/rev/fa5b44a4ea5c98b6a15f39638ea4cd04dc271f3d/toolkit/locales/l10n.mk#163-176 -- surely fallout from Bug 1900421. It's probably possible to do the checkout in a robust manner, or do it in package-multi-locale
, or ...
It's worth deleting your existing ~/.mozbuild/l10n-central
directory and seeing if it works after that, since you may have an HG checkout that gets in the way.
Reporter | ||
Comment 3•19 days ago
|
||
Oh no, I've tried it already :-) this produces the first log.
If I'm not deleting it first, I get the second log instead.
Updated•18 days ago
|
Comment 4•14 days ago
|
||
It looks like this test is getting applied separately for each locale before the first git clone
two lines further down has created the directory.
Ben, didn't we hit and fix this issue already earlier?
A workaround to try would be to manually run
git clone https://github.com/mozilla-l10n/firefox-l10n.git ~/.mozbuild/l10n-central --depth 1
before the mach
command, but that really should not be necessary.
Comment 5•14 days ago
|
||
(In reply to Eemeli Aro [:eemeli] from comment #4)
It looks like this test is getting applied separately for each locale before the first
git clone
two lines further down has created the directory.Ben, didn't we hit and fix this issue already earlier?
A workaround to try would be to manually run
git clone https://github.com/mozilla-l10n/firefox-l10n.git ~/.mozbuild/l10n-central --depth 1
before the
mach
command, but that really should not be necessary.
To be honest, I haven't tested or tried repacks done in this style at all - I was pretty focused on the automation side of things when we migrated. It looks like https://bugzilla.mozilla.org/show_bug.cgi?id=1918304 is where we saw this before?
Perhaps we should be running test -d $(L10NBASEDIR)
instead of checking for a specific locale?
Reporter | ||
Comment 6•13 days ago
|
||
But how do we build (for example) a french build of Fenix these days? Do you know if we have some documentation about that?
Description
•