Support cross compilation Thunderbird with MinGW
Categories
(Thunderbird :: Build Config, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: naeilzoueidi, Unassigned)
Details
Attachments
(4 files)
856 bytes,
patch
|
Details | Diff | Splinter Review | |
1.20 KB,
patch
|
Details | Diff | Splinter Review | |
3.62 KB,
patch
|
Details | Diff | Splinter Review | |
3.27 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20170126200443 Steps to reproduce: Cross Compile Thunderbird for Mingw32 I followed the steps described in this official documentation. GCC version 6.3.0 Binutils-2.28 and mingw-w64 Wlid64 Actual results: In the last step of building : ./mozzila/mach build It exit with non zero code with message Windows-SDK is missing
Reporter | ||
Comment 1•7 years ago
|
||
I am working on the patch, will push it asap.
Updated•7 years ago
|
Updated•5 years ago
|
Comment 2•5 years ago
|
||
WORK IN PROGRESS.
mozock.c is compatibility wrappers for socket handling on Windows due to various winsock implementations. Removing it from the build when using Clang+MinGW builds, but I have not tested whether LDAP functionality works or not.
Comment 3•5 years ago
|
||
WORK IN PROGRESS
The Clang+MinGW compiler setup gets identified as "clang" rather than "clang-cl". It's used to include some Windows specific code. There are probably better ways of doing this, but this approach compiles. It is untested otherwise.
Comment 4•5 years ago
|
||
WORK IN PROGRESS
The header files for the Windows Search API do not exist in MinGW. Rather than remain stuck on that issue, this patch simply disables the Windows Explorer search integration.
Comment 5•5 years ago
|
||
This is the mozconfig I'm using. It should work without too many changes for others. It's based on https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Cross_Compile_Mozilla_for_Mingw32 (which is outdated now) and the Firefox mozconfig at M-C:browser/config/mozconfigs/win64/mingwclang
The Linux host OS will need some tools installed from the distribution:
- Mercurial
- GCC/G++
- upx
- wine
- makensis (on Ubuntu its called "nsis", other distributions will have mingw in the name)
- nasm
- yasm
clang, rust, cbindgen, and node I'm pulling from the Taskcluster toolchain archives, as described in the MDN article. If you have a source checkout and have run a mach configure, you can use mach to make downloading easier.
# cd $topsrcdir
mkdir mingw-tmp && pushd mingw-tmp
for i in linux64-clang-8-mingw-x64 mingw32-rust-1.35 linux64-cbindgen linux64-mingw-fxc2-x86 linux64-node
do
mach artifact toolchain --cache-dir ~/.mozbuild/toolchains --from-build $i
done
popd
mv mingw-tmp ~/.mozbuild/mingw
Note that "mingw32-rust-1.35" is the latest available as of this writing, and it changes quickly. There's no toolchain alias like for other builds so check M-C:taskcluster/toolchain/rust.yml for the current version.
With regard to NSIS, the advice from the build team is not to use any NSIS build besides theirs. They seem to build okay, but I have not tested one yet so it might not work.
Updated•5 years ago
|
Comment 6•4 years ago
|
||
Bug 1619097 brings the brilliant work from bug 1617794 to Thunderbird, without the feature limitations that come from using MinGW headers.
I don't foresee the SearchAPI.h issue being solved on the MinGW side of things any time soon. And while I can understand the arguments against using MS's non-free headers and libraries, you're still building for a non-free platform.
Description
•