Closed Bug 1779986 Opened 3 years ago Closed 3 years ago

Spider monkey build issue

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: devashish.dalal, Unassigned)

Details

Steps to reproduce:

I have newly configured Windows 10 setup (Professional)

Following are the steps followed : -
1.Download and install the Build Tools for Visual Studio 2022 with following items for installation:

  • In the Workloads tab:
    ** Desktop development with C++.

  • In the Individual components tab:
    ** Windows 10 SDK (at least 10.0.19041.0).
    ** C++ ATL for v143 build tools (x86 and x64).

  1. Install latest Rust compiler from this link (https://www.rust-lang.org/tools/install)

  2. After installing rust compiler run the following commands:

  • rustup toolchain install stable-i686-pc-windows-msvc
  • rustup target add i686-pc-windows-msvc

4.Install latest python package from this link (https://www.python.org/)

5.Install MozillaBuild using the link ( https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe)

6.Start MozillaBuild shell. You can start it by running C:\mozilla-build\start-shell.bat (you may want to make a shortcut to this file so it’s easier to start)

  1. Bootstrap a copy of the Firefox source code by executing following commands :
  1. Update code to ESR91 by by executing following commands :
  • cd d:/
  • cd mozilla-source
  • cd mozilla-unified
  • hg up esr91

9.Create a fie with named as ‘mozconfig’ by putting the bellow lines:
For Debug Build:

Build only the SpiderMonkey JS test shell

ac_add_options --enable-application=js
ac_add_options --enable-debug
ac_add_options --disable-jemalloc
ac_add_options --target=i686-pc-mingw32
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-debug-@CONFIG_GUESS@

Create a environment variable named as ‘MOZCONFIG’ and value will be full path[with file name] of mozconfig file.

1.Start MozillaBuild shell.[c:\mozilla-build\start-shell.bat] then do the following:
-cd d:/mozilla-source/mozilla-unified
-./mach build
-./mach run [this is optional ,only for testing]

Actual results:

When I run "./mach build" it gives..
"This mach command requires D:\mozbuild/_virtualenvs/mach/Scripts/python, which wasn't found on the system!
Consider running 'mach bootstrap' or 'mach create-mach-environment' to create the mach virtualenvs, or set MACH_USE_SYSTEM_PYTHON to use the system Python installation over a virtualenv."

As recommended I tried to run "./mach bootstrap" .. that also gives following error

Error running mach:
['bootstrap']
The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.

You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file general| 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:

FileNotFoundError: [WinError 2] The system cannot find the file specified

File "D:\mozilla-source\mozilla-unified\python/mach\mach\main.py", line 368, in run
return self._run(argv)
File "D:\mozilla-source\mozilla-unified\python/mach\mach\main.py", line 458, in _run
report_invocation_metrics(context.telemetry, handler.name)
File "D:\mozilla-source\mozilla-unified\python/mach\mach\telemetry.py", line 87, in report_invocation_metrics
filter_args(command, sys.argv, instance.topsrcdir, instance.topobjdir)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\base.py", line 279, in topobjdir
self._topobjdir = self.resolve_mozconfig_topobjdir(
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\base.py", line 221, in resolve_mozconfig_topobjdir
topobjdir = self.mozconfig["topobjdir"] or default
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\base.py", line 369, in mozconfig
return self.mozconfig_and_target[0]
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\base.py", line 359, in mozconfig_and_target
return self.get_mozconfig_and_target(
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\util.py", line 1041, in call
self[args] = self.func(*args)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\base.py", line 348, in get_mozconfig_and_target
sandbox.value_for(sandbox["mozconfig_options"])
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 606, in _value_for
return self._value_for_depends(self.depends[obj])
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\util.py", line 1050, in method_call
cache[args] = self.func(instance, *args)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 618, in value_for_depends
value = obj.result()
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\util.py", line 1050, in method_call
cache[args] = self.func(instance, *args)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 156, in result
resolved_args = [self.sandbox.value_for(d) for d in self.dependencies]
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 156, in <listcomp>
resolved_args = [self.sandbox.value_for(d) for d in self.dependencies]
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 609, in _value_for
return self.value_for_depends(obj)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\util.py", line 1050, in method_call
cache[args] = self.func(instance, *args)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 618, in value_for_depends
value = obj.result()
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\util.py", line 1050, in method_call
cache[args] = self.func(instance, *args)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 157, in result
return self.func(*resolved_args)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\configure_init
.py", line 1287, in wrapped
return new_func(*args, **kwargs)
File "D:/mozilla-source/mozilla-unified/build/moz.configure/init.configure", line 173, in mozconfig
mozconfig = loader.read_mozconfig(mozconfig)
File "D:\mozilla-source\mozilla-unified\python/mozbuild\mozbuild\mozconfig.py", line 154, in read_mozconfig
subprocess.check_output(
File "C:\mozilla-build\python3\lib\subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\mozilla-build\python3\lib\subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\mozilla-build\python3\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\mozilla-build\python3\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

I am able to build it by moving back to previous moz build ..

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → Firefox Build System
Version: other → unspecified

Adding the QA not Actionable tag.

QA Whiteboard: [qa-not-actionable]

(In reply to Devashish Dalal from comment #2)

I am able to build it by moving back to previous moz build ..

This is expected. In MozillaBuild 4.0.0 we upgraded to MSYS2 and on esr91 we expect MSYS. You'll have to use the older version of MozillaBuild when working on older ESR versions due to this change/incompatibility.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.