From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brian Burns Newsgroups: gmane.emacs.bugs Subject: bug#22240: Build instructions for 64-bit Windows? Date: Tue, 29 Dec 2015 01:12:51 -0600 Message-ID: References: <83ege9k3xa.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0122a59caab9cc05280428b1 X-Trace: ger.gmane.org 1451373769 16652 80.91.229.3 (29 Dec 2015 07:22:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2015 07:22:49 +0000 (UTC) Cc: Chris Zheng , 22240@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 29 08:22:39 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aDoc9-0000Xd-Jr for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 08:22:38 +0100 Original-Received: from localhost ([::1]:47432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDoc8-0001ax-SC for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 02:22:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDoTt-0002Ll-VN for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 02:14:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDoTq-0007R1-Kk for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 02:14:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDoTq-0007Qx-GR for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 02:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aDoTq-0008QG-4I for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 02:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Brian Burns Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Dec 2015 07:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22240 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22240-submit@debbugs.gnu.org id=B22240.145137321932329 (code B ref 22240); Tue, 29 Dec 2015 07:14:02 +0000 Original-Received: (at 22240) by debbugs.gnu.org; 29 Dec 2015 07:13:39 +0000 Original-Received: from localhost ([127.0.0.1]:47272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDoTS-0008PM-E3 for submit@debbugs.gnu.org; Tue, 29 Dec 2015 02:13:39 -0500 Original-Received: from mail-ig0-f172.google.com ([209.85.213.172]:38428) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDoTQ-0008P6-Ag for 22240@debbugs.gnu.org; Tue, 29 Dec 2015 02:13:37 -0500 Original-Received: by mail-ig0-f172.google.com with SMTP id mw1so32341736igb.1 for <22240@debbugs.gnu.org>; Mon, 28 Dec 2015 23:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=QLsdqW6LEa2s+7ZbgcWo2ju0/EZmLWFtA6iFubN94OA=; b=d2gvojfEe4j2j+bLranvONI8EGOD84ESwBv951C2fdfkYL+TjaEvUYWth+VYRKIXaf Il5FWdU35GanTuggzILIACmXci3z94yGDw6fNrf/EdMtCsQGyTih6Hfoa+MdGa4fJjhy g0Ak0DWuc1qBaUN0rcH79bWGVGJX63s8hcDDdjnGSYjidu6XvcZ0knCrp/2HfV5hYqwh 6QMoo7Gk8kETJybZkFImmSt8uC//ETs9zaqN7kWV4LLEJC+pf0+06dHzLlff7TPNkKck wR97Svv0kfbcNBTNfP59LnmoNmrpSZSJqfo0LEuEwdGlzy0jrRd90VQtRXPZBTuv7siO QNrQ== X-Received: by 10.50.79.234 with SMTP id m10mr5360618igx.23.1451373210801; Mon, 28 Dec 2015 23:13:30 -0800 (PST) Original-Received: by 10.50.18.36 with HTTP; Mon, 28 Dec 2015 23:12:51 -0800 (PST) In-Reply-To: <83ege9k3xa.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110950 Archived-At: --089e0122a59caab9cc05280428b1 Content-Type: text/plain; charset=UTF-8 Okay thanks, here's a rough draft for the instructions - it's also in a Gist at https://gist.github.com/bburns/43c9f170361aecee3b71 if anyone wants to make any changes that way. I did wind up writing more than I thought I would, but I sent in my signed paperwork last week in case I needed it. > The "configure; make; make install" section should avoid showing > non-essential switches to configure, except as an example: users > should decide by themselves what switches to use. Okay, I made it more clear that they were examples. > the --host, --target, and --build switches should not be needed I tried running configure without the '--host=x86_64-w64-mingw32' etc switches but got an error: configure: error: Emacs does not support 'x86_64-pc-msys' systems. If you think it should, please send a report to bug-gnu-emacs@gnu.org. Check 'etc/MACHINES' for recognized configuration names. but the MACHINES file says to see the nt/INSTALL document, which doesn't cover the 64-bit options. So I left them in for the moment - I can file a bug report for that also if needed. > . the --with-wide-int switch is a no-op in a 64-bit build > . the --with-png and other similar switches should not be used at > all, since configure will detect whatever libraries are > available by default (only the corresponding --without-FOO > switches should ever be used to _disable_ a package that would > otherwise be detected) Okay, removed those. > the --prefix should be on the configure command, and it should > NOT advise any particular location (there's a discussion in > nt/INSTALL where PREFIX should be, and I suggest to either > repeat it or point to it, because I believe the same > considerations are valid for a MinGW64 build; if MinGW64 has a > popular location of the root of its tree, the preferred PREFIX > should use it) Okay, I put the --prefix on the configure command, but I think it would be good if the instructions included a simple example, and refer the user to the INSTALL instructions for more options - part of the reason I think my earlier attempts at building Emacs failed were because the instructions in INSTALL didn't have an example to follow, and coming from Windows I'm not very familiar with building from source, so having the example in Chris's instructions to follow were very helpful. > the 'cp' commands I don't understand at all: if PREFIX is chosen > correctly, the Emacs's bin/ directory and the MinGW64's bin/ > directory should be the same, so there's no need to copy; and > even if these two bin/ directories are different, the directory > with DLLs should be on PATH. this sounds like some workaround > for some misconfiguration, so we had better not repeated that. I think this was in part because MSYS2 doesn't add its folders to the PATH, and if you use the PATH variable there might be both 32-bit and 64-bit DLLs on it, so in that case it's better to have the DLLs in the directory with the executable - they're only about 32MB. But I removed this section and just said to add the folders to the PATH, and if there's a conflict to copy the DLLs to the bin folder. > The "Run" section doesn't belong in installation instructions. I think it might be good to include a simple Test section that just says to run emacs with ./bin/runemacs.exe -Q to check that it works - mainly because a Windows user might tend to launch Emacs from a shortcut on the desktop and might be unused to launching it from the console, so a simple line like that might be helpful. Any corrections or additions are welcome - I'm a novice at building things like this so am not sure what a more advanced user might want to see. Brian --------------------- Building and Installing Emacs on 64-bit MS-Windows using MSYS2 and MinGW-w64 Copyright (c) 2015 Free Software Foundation, Inc. See the end of the file for license conditions. This document describes how to compile a 64-bit GNU Emacs using MSYS2 and MinGW-w64. For more detailed information on the build process, and instructions for building a 32-bit Emacs using MSYS and MinGW, see the INSTALL document in this directory. Do not use this recipe with Cygwin. For building on Cygwin, use the normal installation instructions in ../INSTALL. * Requirements The total time to download all tools and build Emacs is approximately 90 minutes on an Intel i3 processor, and 3GB of free space is required (1.8GB for MSYS2 / MinGW-w64 and 1.2GB for Emacs with the full repository). Approximate times for the first pass through each step are given - to time them yourself you can precede any BASH command with 'time'. * Set up the MinGW-w64 / MSYS2 build environment [25 mins] MinGW-w64 provides a complete runtime for projects built with gcc for 64-bit Windows - it's located at https://sourceforge.net/projects/mingw-w64/. MSYS2 is a Cygwin-derived software distribution for Windows which provides build tools for MinGW-w64 - see https://sourceforge.net/projects/msys2/. ** Download and install MinGW-w64 and MSYS2 [5 mins] You can download the x86_64 version of MSYS2 (i.e. msys2-x86_64-.exe) from https://sourceforge.net/projects/msys2/files/Base/x86_64 Run this file to install MSYS2 in your preferred directory, e.g. the default C:\msys64 - this will install MinGW-w64 also. Note that a path containing spaces may cause problems. Then you'll need to add the following directories to your Windows PATH environment variable - c:\msys64\usr\bin;c:\msys64\mingw64\bin you can do this through the usual Control Panel / System and Security / System / Advanced system settings / Environment Variables / Edit path. Note: If you've already installed a 32-bit MinGW and have it on your path you might need to either remove it from the path, or after building the Emacs executable, copy the MinGW-w64 DLLs in /mingw64/bin/ to the new Emacs bin folder - they're about 32MB. ** Download and install the necessary packages [20 mins] Run msys2_shell.bat in your MSYS2 directory and you will see a BASH window opened. In the BASH prompt, use the following command to install the necessary packages (you can copy and paste it into the shell with Shift + Insert): pacman -S base-devel \ mingw-w64-x86_64-toolchain \ mingw-w64-x86_64-xpm-nox \ mingw-w64-x86_64-libtiff \ mingw-w64-x86_64-giflib \ mingw-w64-x86_64-libpng \ mingw-w64-x86_64-libjpeg-turbo \ mingw-w64-x86_64-librsvg \ mingw-w64-x86_64-libxml2 \ mingw-w64-x86_64-gnutls The packages include the base developer tools (autoconf, automake, grep, make, etc.), the compiler toolchain (gcc, gdb, etc.), several image libraries, an xml library, and the GnuTLS (transport layer security) library. You now have a complete build environment for Emacs. * Install git (optional) and disable autocrlf [2 mins] If you don't already have git on your system, you can install it in your MSYS2 environment with: pacman -S git The autocrlf feature of Git may interfere with the configure file, so it is best to disable this feature by running the command: git config core.autocrlf false * Get the Emacs source code [15 mins] Now you can either get an existing release version of the Emacs source code from the GNU ftp site, or get the more current version and history from the git repository. You can always find the most recent information on these sources from the GNU Savannah Emacs site, https://savannah.gnu.org/projects/emacs. ** From the FTP site [1 min] The Emacs ftp site is located at http://ftp.gnu.org/gnu/emacs/ - download the version you want to build and put the file into a location like C:\emacs\, then uncompress it with tar and cd into the folder. This will put the Emacs source into a folder like C:\emacs\emacs-24.5: cd /c/emacs tar xf emacs-24.5.tar.xz cd emacs-24.5 ** From the git repository [15 mins] To download the git repository, do something like the following - this will put the Emacs source into C:\emacs\emacs-25: mkdir /c/emacs cd /c/emacs git clone git://git.sv.gnu.org/emacs.git emacs-25 cd emacs-25 * Build Emacs [45 mins] Now you're ready to build and install Emacs with autogen, configure, make, and make install. ** Run autogen [1 min] Run autogen to generate the configure script (note: this step is not necessary if you are using a release source tarball, as the configure file is included): ./autogen.sh ** Run configure [4 mins] Now you can run configure, which will build the various Makefiles. The following is a simple example for some configure options - see the INSTALL file in this directory for more information on the options available. Note that the --prefix option specifies a location for the resulting binary files, which 'make install' will use - if a prefix is not specified the files will be put in the standard MinGW-w64 directories. Note also that we need to disable Imagemagick because Emacs does not yet support it in Windows. PKG_CONFIG_PATH=/mingw64/lib/pkgconfig \ ./configure \ --prefix=/c/emacs/emacs-25 \ --host=x86_64-w64-mingw32 \ --target=x86_64-w64-mingw32 \ --build=x86_64-w64-mingw32 \ --without-imagemagick ** Run make [30 mins] This will compile Emacs and build the executables, putting them in the src directory: make ** Run make install [6 mins] Now you can run make install, which will copy the executable and other files to the location specified in the configure step: make install * Test Emacs To test it out, run ./bin/runemacs.exe -Q and if all went well, you will have a new 64-bit version of Emacs. * Credits Thanks to Chris Zheng for the original build outline as used by the emacsbinw64 project, located at: https://sourceforge.net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/ * License This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . * Emacs settings Local Variables: mode: org sentence-end-double-space: t End: On Sat, Dec 26, 2015 at 2:30 AM, Eli Zaretskii wrote: > --089e0122a59caab9cc05280428b1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Okay thanks, here's a rough draft for the instruc= tions - it's also in a Gist at
https://gist.github.com/bburns/43c9f170361aecee3= b71 if anyone wants to make any
changes that way.

I did wind = up writing more than I thought I would, but I sent in my signed
paperwo= rk last week in case I needed it.

> The "configure; make; ma= ke install" section should avoid showing
> non-essential switche= s to configure, except as an example: users
> should decide by themse= lves what switches to use.

Okay, I made it more clear that they wer= e examples.

> the --host, --target, and --build switches should = not be needed

I tried running configure without the '--host=3Dx8= 6_64-w64-mingw32' etc switches
but got an error:

=C2=A0=C2=A0= =C2=A0 configure: error: Emacs does not support 'x86_64-pc-msys' sy= stems.
=C2=A0=C2=A0=C2=A0 If you think it should, please send a report t= o bug-gnu-emacs@gnu.org.
= =C2=A0=C2=A0=C2=A0 Check 'etc/MACHINES' for recognized configuratio= n names.

but the MACHINES file says to see the nt/INSTALL document, = which doesn't cover
the 64-bit options. So I left them in for the mo= ment - I can file a bug report
for that also if needed.
=C2=A0=C2=A0= =C2=A0
> . the --with-wide-int switch is a no-op in a 64-bit build> . the --with-png and other similar switches should not be used at> all, since configure will detect whatever libraries are
> avail= able by default (only the corresponding --without-FOO
> switches shou= ld ever be used to _disable_ a package that would
> otherwise be dete= cted)

Okay, removed those.

> the --prefix should be on th= e configure command, and it should
> NOT advise any particular locati= on (there's a discussion in
> nt/INSTALL where PREFIX should be, = and I suggest to either
> repeat it or point to it, because I believe= the same
> considerations are valid for a MinGW64 build; if MinGW64 = has a
> popular location of the root of its tree, the preferred PREFI= X
> should use it)

Okay, I put the --prefix on the configure c= ommand, but I think it would be good
if the instructions included a simp= le example, and refer the user to the INSTALL
instructions for more opti= ons - part of the reason I think my earlier attempts
at building Emacs f= ailed were because the instructions in INSTALL didn't have an
exampl= e to follow, and coming from Windows I'm not very familiar with buildin= g
from source, so having the example in Chris's instructions to foll= ow were very
helpful.

> the 'cp' commands I don't = understand at all: if PREFIX is chosen
> correctly, the Emacs's b= in/ directory and the MinGW64's bin/
> directory should be the sa= me, so there's no need to copy; and
> even if these two bin/ dire= ctories are different, the directory
> with DLLs should be on PATH.= =C2=A0 this sounds like some workaround
> for some misconfiguration, = so we had better not repeated that.

I think this was in part because= MSYS2 doesn't add its folders to the PATH, and
if you use the PATH = variable there might be both 32-bit and 64-bit DLLs on it,
so in that ca= se it's better to have the DLLs in the directory with the
executable= - they're only about 32MB. But I removed this section and just saidto add the folders to the PATH, and if there's a conflict to copy the = DLLs to
the bin folder.

> The "Run" section doesn= 9;t belong in installation instructions.

I think it might be good to= include a simple Test section that just says to
run emacs with

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ./bin/runemacs.exe -Q
=C2=A0
to check= that it works - mainly because a Windows user might tend to launch
Ema= cs from a shortcut on the desktop and might be unused to launching it
fr= om the console, so a simple line like that might be helpful.

<= div>Any corrections or additions are welcome - I'm a novice at building= things
like this so am not sure what a more advanced user might want t= o see.

Brian

---------------------

=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Building and Installing Emacs on 64-bit MS-Windows
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 using MSYS2 and MinGW-w64

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Copyright (c) 2015 Free So= ftware Foundation, Inc.
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 See the end of the file for lice= nse conditions.

This document describes how to compile a 64-bit GNU = Emacs using MSYS2 and
MinGW-w64.=C2=A0 For more detailed information on = the build process, and instructions
for building a 32-bit Emacs using MS= YS and MinGW, see the INSTALL document in
this directory.

Do not = use this recipe with Cygwin.=C2=A0 For building on Cygwin, use the normalinstallation instructions in ../INSTALL.


* Requirements
=C2=A0 The total time to download all tools and build Emacs is approximate= ly 90
=C2=A0 minutes on an Intel i3 processor, and 3GB of free space is = required (1.8GB for
=C2=A0 MSYS2 / MinGW-w64 and 1.2GB for Emacs with th= e full repository).

=C2=A0 Approximate times for the first pass thro= ugh each step are given - to time
=C2=A0 them yourself you can precede a= ny BASH command with 'time'.


* Set up the MinGW-w64 / MS= YS2 build environment=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 [25 mins]

=C2=A0 MinGW-w64 provides a complete runtime for proje= cts built with gcc for 64-bit
=C2=A0 Windows - it's located at https://sourceforge.net= /projects/mingw-w64/.

=C2=A0 MSYS2 is a Cygwin-derived software = distribution for Windows which provides
=C2=A0 build tools for MinGW-w64= - see https://sourcefo= rge.net/projects/msys2/.


** Download and install MinGW-w64 a= nd MSYS2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 [5 mins]

=C2=A0 You can download the x86= _64 version of MSYS2 (i.e. msys2-x86_64-<date>.exe)
=C2=A0 from
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 https://sourceforge.net/projects/msys2/files/= Base/x86_64

=C2=A0 Run this file to install MSYS2 in your prefer= red directory, e.g. the default
=C2=A0 C:\msys64 - this will install Min= GW-w64 also.=C2=A0 Note that a path containing
=C2=A0 spaces may cause p= roblems.

=C2=A0 Then you'll need to add the following directorie= s to your Windows PATH
=C2=A0 environment variable -

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 c:\msys64\usr\bin;c:\msys64\mingw64\bin

=C2= =A0 you can do this through the usual Control Panel / System and Security /=
=C2=A0 System / Advanced system settings / Environment Variables / Edi= t path.

=C2=A0 Note: If you've already installed a 32-bit MinGW = and have it on your path
=C2=A0 you might need to either remove it from= the path, or after building the
=C2=A0 Emacs executable, copy the MinG= W-w64 DLLs in /mingw64/bin/ to the new
=C2=A0 Emacs bin folder - they&#= 39;re about 32MB.


** Download and install the necessary pac= kages=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= [20 mins]

=C2=A0 Run msys2_shell.bat in your MSYS2 directory and yo= u will see a BASH window
=C2=A0 opened.

=C2=A0 In the BASH prompt= , use the following command to install the necessary
=C2=A0 packages (yo= u can copy and paste it into the shell with Shift + Insert):

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 pacman -S base-devel \
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 mingw-w64-x86_64-toolchain \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw= -w64-x86_64-xpm-nox \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-li= btiff \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-giflib \
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-libpng \
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 mingw-w64-x86_64-libjpeg-turbo \
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 mingw-w64-x86_64-librsvg \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w= 64-x86_64-libxml2 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-gnut= ls

=C2=A0 The packages include the base developer tools (autoconf, a= utomake, grep, make,
=C2=A0 etc.), the compiler toolchain (gcc, gdb, etc= .), several image libraries, an
=C2=A0 xml library, and the GnuTLS (tran= sport layer security) library.

=C2=A0 You now have a complete build = environment for Emacs.


* Install git (optional) and disable auto= crlf=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 [2 mins]

=C2=A0 If you don't already have git on yo= ur system, you can install it in your MSYS2
=C2=A0 environment with:
=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pacman -S git

=C2=A0 The autocrlf= feature of Git may interfere with the configure file, so it is
=C2=A0 b= est to disable this feature by running the command:

=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 git config core.autocrlf false


* Get the Emacs s= ource code=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [15 mins]

=C2=A0 Now y= ou can either get an existing release version of the Emacs source code
= =C2=A0 from the GNU ftp site, or get the more current version and history f= rom the
=C2=A0 git repository.

=C2=A0 You can always find the mos= t recent information on these sources from the GNU
=C2=A0 Savannah Emacs= site, https://savannah= .gnu.org/projects/emacs.


** From the FTP site=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [1= min]

=C2=A0 The Emacs ftp site is located at http://ftp.gnu.org/gnu/emacs/ - download the
=C2= =A0 version you want to build and put the file into a location like C:\emac= s\,
=C2=A0 then uncompress it with tar and cd into the folder. This will= put the Emacs
=C2=A0 source into a folder like C:\emacs\emacs-24.5:
=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cd /c/emacs
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 tar xf emacs-24.5.tar.xz
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cd emacs-= 24.5


** From the git repository=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 [15 mins]

=C2=A0 To download the git repository, do something= like the following - this will
=C2=A0 put the Emacs source into C:\ema= cs\emacs-25:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mkdir /c/emacs
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 cd /c/emacs
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git = clone git://git.sv.gnu.org/emac= s.git emacs-25
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cd emacs-25

* Build Emacs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [45 mins]

= =C2=A0 Now you're ready to build and install Emacs with autogen, config= ure, make,
=C2=A0 and make install.


** Run autogen=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [1 min]

=C2=A0 Run autogen t= o generate the configure script (note: this step is not necessary
=C2=A0= if you are using a release source tarball, as the configure file is includ= ed):

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ./autogen.sh


** Run c= onfigure=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [4 mins]

=C2=A0 Now you can = run configure, which will build the various Makefiles.=C2=A0 The
=C2=A0 = following is a simple example for some configure options - see the INSTALL<= br>=C2=A0 file in this directory for more information on the options availa= ble.

=C2=A0 Note that the --prefix option specifies a location for t= he resulting binary
=C2=A0 files, which 'make install' will use = - if a prefix is not specified the files
=C2=A0 will be put in the stand= ard MinGW-w64 directories.

=C2=A0 Note also that we need to disable = Imagemagick because Emacs does not yet
=C2=A0 support it in Windows.
=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PKG_CONFIG_PATH=3D/mingw64/lib/pkgconfig= \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ./configure \
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 --prefix=3D/c/emacs/emacs-25 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = --host=3Dx86_64-w64-mingw32 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --target=3D= x86_64-w64-mingw32 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --build=3Dx86_64-w64= -mingw32 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --without-imagemagick

<= br>** Run make=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [30 m= ins]

=C2=A0 This will compile Emacs and build the executables, putti= ng them in the src
=C2=A0 directory:

=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 make


** Run make install=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [6 mins]

=C2=A0 = Now you can run make install, which will copy the executable and other file= s
=C2=A0 to the location specified in the configure step:

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 make install


* Test Emacs

=C2=A0= To test it out, run

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ./bin/runemacs.e= xe -Q

=C2=A0 and if all went well, you will have a new 64-bit versio= n of Emacs.


* Credits

=C2=A0 Thanks to Chris Zheng <chriszheng99@gmail.com> for = the original build outline
=C2=A0 as used by the emacsbinw64 project, lo= cated at:

=C2=A0 https://sourceforge= .net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/=


* License

=C2=A0 This file is part of GNU Emacs.
=
=C2=A0 GNU Emacs is free software: you can redistribute it and/or modif= y
=C2=A0 it under the terms of the GNU General Public License as publish= ed by
=C2=A0 the Free Software Foundation, either version 3 of the Licen= se, or
=C2=A0 (at your option) any later version.

=C2=A0 GNU Emac= s is distributed in the hope that it will be useful,
=C2=A0 but WITHOUT = ANY WARRANTY; without even the implied warranty of
=C2=A0 MERCHANTABILIT= Y or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 See the
=C2=A0 GNU General = Public License for more details.

=C2=A0 You should have received a c= opy of the GNU General Public License
=C2=A0 along with GNU Emacs.=C2=A0= If not, see <http://www.gnu.or= g/licenses/>.


* Emacs settings

Local Variables:mode: org
sentence-end-double-space: t
End:





On Sat, De= c 26, 2015 at 2:30 AM, Eli Zaretskii <eliz@gnu.org> wrote:

--089e0122a59caab9cc05280428b1--