[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Building Emacs for Win64 on Appveyor
From: |
Rory Yorke |
Subject: |
Building Emacs for Win64 on Appveyor |
Date: |
Sun, 21 Feb 2016 17:12:21 +0200 |
User-agent: |
Notmuch/0.18 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) |
Hi,
See also [1] from January 2016.
I've managed to execute a basic MSYS2 Windows 64 Emacs build on Appveyor
(a continuous integration service for MS Windows) using the version of
MSYS2 Appveyor have pre-installed on their virtual machine images.
You can see results at [2]; the appveyor.yml file that sets up the build
is at [3], which is part of a branch of the emacs-25 branch of
emacs-mirror/emacs on github.
Some comments on the build setup:
1) The mingw64_shell.bat specified in emacs nt/INSTALL.W64 opens a
new window (I think - see, e.g., [4]). This means compilation
output isn't easily captured, so I've instead directly invoked
MSYS2's bash at C:\msys64\usr\bin\bash. One must set environment
variable MSYSTEM to MINGW64 to build in "MinGW" mode instead of
"Cygwin" mode. [5]
2) There's a bug in MSYS or Appveyor that requries an "exec
0</dev/null" before calling configure. See [6].
3) I initially tried "make -j2" (the VM only provides one core, but my
understanding is that even then -j2 can provide a speed advantage),
but the build froze after building emacs-lisp/cursor-sensor.elc.
Non-parallel builds do work.
All of this is captured in the appveyor.yml file.
The build includes a "make install" step, and the installation is
archived into a zip file. The final step, which I have not enabled,
would be to mark this zip file as a "build artifact"; this artifact
would be available for download.
The build takes about 36 min, and the installation and packaging another
13 minutes, for a total of 49 minutes; the build time-limit is one hour.
I understand the major complication in making the result generally
available is to also provide the sources of the various libraries (XPM,
PNG, JPEG, etc.) used in building Emacs. I don't know enough about
MSYS2 to know if this is easily automatable.
The Appveyor system, despite the quirks noted, is relatively easy to
use. Prototyping however, is probably best done on a Windows machine,
since turn-around time from attempted fix to build result can be a bit
long.
A non-Windows (so to speak) alternative to all this might be to use
Wine; unfortunately, I couldn't get MSYS2 to install in Wine. It seems
likely, and understandable, that MSYS2-on-Wine is not a priority for
either of these projects.
I will continue looking at automatically collecting the non-Emacs build
sources as part of the build, but can't commit to any deadline.
I'd appreciate comments and suggestions.
Regards,
Rory
[1] https://lists.gnu.org/archive/html/help-gnu-emacs/2016-01/msg00084.html
[2] https://ci.appveyor.com/project/roryyorke/emacs/build/1.0.10
[3] https://github.com/roryyorke/emacs/blob/rory-appveyor/appveyor.yml
[4] http://stackoverflow.com/a/26811432/1008142
[5] https://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00164.html
[6]
http://help.appveyor.com/discussions/problems/912-problem-building-mono-with-cygwin-inputoutput-redirection
- Building Emacs for Win64 on Appveyor,
Rory Yorke <=