我正在尝试在 Linux Mint 18.1 上构建 Firefox 51.0.2 的稳定(发布)版本。
我收到一条奇怪的错误消息,但无法找到有关其含义的任何信息。./mach build
失败并出现错误,ERROR: old-configure failed
。
我在网上找到的唯一答案是,当没有 mozconfig 文件时可能会发生这种情况,但我有一个。我还验证了用于构建的用户具有对整个源代码树的读写权限。
在错误之前的几行,有这样一行:
js/src> /bin/sh: 1: ./config.status: Permission denied
但我找不到该文件,并且目录上的所有权限都应该允许读取和写入。
有人可以告诉我为什么会出现这个错误吗?
构建命令的最后几行输出是:
0:16.41 js/src> creating ./config.data
0:16.41 js/src> Creating config.status
0:16.41 js/src> /bin/sh: 1: ./config.status: Permission denied
0:16.41
0:19.48 DEBUG: <truncated - see config.log for full output>
0:19.48 DEBUG: configure:17869: checking GLIB_LIBS
0:19.48 DEBUG: configure:17924: checking for freetype2 >= 6.1.0
0:19.49 DEBUG: configure:17931: checking FT2_CFLAGS
0:19.49 DEBUG: configure:17936: checking FT2_LIBS
0:19.49 DEBUG: configure:17973: checking for FT_Bitmap_Size.y_ppem
0:19.49 DEBUG: configure:17988: /usr/bin/gcc -std=gnu99 -c -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 conftest.c 1>&5
0:19.49 DEBUG: configure:18017: checking for FT_GlyphSlot_Embolden
0:19.49 DEBUG: configure:18049: /usr/bin/gcc -std=gnu99 -o conftest -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B Builds/51/src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl -lfreetype 1>&5
0:19.49 DEBUG: configure:18017: checking for FT_Load_Sfnt_Table
0:19.49 DEBUG: configure:18049: /usr/bin/gcc -std=gnu99 -o conftest -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B Builds/51/src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl -lfreetype 1>&5
0:19.49 DEBUG: configure:18087: checking for fontconfig/fcfreetype.h
0:19.49 DEBUG: configure:18100: /usr/bin/gcc -std=gnu99 -c -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 conftest.c 1>&5
0:19.49 DEBUG: configure:18151: checking for fontconfig >= 2.7.0
0:19.49 DEBUG: configure:18158: checking _FONTCONFIG_CFLAGS
0:19.49 DEBUG: configure:18163: checking _FONTCONFIG_LIBS
0:19.49 DEBUG: configure:19472: checking for posix_fadvise
0:19.49 DEBUG: configure:19504: /usr/bin/gcc -std=gnu99 -o conftest -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B Builds/51/src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl 1>&5
0:19.49 DEBUG: configure:19472: checking for posix_fallocate
0:19.49 DEBUG: configure:19504: /usr/bin/gcc -std=gnu99 -o conftest -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B Builds/51/src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl 1>&5
0:19.49 DEBUG: configure:19555: /usr/bin/gcc -std=gnu99 -c -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe conftest.c 1>&5
0:19.49 ERROR: old-configure failed
0:19.51 *** Fix above errors and then restart with\
0:19.51 "/usr/bin/make -f client.mk build"
0:19.51 client.mk:373: recipe for target 'configure' failed
0:19.51 make: *** [configure] Error 1
答案1
由于这个错误,如果构建目录的路径太长(超过 103 个字符),configure 将无法找到config.status
.解决方法是将源代码放在较短的路径中,例如home/you/firefox
并在那里构建它。