Hello everyone,
I'm trying to cross compile Firefox 85.0.1 on Ubuntu 20 and I get different type of errors in finding some types in .h or .cpp files.
For example,
obj-x86_64-w64-mingw32/dist/include/mozilla/interceptor/MMPolicies.h:25:28: error: unknown type name 'MEM_EXTENDED_PARAMETER'
I found that in the former Firefox versions for example 82.0, this error does not occur.
some other errors are:
mozglue/misc/WindowsProcessMitigations.cpp:69:36: error: use of undeclared identifier 'ProcessPayloadRestrictionPolicy'
ProcessPayloadRestrictionPolicy, &polInfo,
/home/dev/85.0.1/mozilla-release-30fa4718813e735a3b4a0a5135352bfe2a655a8b/mozglue/misc/WindowsProcessMitigations.cpp:74:18: error: no member named 'EnableExportAddressFilterPlus' in '_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY'
My mozeconfig file is like that:
CROSS_COMPILE=1
TOOLTOOL_DIR=/home/dev/85.0.1/mozilla-release-30fa4718813e735a3b4a0a5135352bfe2a655a8b
# MinGW does not have (or need) makecab
unset MAKECAB
RUSTC="${TOOLTOOL_DIR}/rustc/bin/rustc"
CARGO="${TOOLTOOL_DIR}/rustc/bin/cargo"
RUSTFMT="${TOOLTOOL_DIR}/rustc/bin/rustfmt"
CBINDGEN="${TOOLTOOL_DIR}/cbindgen/cbindgen"
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-crashreporter
ac_add_options --enable-js-shell
# MinGW Stuff
ac_add_options --target=x86_64-w64-mingw32
ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
ac_add_options --disable-warnings-as-errors
export MOZ_COPY_PDBS=1
# Temporary config settings until we get these working on mingw
ac_add_options --disable-accessibility #
https://sourceforge.net/p/mingw-w64/bugs/648/
# These aren't supported on mingw at this time
ac_add_options --disable-webrtc # Bug 1393901
ac_add_options --disable-geckodriver # Bug 1489320
ac_add_options --disable-update-agent # Bug 1561797
ac_add_options --disable-default-browser-agent # WinToast does not build on mingw
# Find our toolchain
HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
CC="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang"
CXX="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang++"
CXXFLAGS="-fms-extensions -Wno-incompatible-ms-struct"
AR=llvm-ar
RANLIB=llvm-ranlib
BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include"
# We want to make sure we use binutils and other binaries in the tooltool
# package.
mk_add_options "export PATH=$TOOLTOOL_DIR/rustc/bin:$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/mingw32/lib64:$TOOLTOOL_DIR/clang/lib
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
ac_add_options --with-branding=browser/branding/unofficial
and I go through this document in Mozilla website:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Cross_Compile_Mozilla_for_Mingw32
Thanks in advanced.