Closed Bug 887525 Opened 7 years ago Closed Last year

Error in mach build under Windows8 (desktop)


(Firefox Build System :: General, defect)

22 Branch
Windows 8
Not set


(Not tracked)



(Reporter: nickpeppper, Unassigned)


User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212

Steps to reproduce:

1) Fresh installed Windows 8 Enterprise (licensed), VS2012 Pro
2) did all as described here:
3) hg clone
4) vim .mozconfig
ac_add_options --enable-debug

# Enable parallel compiling
CONCURRENCY=$(( `grep processor /proc/cpuinfo | wc -l` + 2 ))
mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"

5) ./mach build

Actual results:

$ ./mach build
Error running mach:


The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.

Please consider filing a bug against mach by going to the URL:

If filing a bug, please include the full output of mach, including this error message.

The details of the failure are as follows:


  File "c:\mozilla-source\mozilla-central\python/mach\mach\", line 231, in run
    return self._run(argv)
  File "c:\mozilla-source\mozilla-central\python/mach\mach\", line 310, in _run
    instance = cls(context)
  File "c:\mozilla-source\mozilla-central\python/mozbuild\mozbuild\", line 454, in __init__
  File "c:\mozilla-source\mozilla-central\python/mozbuild\mozbuild\", line 190, in mozconfig
    self._mozconfig = loader.read_mozconfig()
  File "c:\mozilla-source\mozilla-central\python/mozbuild\mozbuild\", line 198, in read_mozconfig
    parsed = self._parse_loader_output(output)
  File "c:\mozilla-source\mozilla-central\python/mozbuild\mozbuild\", line 306, in _parse_loader_output
    assert current_type is not None

Expected results:

Normal mach build.
Version: 25 Branch → 22 Branch
Sorry, there was my fault:

# Enable parallel compiling
CONCURRENCY=$(( `grep processor /proc/cpuinfo | wc -l` + 2 ))
mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"

in .mozconfig under Windows was stupid.

Unfortunately I can't find no Windows example for ./mozconfig on the corresponding MDN page.
This is an old bug but hopefully I can help some people with this comment. I had been getting the same error and I could not figure out why.. Until I read the build instructions more closely.

Here are the steps I took to build a copy of Firefox:

1) download the Firefox sources to C:\Development\Firefox
2) create a blank mozconfig file at C:\Development\Firefox\mozconfig (without the . prefix)
3) download and install the MozillaBuild package to C:\mozilla-build
4) navigate to C:\mozilla-build
5) launch the shell for the version of Visual Studio I have installed (start-shell-msvc2012.bat)
6) change directory to C:\Development\Firefox\
7) execute the command ./mach build

At this stage, the build should commence and then you will just have to wait a while. I am not sure if step 2 necessary.

Make sure your MozillaBuild package is up-to-date if it is still not working.

The most important thing is: use the shell installed with MozillaBuild - NOT the command prompt or your own installation of Cygwin.
Component: Untriaged → Build Config
Closed: Last year
Resolution: --- → FIXED
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.