Search code examples
pythonc++firefoxmozilla

creating ./config.data failed while compiling Mozilla Firefox


My mozilla compilation is failing while I am compiling with command. I am just using the default code from mozilla.

mach build

with followig error

2:39.43 creating ./config.data
 2:46.33
 2:53.91
 2:54.26 Creating config.status
 2:54.26 Traceback (most recent call last):
 2:54.26   File "c:/mozilla-source/mozilla-central/configure.py", line 124, in <module>
 2:54.26     sys.exit(main(sys.argv))
 2:54.26   File "c:/mozilla-source/mozilla-central/configure.py", line 34, in main
 2:54.26     return config_status(config)
 2:54.26   File "c:/mozilla-source/mozilla-central/configure.py", line 109, in config_status
 2:54.26     from mozbuild.config_status import config_status
 2:54.26   File "c:\mozilla-source\mozilla-central\python\mozbuild\mozbuild\config_status.py", line 21, in <module>
 2:54.26     from mozbuild.base import MachCommandConditions
 2:54.26   File "c:\mozilla-source\mozilla-central\python\mozbuild\mozbuild\base.py", line 17, in <module>
 2:54.26     from mach.mixin.process import ProcessExecutionMixin
 2:54.26   File "c:\mozilla-source\mozilla-central\python\mach\mach\mixin\process.py", line 14, in <module>
 2:54.26     from mozprocess.processhandler import ProcessHandlerMixin
 2:54.26 ImportError: No module named mozprocess.processhandler
 2:54.37 *** Fix above errors and then restart with\
 2:54.37                "c:/mozilla-build/mozmake/mozmake.EXE -f client.mk build"
 2:54.39 c:/mozilla-source/mozilla-central/client.mk:379: recipe for target 'configure' failed
 2:54.39 mozmake.EXE[2]: *** [configure] Error 1
 2:54.39 c:/mozilla-source/mozilla-central/client.mk:396: recipe for target 'c:/mozilla-source/mozilla-central/obj-i686-pc-mingw32/Makefile' failed
 2:54.39 mozmake.EXE[1]: *** [c:/mozilla-source/mozilla-central/obj-i686-pc-mingw32/Makefile] Error 2
 2:54.39 client.mk:170: recipe for target 'build' failed
 2:54.39 mozmake.EXE: *** [build] Error 2
 2:54.41 0 compiler warnings present.
2

The following line is giving the error

if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
    os.environ[b'WRITE_MOZINFO'] = b'1'
    from mozbuild.config_status import config_status

How to fix this one.


Solution

  • I ran into the same problem, and the existing solutions here didn't help me.

    I had run ./bootstrap.py before, to install the system-level dependencies.

    There is also a ./mach bootstrap step that creates a _virtualenv dir in objdir and installs the python modules there. Apparently it didn't consider my objdir configuration, so it installed in the wrong dir. Then the build somehow only half-created it.

    I fixed it by deleting all _virtualdev, and starting ./mach build again. That then automatically set up _virtualdev correctly this time, and started the build correctly.

    No need for ./mach bootstrap, it will be done automatically. Don't use make -f client.mk. It doesn't do all the bootstrapping. Just ./bootstrap.py and ./mach build should suffice.