Hi all,
Since around Firefox 49, I've had trouble cross compiling Firefox using
mingw-w64 and GCC. With the environment set up properly, I get an error log as
follows:
0:08.44 checking for target system type... x86_64-w64-mingw32
0:08.45 checking whether cross compiling... yes
0:08.46 checking for pkg_config... /usr/local/bin/pkg-config
0:08.48 checking for pkg-config version... 0.29.1
0:08.49 checking for tar... /usr/local/bin/gtar
0:08.49 checking for unzip... /usr/bin/unzip
0:08.49 checking for zip... /usr/bin/zip
0:08.49 checking for yasm... /usr/local/bin/yasm
0:08.51 checking yasm version... 1.3.0
0:08.51 checking for the target C compiler...
/usr/local/Cellar/mingw-w64/5.0.0/bin/x86_64-w64-mingw32-gcc
0:08.66 checking whether the target C compiler can be used...
0:08.66 DEBUG: <truncated - see config.log for full output>
0:08.66 DEBUG: | %KERNEL Linux
0:08.66 DEBUG: | #elif _WIN32 || __CYGWIN__
0:08.66 DEBUG: | %KERNEL WINNT
0:08.66 DEBUG: | #elif __NetBSD__
0:08.66 DEBUG: | %KERNEL NetBSD
0:08.66 DEBUG: | #elif __APPLE__
0:08.66 DEBUG: | %KERNEL Darwin
0:08.66 DEBUG: | #endif
0:08.66 DEBUG: | #if _MSC_VER || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
0:08.66 DEBUG: | %ENDIANNESS little
0:08.66 DEBUG: | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
0:08.66 DEBUG: | %ENDIANNESS big
0:08.66 DEBUG: | #endif
0:08.66 DEBUG: Executing:
`/usr/local/Cellar/mingw-w64/5.0.0/bin/x86_64-w64-mingw32-gcc -E
/var/folders/g3/8j6q4lrd2vqd377bmwcxbq3m0000gn/T/conftest.mCmdqz.c`
0:08.66 DEBUG: COMPILER = gcc
0:08.67 DEBUG: VERSION = 6.2.0
0:08.67 DEBUG: STDC_VERSION = 201112L
0:08.67 DEBUG: CPU = x86_64
0:08.67 DEBUG: KERNEL = 1
0:08.67 DEBUG: ENDIANNESS = little
0:08.67 Traceback (most recent call last):
0:08.67 File "/Users/alex/gecko-dev/configure.py", line 94, in <module>
0:08.67 sys.exit(main(sys.argv))
0:08.67 File "/Users/alex/gecko-dev/configure.py", line 22, in main
0:08.67 sandbox.run(os.path.join(os.path.dirname(__file__),
'moz.configure'))
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
260, in run
0:08.67 func(*args)
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
302, in _value_for
0:08.67 return self._value_for_depends(obj)
0:08.67 File "/Users/alex/gecko-dev/python/mozbuild/mozbuild/util.py", line
924, in method_call
0:08.67 cache[args] = self.func(instance, *args)
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
329, in _value_for_depends
0:08.67 return func(*resolved_args)
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
773, in wrapped
0:08.67 return new_func(*args, **kwargs)
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
518, in wrapper
0:08.67 ret = template(*args, **kwargs)
0:08.67 File "/Users/alex/gecko-dev/build/moz.configure/checks.configure",
line 53, in wrapped
0:08.67 ret = func(*args, **kwargs)
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
773, in wrapped
0:08.67 return new_func(*args, **kwargs)
0:08.67 File
"/Users/alex/gecko-dev/build/moz.configure/toolchain.configure", line 631, in
valid_compiler
0:08.67 host_or_target)
0:08.67 File
"/Users/alex/gecko-dev/python/mozbuild/mozbuild/configure/__init__.py", line
773, in wrapped
0:08.67 return new_func(*args, **kwargs)
0:08.67 File
"/Users/alex/gecko-dev/build/moz.configure/toolchain.configure", line 365, in
check_compiler
0:08.67 if not info.kernel or info.kernel != target.kernel:
0:08.67 File "/Users/alex/gecko-dev/python/mozbuild/mozbuild/util.py", line
1173, in __ne__
0:08.67 return not (self == other)
0:08.67 File "/Users/alex/gecko-dev/python/mozbuild/mozbuild/util.py", line
1169, in __eq__
0:08.67 % ', '.join("'%s'" % v for v in self.POSSIBLE_VALUES))
0:08.67 mozbuild.util.EnumStringComparisonError: Can only compare with
'Darwin', 'DragonFly', 'FreeBSD', 'kFreeBSD', 'Linux', 'NetBSD', 'OpenBSD',
'WINNT'
0:08.69 *** Fix above errors and then restart with
"/Applications/Xcode.app/Contents/Developer/usr/bin/make -f client.mk build"
0:08.69 make[2]: *** [configure] Error 1
0:08.69 make[1]: *** [/Users/alex/gecko-dev/objdir/Makefile] Error 2
0:08.69 make: *** [build] Error 2
It doesn't matter if the host is Linux, macOS or MSYS2, the exact same error
happens. Firefox 45 cross compiles fine, so I'm assuming it's to do with the
new build system changes. Could anyone with a bit more knowledge on the changes
shed some light on what could possibly be happening?
_______________________________________________
dev-builds mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-builds