Open Bug 1682081 Opened 3 years ago Updated 4 months ago

Visual Studio backend fails with --enable-application=tools/update-programs

Categories

(Firefox Build System :: General, defect, P5)

defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: agashlin, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

With ac_add_options --enable-application=tools/update-programs in my mozconfig (following the update-programs announcement), I get this error with ./mach configure:

0:25.97 Reticulating splines...
 0:31.82 Traceback (most recent call last):
 0:31.82   File "c:/mozilla-source/mozilla-central\configure.py", line 231, in <module>
 0:31.83     sys.exit(main(sys.argv))
 0:31.83   File "c:/mozilla-source/mozilla-central\configure.py", line 85, in main
 0:31.83     return config_status(config)
 0:31.83   File "c:/mozilla-source/mozilla-central\configure.py", line 226, in config_status
 0:31.83     return config_status(args=[], **sanitized_config)
 0:31.85   File "c:\mozilla-source\mozilla-central\python\mozbuild\mozbuild\config_status.py", line 177, in config_status
 0:31.85     the_backend.consume(definitions)
 0:31.85   File "c:\mozilla-source\mozilla-central\python\mozbuild\mozbuild\backend\base.py", line 146, in consume
 0:31.85     self.consume_finished()
 0:31.85   File "c:\mozilla-source\mozilla-central\python\mozbuild\mozbuild\backend\visualstudio.py", line 147, in consume_finished
 0:31.85     self._progs_to_paths, "binary", out_proj_dir
 0:31.85   File "c:\mozilla-source\mozilla-central\python\mozbuild\mozbuild\backend\visualstudio.py", line 254, in _write_projects_for_sources
 0:31.85     if item.startswith(self.environment.substs["MOZ_APP_NAME"]):
 0:31.85 KeyError: 'MOZ_APP_NAME'
Error running mach:

    ['configure']

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 configure| 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 1: ['c:\\Users\\Adam Gashlin\\.mozbuild\\_virtualenvs\\mach\\Scripts\\python.exe', 'c:/mozilla-source/mozilla-central\\configure.py']

  File "c:\mozilla-source\mozilla-central\python/mozbuild/mozbuild/build_commands.py", line 174, in configure
    line_handler=line_handler,
  File "c:\mozilla-source\mozilla-central\python/mozbuild\mozbuild\controller\building.py", line 1528, in configure
    append_env=append_env,
  File "c:\mozilla-source\mozilla-central\python/mozbuild\mozbuild\base.py", line 887, in _run_command_in_objdir
    return self.run_process(cwd=self.topobjdir, **args)
  File "c:\mozilla-source\mozilla-central\python/mach\mach\mixin\process.py", line 177, in run_process
    "Process executed with non-0 exit code %d: %s" % (status, args)

I tried adding --with-app-basename=Firefox to the mozconfig but it didn't change anything.

As a workaround, if I comment out the all_backends.append("VisualStudio") in moz.configure I can configure and build successfully.

This seems to have started after bug 1657954 changed how MOZ_APP_NAME is handled, I can't reproduce it on the commit before that landed. That removed MOZ_APP_BASENAME=Firefox from tools/update-programs/confvars.sh, but restoring it doesn't help. Maybe it doesn't expose it as an environment variable in the same way for other applications?

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Priority: -- → P3

Hmm, interesting! Let me see if I can reproduce this, I haven't set up a Visual Studio backend yet so let's see how easily do-able that is :)

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #1)

Hmm, interesting! Let me see if I can reproduce this, I haven't set up a Visual Studio backend yet so let's see how easily do-able that is :)

I don't use it, either, but it's enabled by default on Windows.

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #1)

Hmm, interesting! Let me see if I can reproduce this, I haven't set up a Visual Studio backend yet so let's see how easily do-able that is :)

mhentges: don't bother, this is a very strange build configuration that you shouldn't spend any time maintaining. If and when somebody in Install/Update needs it, I'll fix it.

An easy thing to do is to only enable this backend when building MOZ_APP_NAME == browser

Assignee: mhentges → nobody
Status: ASSIGNED → UNCONFIRMED
Ever confirmed: false
Priority: P3 → P5
Has Regression Range: --- → yes
Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.