Closed Bug 1619097 Opened 7 months ago Closed 7 months ago

Port bug 1617794 - Tier 2 win64-cross builds (Thunderbird)

Categories

(Thunderbird :: Build Config, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 75.0

People

(Reporter: rjl, Assigned: rjl)

Details

Attachments

(4 files)

It's now possible to do win64 builds of Thunderbird on Linux, thanks to wonderful work by glandium for Firefox.

The build uses clang-cl on a Linux host and links against the same libraries from Visual Studio 2017 that are used when building on Windows.
Most of the supporting tools are cross-platform: Rust, Nodejs, NASM. There are a few exceptions, namely MIDL.EXE, RC.EXE, ML64.EXE, MAKECAB.EXE, NSIS, UPX and FXC.EXE. These all run using WINE.

Another obstacle is that on Windows, the filesystem is case insensitive. liblowercase.so is an LD_PRELOAD library that allows specified paths to be accessed in a case insensitive way. For it to work, the files themselves must be all lowercase, but then processes run with LD_PRELOAD will be able to access them with mixed case. In practice, this is really only needed for the VS2017 and WIN10SDK paths.

This does produce a working build. Unlike bug 1351377, this effort uses VS2017
and Win 10 SDK headers and libraries rather than the MINGW ones.
Attachment #9129982 - Flags: review?(geoff)
Assignee: nobody → rob
Status: NEW → ASSIGNED
Set up a new win64 build job that cross-compiles on Linux using clang-cl
and Visual Studio libraries.
Unlike the patches in bug 1351377, this build supports MAPI and Windows
Search integration.
This is a tier 2 platform.
Attachment #9129983 - Flags: review?(geoff)
Attached file mozconfig.clang-cl

This is the mozconfig file I came up with to build win64-cross builds locally. It uses the toolchains that are build for Taskcluster.

Attached file WIN64_CROSS.md

How to use the mozconfig file attached to this bug. Specifically, some information on how to use liblowercase and how to get the necessary Visual Studio and Win SDK stuff.
Eventually I would like to get this on DTN.

Attachment #9129982 - Flags: review?(geoff) → review+
Comment on attachment 9129983 [details] [diff] [review]
Port bug 1617794: Add tier-2 64-bit Windows cross build

Review of attachment 9129983 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/config/mozconfigs/win64/cross
@@ +24,5 @@
> +# Set up mapi includes (must be done after visual studio setup)
> +export INCLUDE=$TOOLTOOL_DIR/mapiheader
> +
> +
> +ac_add_options --with-branding=comm/mail/branding/nightly

Necessary? None of our mozconfigs have this option, but all of Firefox's do. Perhaps we should be adding it to all.
Attachment #9129983 - Flags: review?(geoff) → review+

I'm going to have to try this out now. I needed to build for Windows anyway, and if I can do it outside my VM, that should make life much easier.

It's not necessary. Branding is set in https://searchfox.org/comm-central/source/mail/confvars.sh#18-19. Then old-configure figures out which to use based on the presence of --enable-official-branding. Not sure why Firefox is setting it in both places.

I left it though to sort of emphasize the unofficial nature of these builds.

(In reply to Geoff Lankow (:darktrojan) from comment #5)

Comment on attachment 9129983 [details] [diff] [review]
Port bug 1617794: Add tier-2 64-bit Windows cross build

Review of attachment 9129983 [details] [diff] [review]:

::: mail/config/mozconfigs/win64/cross
@@ +24,5 @@

+# Set up mapi includes (must be done after visual studio setup)
+export INCLUDE=$TOOLTOOL_DIR/mapiheader
+
+
+ac_add_options --with-branding=comm/mail/branding/nightly

Necessary? None of our mozconfigs have this option, but all of Firefox's do.
Perhaps we should be adding it to all.

Maybe I spoke too soon... bug 1620165. I will see what I can find out.

(In reply to Rob Lemley [:rjl] from comment #7)

I left it though to sort of emphasize the unofficial nature of these builds.

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/9afcfb7f0138
Port bug 1617794: Wrap Windows tools with Wine on cross builds. r=darktrojan
https://hg.mozilla.org/comm-central/rev/526492aedbb6
Port bug 1617794: Add tier-2 64-bit Windows cross build. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Version: unspecified → 75
Target Milestone: --- → Thunderbird 75.0
You need to log in before you can comment on or make changes to this bug.