How To Build Mailsync?

This is the official topic for discussing how to build Mailsync. Any problems experienced with this process should be discussed in this topic. Replies are automatically deleted after six months.

The first post is a wiki, so it can be easily updated by developers as the build process is improved.

How To Build Mailsync

To be filled in. (Help appreciated!)

Windows

macOS

Linux

Linux build failure (Ubuntu 18.04/20.04)

/home/alg/Projects/Mailspring-Sync/Vendor/mailcore2/Externals/include/sched.h:70:3: error: #error Please upgrade your GNU compiler to one that supports __declspec.
70 | # error Please upgrade your GNU compiler to one that supports __declspec.

How I can fix it?

Yeah, I’m hitting that one too. The problem there, note, is mailcore2, one of our dependencies, and not Mailsync (ours). It seems to assume Linux is using Microsoft Visual C++. Which makes no sense.

You might try downloading the latest version of Mailcore2, and seeing if you have the same build problem. If so, we need to report it to them and work as a community on getting it resolved. However, if not, then we need to update that dependency in our repository (which is not as straightforward as one might think.)

sched.h and pthread.h can be removed in Vendor/mailcore2/Externals/include (maybe only on linux?). After delete it I can build (but with other problems).

Original mailcore2 repo does not contain them

openssl-1.1.0f fails to build, probably due to it being so outdated and depending on an old version of Perl. The version that is being used appears to be from May 2017, but newer revisions of 1.1.0 are available here: /source/old/1.1.0/index.html

Error logs:

Building and installing openssl-1.1.0f

Operating system: x86_64-whatever-linux2
"glob" is not exported by the File::Glob module
Can't continue after import errors at ./Configure line 17.
BEGIN failed--compilation aborted at ./Configure line 17.
"glob" is not exported by the File::Glob module
Can't continue after import errors at ./Configure line 17.
BEGIN failed--compilation aborted at ./Configure line 17.
This system (linux-x86_64) is not supported. See file INSTALL for details.
make: *** No targets specified and no makefile found.  Stop.

System info:

  • OS: Archlinux
  • Perl: v5.32.1

I’ve been able to get 1.1.1 working just peachy, just by modifying build.sh. It’s Mailcore2 that’s proving insidious.