Closed Bug 1561323 Opened 5 years ago Closed 5 years ago

Spurious reconfigures (and rebuilds)


(Firefox Build System :: General, defect)

Not set


(firefox-esr60 unaffected, firefox-esr68 wontfix, firefox68 wontfix, firefox69 wontfix, firefox70 fixed)

Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed


(Reporter: snorp, Assigned: snorp)




(Keywords: in-triage, regression)


(1 file)

Recently, some invocations of mach build and gradle commands are causing a reconfigure and rebuild. I'll try to collect some relevant logs.

I've only been seeing this when building for Android so far.

It's easily reproducible if I try to run a mochitest:

$ ./mach mochitest --app org.mozilla.geckoview.test dom/security/test
Test configuration changed. Regenerating backend.
 0:00.36 adb INFO Using adb 1.0.41
 0:00.60 adb INFO adbd running as root
 0:00.71 adb INFO setenforce 0 exitcode 0, stdout: None
 0:00.94 adb INFO su 0 supported
 0:01.16 adb INFO /system/bin/ls -1A supported
 0:01.27 adb INFO Native cp support: True
 0:01.39 adb INFO Native chmod -R support: True
 0:01.50 adb INFO Native chown -R support: True
 0:01.61 adb INFO Setting SELinux Permissive
 0:01.95 adb INFO Native pidof support: True
It looks like org.mozilla.geckoview.test is not installed on this device.
Install geckoview AndroidTest? (Y/n) y
Installing geckoview AndroidTest. This may take a while...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf-8
Parallel execution is an incubating feature.

> Task :machBuildFaster
Executing task :machBuildFaster
:machBuildFaster>  /home/snorp/source/objdirs/objdir-android-opt/config.status is out of date with respect to /home/snorp/source/objdirs/objdir-android-opt/.mozconfig.json
:machBuildFaster>  0:00.65 Clobber not needed.
:machBuildFaster>  0:00.65 Adding make options from /home/snorp/source/gecko/mozconfig
:machBuildFaster>     AUTOCLOBBER=1
:machBuildFaster>     MOZ_OBJDIR=/home/snorp/source/objdirs/objdir-android-opt
:machBuildFaster>     OBJDIR=/home/snorp/source/objdirs/objdir-android-opt
:machBuildFaster>     FOUND_MOZCONFIG=/home/snorp/source/gecko/mozconfig
:machBuildFaster>     export FOUND_MOZCONFIG
:machBuildFaster>  0:00.65 /usr/bin/gmake -f -s configure
:machBuildFaster>  0:00.67 cd /home/snorp/source/objdirs/objdir-android-opt
:machBuildFaster>  0:00.67 /home/snorp/source/gecko/configure
:machBuildFaster>  0:00.78 Reexecuting in the virtualenv
:machBuildFaster>  0:00.98 Adding configure options from /home/snorp/source/gecko/mozconfig
:machBuildFaster>  0:00.98   --enable-debug
:machBuildFaster>  0:00.98   --enable-optimize
:machBuildFaster>  0:00.98   --enable-application=mobile/android
:machBuildFaster>  0:00.98   --target=i686-linux-android
:machBuildFaster>  0:00.98   --with-android-ndk=/home/snorp/.mozbuild/android-ndk-r17b
:machBuildFaster>  0:00.98   --with-android-sdk=/home/snorp/.mozbuild/android-sdk-linux
:machBuildFaster>  0:00.98   --enable-rust-simd
:machBuildFaster>  0:00.98   --enable-linker=lld
:machBuildFaster>  0:00.98   --enable-warnings-as-errors
:machBuildFaster>  0:00.98   --disable-elf-hack
:machBuildFaster>  0:00.98   CXX=/home/snorp/.mozbuild/clang/bin/clang++
:machBuildFaster>  0:00.98   CC=/home/snorp/.mozbuild/clang/bin/clang

This is essentially Bug 1543982. The issue is that mach build doesn't play nicely with re-entrancy; mach build itself changes its process environment in such a way that it thinks it needs to reconfigure. I tried to work around that in Bug 1543982 but it's whack-a-mole.

snorp: try removing the CC= and CXX= lines from your mozconfig. Those are the defaults now anyway, after Bug 1557213.

Flags: needinfo?(snorp)
Regressed by: 1543982

It looks like removing CC= and CXX= may have fixed it.

Flags: needinfo?(snorp)

Eh, still getting reconfigures even without that. My mozconfig is:

mk_add_options MOZ_OBJDIR="$HOME/source/objdirs/objdir-android-opt" AUTOCLOBBER=1

ac_add_options --enable-debug
ac_add_options --enable-optimize

# Build Fennec
ac_add_options --enable-application=mobile/android

# Android
#ac_add_options --target=aarch64-linux-android
#ac_add_options --target=x86_64-linux-android
#ac_add_options --target=arm-linux-androideabi
ac_add_options --target=i686-linux-android

ac_add_options --with-android-ndk="$HOME/.mozbuild/android-ndk-r17b"
ac_add_options --with-android-sdk="$HOME/.mozbuild/android-sdk-linux"
ac_add_options --enable-rust-simd
ac_add_options --enable-linker=lld
ac_add_options --enable-warnings-as-errors

# Build options
ac_add_options --disable-elf-hack
Pushed by
Fix spurious reconfigure problem with debug builds r=nalexander,froydnj
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → snorp
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.