Firefox build lld-link:error: 写入输出文件失败:权限被拒绝

时间:2021-03-12 07:51:20

标签: firefox build

我正在尝试构建 Mozilla Firefox 代码,但遇到此错误:

0:20.09 checking host system type... x86_64-pc-mingw32
0:21.22 checking target system type... x86_64-pc-mingw32
0:22.26 checking build system type... x86_64-pc-mingw32
0:23.18 checking for Cygwin environment... no
0:23.98 checking for mingw32 environment... no
0:24.66 checking for executable suffix... configure: error: installation or con
figuration problem: compiler cannot create executables.
0:24.69 DEBUG: <truncated - see config.log for full output>
0:24.69 DEBUG: #endif
0:24.69 DEBUG: return __CYGWIN__;
0:24.69 DEBUG: ; return 0; }
0:24.71 DEBUG: configure:871: checking for mingw32 environment
0:24.71 DEBUG: configure:883: c:/Users/Moonchild/.mozbuild/clang/bin/clang-cl.e
xe -Xclang -std=gnu99 -c   conftest.c 1>&5
0:24.73 DEBUG: configure(879,8): error: use of undeclared identifier '__MINGW32__'
0:24.73 DEBUG: return __MINGW32__;
0:24.73 DEBUG:        ^
0:24.73 DEBUG: 1 error generated.
0:24.73 DEBUG: configure: failed program was:
0:24.73 DEBUG: #line 876 "configure"
0:24.74 DEBUG: #include "confdefs.h"
0:24.74 DEBUG:
0:24.74 DEBUG: int main() {
0:24.74 DEBUG: return __MINGW32__;
0:24.74 DEBUG: ; return 0; }
0:24.74 DEBUG: configure:902: checking for executable suffix
0:24.74 DEBUG: configure:912: c:/Users/Moonchild/.mozbuild/clang/bin/clang-cl.exe -Xclang -std=gnu99 -c   conftest.c 1>&5 && c:/Users/Moonchild/.mozbuild/clang/bin/lld-link.exe -OUT:conftest   conftest.obj  1>&5
0:24.74 DEBUG: lld-link: error: failed to write the output file: permission denied
0:24.76 DEBUG: configure: error: installation or configuration problem: compiler cannot create executables.
0:24.76 ERROR: old-configure failed

在完全按照 Mozilla 的构建指南(包括建议的默认目录名称和所有内容)运行 bootstrap.py 之后,这是一个全新的、完全更新的 Windows 7 虚拟机。 使用的用户帐户是管理员级别,因此文件系统上不应存在任何写入权限错误。我还没有在 Mozilla 的聊天室中得到关于这个问题的答案,所以我想我也会把它扔在这里,以防其他人遇到同样的问题并知道如何解决这个问题。

1 个答案:

答案 0 :(得分:0)

显然这是 Mozilla 专门工具版本的 clang 11 的一个问题,该版本通过引导脚本被拉下。从 Mozilla 的 CI 中删除旧的 clang 版本可以让人们克服这一点。

另见:https://bugzilla.mozilla.org/show_bug.cgi?id=1699228

相关问题