Hi,
I’m on Windows and have been compiling my own FF in the past which worked fine until FF85. Since then every build I did failed. I even tried a completely new installation of the build environment along with a new Mercurial pull. Nothing worked. So today I tried again and still got the same error.
I guess this is the error:
configure(879,8): error: use of undeclared identifier '__MINGW32__'.
Any idea how to fix this?
Thank you
Log attached:
$ mach build
0:01.14 Clobber not needed.
Config object not found by mach.
0:01.48 ...\mozbuild\_virtualenvs\mach\Scripts\python.exe .../mozilla-source/mozilla-release\configure.py
0:02.26 Re-executing in the virtualenv
0:03.31 Adding configure options from ...\mozilla-source\mozilla-release\mozconfig
0:03.31 --disable-debug
0:03.31 --disable-debug-symbols
0:03.31 checking for vcs source checkout... hg
0:03.37 checking for a shell... .../mozilla-build/msys/bin/sh.exe
0:03.38 checking for host system type... x86_64-pc-mingw32
0:03.40 checking for target system type... x86_64-pc-mingw32
0:04.05 checking whether cross compiling... no
0:04.25 checking for Python 3... .../mozilla-source/mozilla-release/obj-x86_64-pc-mingw32/_virtualenvs/init_py3/Scripts/python.exe
(3.7.4)
0:04.25 checking for hg... .../mozilla-build/python/Scripts/hg.exe
0:04.41 checking for Mercurial version... 5.1.2
0:04.63 checking for sparse checkout... no
0:04.63 checking for wget... .../mozilla-build/bin/wget.exe
0:04.77 checking for ccache... not found
0:04.78 checking for the target C compiler... .../mozbuild/clang/bin/clang-cl.exe
0:07.29 checking whether the target C compiler can be used... yes
0:07.30 checking the target C compiler version... 11.0.1
0:07.35 checking the target C compiler works... yes
0:07.35 checking for the target C++ compiler... .../mozbuild/clang/bin/clang-cl.exe
0:07.45 checking whether the target C++ compiler can be used... yes
0:07.45 checking the target C++ compiler version... 11.0.1
0:07.49 checking the target C++ compiler works... yes
0:07.50 checking for the host C compiler... .../mozbuild/clang/bin/clang-cl.exe
0:07.59 checking whether the host C compiler can be used... yes
0:07.59 checking the host C compiler version... 11.0.1
0:07.65 checking the host C compiler works... yes
0:07.66 checking for the host C++ compiler... .../mozbuild/clang/bin/clang-cl.exe
0:07.75 checking whether the host C++ compiler can be used... yes
0:07.75 checking the host C++ compiler version... 11.0.1
0:07.79 checking the host C++ compiler works... yes
0:07.84 checking for 64-bit OS... yes
0:07.89 checking for Windows SDK... 0x0a00 in 'C:\Program Files (x86)\Windows Kits\10\'
0:07.89 checking for Universal CRT SDK... 10.0.18362.0 in 'C:\Program Files (x86)\Windows Kits\10\'
0:07.89 checking for the Debug Interface Access SDK... ...\MICROS~2\2019\COMMUN~1\DIA SDK
0:07.90 checking for linker... .../mozbuild/clang/bin/lld-link.exe
0:07.91 checking for host_linker... .../mozbuild/clang/bin/lld-link.exe
0:07.91 checking for the assembler... .../MICROS~2/2019/COMMUN~1/VC/Tools/MSVC/1423~1.281/bin/HostX64/x64/ml64.exe
0:07.92 checking for rc... .../mozbuild/clang/bin/llvm-rc.exe
0:07.92 checking for ar... .../mozbuild/clang/bin/llvm-lib.exe
0:07.93 checking for pkg_config... not found
0:08.30 checking for stdint.h... yes
0:08.38 checking for inttypes.h... yes
0:08.44 checking for malloc.h... yes
0:08.51 checking for alloca.h... no
0:08.56 checking for sys/byteorder.h... no
0:08.61 checking for getopt.h... no
0:08.66 checking for unistd.h... no
0:08.70 checking for nl_types.h... no
0:08.77 checking for cpuid.h... yes
0:08.81 checking for fts.h... no
0:08.86 checking for sys/statvfs.h... no
0:08.91 checking for sys/statfs.h... no
0:08.95 checking for sys/vfs.h... no
0:09.00 checking for sys/mount.h... no
0:09.05 checking for sys/quota.h... no
0:09.09 checking for sys/queue.h... no
0:09.14 checking for sys/types.h... yes
0:09.19 checking for netinet/in.h... no
0:09.23 checking for byteswap.h... no
0:09.28 checking for memfd_create in sys/mman.h... no
0:09.34 checking for perf_event_open system call... no
0:09.38 checking for llvm_profdata... .../mozbuild/clang/bin/llvm-profdata.exe
0:09.40 checking for rustc... c:/Users/xx/.cargo/bin/rustc.exe
0:09.41 checking for cargo... c:/Users/xx/.cargo/bin/cargo.exe
0:09.86 Actually using 'C:\Users\xx\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe'
0:10.06 Actually using 'C:\Users\xx\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo.exe'
0:10.08 checking rustc version... 1.49.0
0:10.11 checking cargo version... 1.49.0
0:11.19 checking for rust host triplet... x86_64-pc-windows-msvc
0:11.27 checking for rust target triplet... x86_64-pc-windows-msvc
0:11.27 checking for rustdoc... c:/Users/xx/.cargo/bin/rustdoc.exe
0:11.37 checking for cbindgen... .../mozbuild/cbindgen/cbindgen.exe
0:11.38 checking for rustfmt... c:/Users/xx/.cargo/bin/rustfmt.exe
0:14.69 checking for clang for bindgen... .../mozbuild/clang/bin/clang.exe
0:14.73 checking for libclang for bindgen... .../mozbuild/clang/bin/libclang.dll
0:15.77 checking that libclang is new enough... yes
0:15.77 checking bindgen cflags... -x c++ -fno-sized-deallocation -fno-aligned-new -DTRACING=1 -DIMPL_LIBXUL -DMOZILLA_INTERNAL_API -DRUST_
BINDGEN -DOS_WIN=1 -DWIN32=1 -D_CRT_USE_BUILTIN_OFFSETOF -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -std=gnu++17
0:17.27 checking for nodejs... ...\mozbuild\node\node.EXE (10.23.1)
0:17.29 checking for tar... .../mozilla-build/msys/bin/tar.exe
0:17.29 checking for unzip... .../mozilla-build/bin/unzip.exe
0:17.29 checking for zip... .../mozilla-build/bin/zip.exe
0:17.30 checking for gn... not found
0:17.30 checking for the Mozilla API key... no
0:17.30 checking for the Google Location Service API key... no
0:17.30 checking for the Google Safebrowsing API key... no
0:17.30 checking for the Bing API key... no
0:17.30 checking for the Adjust SDK key... no
0:17.30 checking for the Leanplum SDK key... no
0:17.31 checking for the Pocket API key... no
0:17.31 checking for midl... C:/PROGRA~2/WI3CF2~1/10/bin/100183~1.0/x64/midl.exe
0:17.31 checking for llvm-dlltool... .../mozbuild/clang/bin/llvm-dlltool.exe
0:17.31 checking for fxc... C:/PROGRA~2/WI3CF2~1/10/bin/100183~1.0/x64/fxc.exe
0:17.32 checking for nasm... .../mozbuild/nasm/nasm.exe
0:17.36 checking nasm version... 2.14.02
0:17.36 checking for D3D compiler DLL... C:\Program Files (x86)\Windows Kits\10\Redist\D3D\x64\d3dcompiler_47.dll
0:17.37 checking for dump_syms... .../mozbuild/dump_syms/dump_syms.exe
0:17.37 checking for pdbstr... not found
0:17.38 checking for winchecksec... not found
0:17.38 checking for awk... .../mozilla-build/msys/bin/gawk.exe
0:17.39 checking for perl... .../mozilla-build/msys/bin/perl.exe
0:17.76 checking for minimum required perl version >= 5.006... 5.008008
0:17.96 checking for full perl installation... yes
0:17.96 checking for gmake... .../mozilla-build/bin/mozmake.EXE
0:17.98 checking for watchman... .../mozilla-build/bin/watchman.exe
0:17.99 checking for watchman version... 4.9.1
0:17.99 checking for watchman Mercurial integration... yes
0:17.99 checking for xargs... .../mozilla-build/msys/bin/xargs.exe
0:17.99 checking for makensisu... .../mozilla-build/nsis-3.01/makensis-3.01.exe
0:18.35 checking for NSIS version... 3.01
0:18.35 checking for 32-bit NSIS... yes
0:18.35 checking for 7z... .../mozilla-build/bin/7z.exe
0:18.35 checking for upx... .../mozilla-build/bin/upx.exe
0:18.39 checking for llvm-objdump... .../mozbuild/clang/bin/llvm-objdump.exe
0:18.40 checking for m4... .../mozilla-build/msys/bin/m4.exe
0:18.41 Refreshing .../mozilla-source/mozilla-release/old-configure with .../mozilla-source/mozilla-release\build\autocon
f\autoconf.sh
0:20.81 creating cache ./config.cache
0:21.71 checking host system type... x86_64-pc-mingw32
0:22.23 checking target system type... x86_64-pc-mingw32
0:22.72 checking build system type... x86_64-pc-mingw32
0:23.63 checking for Cygwin environment... no
0:24.02 checking for mingw32 environment... no
0:25.97 checking for executable suffix... configure: error: installation or configuration problem: compiler cannot create executables.
0:25.98 DEBUG: <truncated - see config.log for full output>
0:25.98 DEBUG: #endif
0:25.98 DEBUG: return __CYGWIN__;
0:25.98 DEBUG: ; return 0; }
0:25.98 DEBUG: configure:871: checking for mingw32 environment
0:25.98 DEBUG: configure:883: .../mozbuild/clang/bin/clang-cl.exe -Xclang -std=gnu99 -c conftest.c 1>&5
0:25.98 DEBUG: configure(879,8): error: use of undeclared identifier '__MINGW32__'
0:25.98 DEBUG: return __MINGW32__;
0:25.98 DEBUG: ^
0:25.98 DEBUG: 1 error generated.
0:25.99 DEBUG: configure: failed program was:
0:25.99 DEBUG: #line 876 "configure"
0:25.99 DEBUG: #include "confdefs.h"
0:25.99 DEBUG:
0:25.99 DEBUG: int main() {
0:25.99 DEBUG: return __MINGW32__;
0:25.99 DEBUG: ; return 0; }
0:26.00 DEBUG: configure:902: checking for executable suffix
0:26.00 DEBUG: configure:912: .../mozbuild/clang/bin/clang-cl.exe -Xclang -std=gnu99 -c conftest.c 1>&5 && .../mozbuild
/clang/bin/lld-link.exe -OUT:conftest conftest.obj 1>&5
0:26.00 DEBUG: lld-link: error: failed to write the output file: permission denied
0:26.00 DEBUG: configure: error: installation or configuration problem: compiler cannot create executables.
0:26.00 ERROR: old-configure failed
Error running mach:
['build']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file build| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
Exception: Process executed with non-0 exit code 1: ['...\\mozbuild\\_virtualenvs\\mach\\Scripts\\python.exe', '.../mozil
la-source/mozilla-release\\configure.py']
File "...\mozilla-source\mozilla-release\python/mozbuild/mozbuild/build_commands.py", line 159, in build
append_env=append_env,
File "...\mozilla-source\mozilla-release\python/mozbuild\mozbuild\controller\building.py", line 1148, in build
append_env=append_env,
File "...\mozilla-source\mozilla-release\python/mozbuild\mozbuild\controller\building.py", line 1532, in configure
append_env=append_env,
File "...\mozilla-source\mozilla-release\python/mozbuild\mozbuild\base.py", line 897, in _run_command_in_objdir
return self.run_process(cwd=self.topobjdir, **args)
File "...\mozilla-source\mozilla-release\python/mach\mach\mixin\process.py", line 177, in run_process
"Process executed with non-0 exit code %d: %s" % (status, args)
EDIT: My $PATH:
$ echo $PATH
/local/bin:/.../mozilla-build/bin:/.../mozilla-build/kdiff3:/.../mozilla-build/nsis-3.01:/.../mozilla-build/ python:/.../mozilla-build/python/Scripts:/.../mozilla-build/python3:/.../mozilla-build/python3/Scripts:.:/usr/local/ bin:/mingw/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/.../Git/bin
Three dots are the root folder as in the log above.
EDIT2: Is this supposed to happen?
$ cd /mingw
bash: cd: /mingw: No such file or directory