Open Bug 1957023 Opened 26 days ago Updated 3 hours ago

Remove invocation of old-configure

Categories

(Firefox Build System :: General, task)

task

Tracking

(Not tracked)

REOPENED

People

(Reporter: sergesanspaille, Assigned: sergesanspaille, NeedInfo)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(1 file)

They should not be needed anymore now that we no longer perform any check there

This is done in the most failsafe way by making sure that all variables
that where previously set through MOZ_CREATE_CONFIG_STATUS() from
old-configure are still set from init.configure.

Some of them are probably not used by the build system but their removal
is left to another patch, as this excision is already a big change in
itself.

As a side effect, remove all m4-related configuration and usage.

Assignee: nobody → sguelton
Status: NEW → ASSIGNED
Attachment #9475387 - Attachment description: Bug 1957023 - Remove references to old-configure invocation r=glandium → Bug 1957023 - Remove references to old-configure invocation r=glandium!
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c45a3ebe23c Remove references to old-configure invocation r=glandium
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6bf16ef15dc Remove references to old-configure invocation r=glandium

Both failures were related to subtle changes in how we handles variables in configure scripts: they now need to be exported to be taken into account (thus allowing for local variables invisible to the scripts). If an exported variables is not handled by the configuration, we now get an error, which should avoid subtle mistakes too.

This all comes down from the fact that old-configure was just honoring every variable from the environment, we no longer have such implicit effects (explicit is better than implicit ;-))

Flags: needinfo?(sguelton)
Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
Regressions: 1961429

i have a smallish regression apparently from this bug, previously, my mozconfig had some export statements for CC/CXX/M4/LDFLAGS:

export LDFLAGS="-Wl,--no-keep-memory -Wl,--threads=5"
export CC=/usr/local/bin/clang-16
export CXX=/usr/local/bin/clang++-16
export RUSTFLAGS="-C codegen-units=1024 -C debuginfo=0 -Cstrip=none"
export M4=/usr/local/bin/gm4

since apparently this landed, configure fails because of the M4 variable:

~/src/m-c/ $mach configure
 0:00.73 Using Python 3.12.9 from /home/landry/.mozbuild/srcdirs/m-c-4d1cbf8c0e13/_virtualenvs/build/bin/python
 0:00.73 Adding configure options from /home/landry/src/m-c/.mozconfig
 0:00.74   --with-libclang-path=/usr/local/llvm16/lib
 0:00.74   --with-wasi-sysroot=/usr/local/share/wasi-sysroot
 0:00.74   --disable-dbus
 0:00.74   --with-system-av1
 0:00.74   --disable-tests
 0:00.74   RUSTFLAGS=-C codegen-units=1024 -C debuginfo=0 -Cstrip=none
 0:00.74   M4=/usr/local/bin/gm4
 0:00.74   CC=/usr/local/bin/clang-16
 0:00.74   AR=/usr/bin/ar
 0:00.74   LDFLAGS=-Wl,--no-keep-memory -Wl,--threads=5
 0:00.74   CXX=/usr/local/bin/clang++-16
...
 0:00.74 checking for vcs source checkout... git
 0:00.80 checking for a shell... /bin/sh
 0:00.83 checking for host system type... x86_64-unknown-openbsd7.7
 0:00.83 checking for target system type... x86_64-unknown-openbsd7.7
 0:01.04 checking whether cross compiling... no
 0:01.09 checking if configuration file confvars.sh exists... /home/landry/src/m-c/browser/confvars.sh
 0:01.09 checking if configuration file configure.sh exists... /home/landry/src/m-c/browser/branding/unofficial/configure.sh
 0:01.11 Traceback (most recent call last):
 0:01.11   File "/home/landry/src/m-c/configure.py", line 328, in <module>
 0:01.11     sys.exit(main(sys.argv))
 0:01.11              ^^^^^^^^^^^^^^
 0:01.11   File "/home/landry/src/m-c/configure.py", line 136, in main
 0:01.11     sandbox.run()
 0:01.11   File "/home/landry/src/m-c/python/mozbuild/mozbuild/configure/__init__.py", line 572, in run
 0:01.11     raise InvalidOptionError(msg)
 0:01.11 mozbuild.configure.options.InvalidOptionError: Unknown option: M4
*** Fix above errors and then restart with "./mach build"

my understanding of the commit is that previously "unused" exported env vars (i've figured out that the M4 env var wasnt needed anymore) were silently ignored, and now they're rejected ? dropping the export M4 line from .mozconfig allows mach configure to succeed.

i just hope that the same "reject" behaviour doesnt apply to real env vars, because build envs can have many :)

also it seems the tree isnt clean of non-exported env vars, eg https://searchfox.org/mozilla-central/source/build/unix/mozconfig.unix for example has CC= lines, but maybe those mozconfigs arent used by automation.

Regressions: 1961634
Regressions: 1961725

(In reply to Pulsebot from comment #5)

Pushed by sguelton@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6bf16ef15dc
Remove references to old-configure invocation r=glandium

Perfherder has detected a build_metrics performance change from push c6bf16ef15dc1d0fcb8f9a5fb87b5b0d66f25c77.

If you have any questions, please reach out to a performance sheriff. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
17% compiler_metrics num_static_constructors linux64 base-toolchains 194.50 -> 162.00

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a performance sheriff to do that for you.

You can run all of these tests on try with ./mach try perf --alert 44838

The following documentation link provides more information about this command.

Keywords: perf-alert
Status: RESOLVED → REOPENED
Flags: needinfo?(sguelton)
Resolution: FIXED → ---
Target Milestone: 139 Branch → ---
Attachment #9475387 - Attachment description: Bug 1957023 - Remove references to old-configure invocation r=glandium! → Bug 1957023 - Remove references to old-configure invocation r=glandium
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: