在编译Mozilla Firefox时创建./config.data失败

时间:2017-03-19 09:31:32

标签: python c++ firefox mozilla

当我使用命令编译时,我的mozilla编译失败了。我只是使用mozilla的默认代码。

mach build

有以下错误

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

以下行给出错误

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

如何修复此问题。

2 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,这里的现有解决方案对我没有帮助。

我之前运行过./bootstrap.py,以安装系统级依赖项。

还有一个./mach bootstrap步骤在objdir中创建_virtualenv目录并在那里安装python模块。显然它没有考虑我的objdir配置,所以它安装在错误的目录中。然后构建不知何故只创造了一半。

我通过删除所有_virtualdev并再次启动./mach build来修复它。然后,这次会自动正确设置_virtualdev,并正确启动构建。

不需要./mach bootstrap,它会自动完成。不要使用make -f client.mk。它没有完成所有的自举。只需./bootstrap.py./mach build即可。

答案 1 :(得分:0)

mozilla-source \ mozilla-central \ python \ mozprocess 库中丢失了。 您需要从https://pypi.python.org/pypi/mozprocess/0.8下载 mozprocess 库并解压缩到 mozilla-source \ mozilla-central \ python \ 并再次编译。它应该编译好。