From unknown Sat Aug 16 23:51:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22240: Build instructions for 64-bit Windows? Resent-From: Brian Burns Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Dec 2015 22:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22240 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22240@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145108384816529 (code B ref -1); Fri, 25 Dec 2015 22:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Dec 2015 22:50:48 +0000 Received: from localhost ([127.0.0.1]:35813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCbCB-0004IX-Jd for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48219) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCbC9-0004IJ-Rl for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCbC3-00042X-8g for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCbC3-00042T-65 for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCbC1-0003t0-D8 for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 17:50:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCbC0-000420-29 for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 17:50:37 -0500 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]:32847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCbBz-00041w-SJ for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 17:50:35 -0500 Received: by mail-io0-x234.google.com with SMTP id 186so269903145iow.0 for ; Fri, 25 Dec 2015 14:50:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Ymq5Kz0j+9HPYO2oicsAtT0l7NFSMB4Fu30EMO6FUeo=; b=JVdi7NbVl0AukT8Kgp7ZsokROP++XjXmKIEKBjHLbEOK3NUYPj+QtfjTtK9SBpO4GG /NBnWESe/8eI5h9Q6PegrTa8W0cMJ2tKeW5MaJW2nsstG850gVa5VBVeGvgRpIExfeOq RI4SPqsnOD4C3aodtZuUs3xAm5RChexr3VSMXs75MlJSvH8Oqzf2UMdmExGv+/joSFtc O1qfJ/1h6HlVSU78OOKZNbgZ3YQeGzppOK9qu4W54UtpC2GDvBa4I1ItTeVvR3DKwxTf DZhvSMxw9FzeE221eZnT1G9KAl4lhLxXSeiycuGy2OiKpZa1DcfNO19zg9UULcfLsWzZ mpTQ== X-Received: by 10.107.185.6 with SMTP id j6mr37167284iof.111.1451083834936; Fri, 25 Dec 2015 14:50:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.212.74 with HTTP; Fri, 25 Dec 2015 14:49:55 -0800 (PST) From: Brian Burns Date: Fri, 25 Dec 2015 16:49:55 -0600 Message-ID: Content-Type: multipart/alternative; boundary=94eb2c0866388553270527c0c8a6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c0866388553270527c0c8a6 Content-Type: text/plain; charset=UTF-8 I noticed recently that Emacs didn't have any build instructions for 64-bit Windows - I tried the instructions for the 32-bit build in nt/INSTALL last year [1] but something went wrong at some point (I don't remember what, exactly). I tried again recently using the instructions from the Emacs-w64 project [2] which uses MSYS2 and MinGW-w64 - it worked well and it was also easier to get the necessary libraries, as it has a package manager, pacman. So I thought I would try adapting those instructions to include with Emacs, if it would be helpful - the author Chris Zheng said he wouldn't mind, and I could post it here or the devlist for feedback - it could go in a separate INSTALL64 document, if the existing one is too long. Are there any issues with using MSYS2 over MSYS? I think you can build a 32-bit Emacs with MSYS2 also, but I'm not sure - if so it would be possible to cover both with one document, which might be simpler, but I could start with the 64-bit instructions anyway. Brian Burns [1] https://github.com/emacs-mirror/emacs/blob/master/nt/INSTALL [2] http://sourceforge.net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/ --94eb2c0866388553270527c0c8a6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I noticed recently that Emacs didn't have any build in= structions for 64-bit
Windows - I tried the instructions for the 32-bit = build in nt/INSTALL last
year [1] but something went wrong at some point= (I don't remember what,
exactly). I tried again recently using the = instructions from the Emacs-w64
project [2] which uses MSYS2 and MinGW-w= 64 - it worked well and it was also
easier to get the necessary librarie= s, as it has a package manager, pacman.

So I thought I would try ada= pting those instructions to include with Emacs, if
it would be helpful -= the author Chris Zheng said he wouldn't mind, and I could
post it h= ere or the devlist for feedback - it could go in a separate INSTALL64
do= cument, if the existing one is too long.

Are there any issues with u= sing MSYS2 over MSYS? I think you can build a 32-bit
Emacs with MSYS2 al= so, but I'm not sure - if so it would be possible to cover
both with= one document, which might be simpler, but I could start with the
64-bit= instructions anyway.

--94eb2c0866388553270527c0c8a6-- From unknown Sat Aug 16 23:51:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22240: Build instructions for 64-bit Windows? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Dec 2015 08:30: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: To: Brian Burns Cc: 22240@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22240-submit@debbugs.gnu.org id=B22240.1451118592650 (code B ref 22240); Sat, 26 Dec 2015 08:30:02 +0000 Received: (at 22240) by debbugs.gnu.org; 26 Dec 2015 08:29:52 +0000 Received: from localhost ([127.0.0.1]:36720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCkEa-0000AQ-9d for submit@debbugs.gnu.org; Sat, 26 Dec 2015 03:29:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57108) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCkEZ-0000AD-8x for 22240@debbugs.gnu.org; Sat, 26 Dec 2015 03:29:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCkEP-0005aT-2y for 22240@debbugs.gnu.org; Sat, 26 Dec 2015 03:29:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCkEO-0005aJ-Vk; Sat, 26 Dec 2015 03:29:40 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4950 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aCkEO-0007XA-D9; Sat, 26 Dec 2015 03:29:40 -0500 Date: Sat, 26 Dec 2015 10:30:25 +0200 Message-Id: <83ege9k3xa.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Brian Burns on Fri, 25 Dec 2015 16:49:55 -0600) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) From unknown Sat Aug 16 23:51:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22240: Build instructions for 64-bit Windows? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Dec 2015 08:58: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: To: Brian Burns Cc: 22240@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22240-submit@debbugs.gnu.org id=B22240.14511202613271 (code B ref 22240); Sat, 26 Dec 2015 08:58:02 +0000 Received: (at 22240) by debbugs.gnu.org; 26 Dec 2015 08:57:41 +0000 Received: from localhost ([127.0.0.1]:36729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCkfU-0000qh-Md for submit@debbugs.gnu.org; Sat, 26 Dec 2015 03:57:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60880) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCkfS-0000qT-Ju for 22240@debbugs.gnu.org; Sat, 26 Dec 2015 03:57:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCkfI-0003PD-B8 for 22240@debbugs.gnu.org; Sat, 26 Dec 2015 03:57:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, T_FILL_THIS_FORM_SHORT autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCkfI-0003P9-7m; Sat, 26 Dec 2015 03:57:28 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1040 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aCkfH-0006rN-KF; Sat, 26 Dec 2015 03:57:28 -0500 Date: Sat, 26 Dec 2015 10:58:12 +0200 Message-Id: <83d1ttk2mz.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Brian Burns on Fri, 25 Dec 2015 16:49:55 -0600) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Brian Burns > Date: Fri, 25 Dec 2015 16:49:55 -0600 > > I noticed recently that Emacs didn't have any build instructions for 64-bit > Windows - I tried the instructions for the 32-bit build in nt/INSTALL last > year [1] but something went wrong at some point (I don't remember what, > exactly). I tried again recently using the instructions from the Emacs-w64 > project [2] which uses MSYS2 and MinGW-w64 - it worked well and it was also > easier to get the necessary libraries, as it has a package manager, pacman. > > So I thought I would try adapting those instructions to include with Emacs, if > it would be helpful - the author Chris Zheng said he wouldn't mind, and I could > post it here or the devlist for feedback - it could go in a separate INSTALL64 > document, if the existing one is too long. It's OK to have a separate file, but then nt/INSTALL should say right at the beginning that instructions for a 64-bit build are in that file. Also, if we are going to install this, we will need the full name and email address of Chris Zheng, to give him credit. The instructions are short enough to consider them a "tiny change", so no legal paperwork is necessary in this case. > Are there any issues with using MSYS2 over MSYS? I think you can build a 32-bit > Emacs with MSYS2 also, but I'm not sure - if so it would be possible to cover > both with one document, which might be simpler, but I could start with the > 64-bit instructions anyway. I'm okay with saying that MSYS2 instructions cover the 32-bit build as well, but they require installing a different toolchain, so I think the current instructions should stay, at least for those who prefer mingw.org's tools and the optional libraries pointed to in INSTALL, which were all compiled using mingw.org's tools (I have no idea whether some subtle incompatibilities might exist between the binaries produced by the two toolchains). > [1] https://github.com/emacs-mirror/emacs/blob/master/nt/INSTALL > [2] > http://sourceforge.net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/ Finally, I have some comments on the MSYS2 instructions, if they are to be added to the repository: . The "Get the source code" section should be rewritten to cater both to those who build from the Git repository (and it's better to refer those to the corresponding Savannah page, like nt/INSTALL does, than to repeat the URL, which might become outdated, in the file), and those who build from a source tarball of an official release. . 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. Specifically: . the --host, --target, and --build switches should not be needed at all, ever . 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) . 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) . 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. . The "Run" section doesn't belong in installation instructions. I invite people who use MinGW64 to build Emacs to please send their comments and observations about the build, so that they could be reflected in what we install, if needed. Thanks. From unknown Sat Aug 16 23:51:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22240: Build instructions for 64-bit Windows? 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: To: Eli Zaretskii Cc: Chris Zheng , 22240@debbugs.gnu.org Received: via spool by 22240-submit@debbugs.gnu.org id=B22240.145137321932329 (code B ref 22240); Tue, 29 Dec 2015 07:14:02 +0000 Received: (at 22240) by debbugs.gnu.org; 29 Dec 2015 07:13:39 +0000 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 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 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) MIME-Version: 1.0 Received: by 10.50.18.36 with HTTP; Mon, 28 Dec 2015 23:12:51 -0800 (PST) In-Reply-To: <83ege9k3xa.fsf@gnu.org> References: <83ege9k3xa.fsf@gnu.org> From: Brian Burns Date: Tue, 29 Dec 2015 01:12:51 -0600 Message-ID: Content-Type: multipart/alternative; boundary=089e0122a59caab9cc05280428b1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --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-- From unknown Sat Aug 16 23:51:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22240: Build instructions for 64-bit Windows? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Dec 2015 17:33:01 +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: To: Brian Burns Cc: chriszheng99@gmail.com, 22240@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22240-submit@debbugs.gnu.org id=B22240.14514103467125 (code B ref 22240); Tue, 29 Dec 2015 17:33:01 +0000 Received: (at 22240) by debbugs.gnu.org; 29 Dec 2015 17:32:26 +0000 Received: from localhost ([127.0.0.1]:48840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDy8H-0001ql-Jt for submit@debbugs.gnu.org; Tue, 29 Dec 2015 12:32:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59428) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDy8F-0001qW-QD for 22240@debbugs.gnu.org; Tue, 29 Dec 2015 12:32:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDy89-0002Ao-7j for 22240@debbugs.gnu.org; Tue, 29 Dec 2015 12:32:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDy82-00029a-JC; Tue, 29 Dec 2015 12:32:10 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4553 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aDy81-000717-QE; Tue, 29 Dec 2015 12:32:10 -0500 Date: Tue, 29 Dec 2015 19:33:03 +0200 Message-Id: <83d1tpdusw.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Brian Burns on Tue, 29 Dec 2015 01:12:51 -0600) References: <83ege9k3xa.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Brian Burns > Date: Tue, 29 Dec 2015 01:12:51 -0600 > Cc: 22240@debbugs.gnu.org, Chris Zheng > > Okay thanks, here's a rough draft for the instructions Thanks. Allow me a few comments. > > 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. Please do file a bug report. Users shouldn't need to specify the host for supported systems. It's also worthwhile to report this to MSYS2 developers, I think: that string is not the canonical host description for MinGW64, it's for building an MSYS program, which is not what is going on here. > 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 Sorry, I don't understand: this _is_ INSTALL, isn't it? And the current INSTALL does include a couple of examples. What am I missing? > > 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, But that's a problem MSYS2 and MinGW64 should have solved already, right? IOW, it's not something specific to Emacs. > > 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. I indeed think that the instructions should tell how to create a desktop shortcut for running Emacs. > 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. See below for some more. > * 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'. I would suggest removing this time information: it is very system-dependent, and can also change radically depending on your network access speed. nt/INSTALL doesn't have such information, and I don't recall anyone ever complaining. > 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. GNU Coding Standards frown upon using "path" for anything except PATH-style lists of directories. Please use "file names" or "directory name" instead. Also, please keep 2 spaces between sentences, as we use the US English conventions in GNU documentation. > 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. Here I would say that the user can omit some or all of the optional libraries (all but the first 3), if they so wish. > * Install git (optional) and disable autocrlf [2 mins] This section should say that Git is only needed if the user wants to build the development version. > 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. No, if --prefix is not specified, the files will be installed in the standard _Unix_ directories, not standard MinGW-w64 directories. > ** Run make [30 mins] This takes 4 min on my system, for the full bootstrap (building a release tarball is much faster). I guess you didn't use "make -j8" or some such. See, this is why these times are not such a good idea. > ** Run make install [6 mins] Takes something like 2 min here. > Now you can run make install, which will copy the executable and other files > to the location specified in the configure step: > > make install One can also say make install prefix=/wherever to install in a different place. > * Emacs settings > > Local Variables: > mode: org > sentence-end-double-space: t > End: This should be preceded by a Ctrl-L character, since Emacs looks for the file-local variables in the last page of the file. Thanks. From unknown Sat Aug 16 23:51:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22240: Build instructions for 64-bit Windows? Resent-From: Brian Burns Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 07:10: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: To: Eli Zaretskii Cc: Chris Zheng , 22240@debbugs.gnu.org Received: via spool by 22240-submit@debbugs.gnu.org id=B22240.145145937019621 (code B ref 22240); Wed, 30 Dec 2015 07:10:02 +0000 Received: (at 22240) by debbugs.gnu.org; 30 Dec 2015 07:09:30 +0000 Received: from localhost ([127.0.0.1]:49300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEAsw-00056K-6n for submit@debbugs.gnu.org; Wed, 30 Dec 2015 02:09:29 -0500 Received: from mail-ig0-f171.google.com ([209.85.213.171]:37948) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEAst-000566-Ov for 22240@debbugs.gnu.org; Wed, 30 Dec 2015 02:09:25 -0500 Received: by mail-ig0-f171.google.com with SMTP id mw1so47193991igb.1 for <22240@debbugs.gnu.org>; Tue, 29 Dec 2015 23:09:23 -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=ES2OUPMmrBStlIV7mgekHxI5IBwxrMOMFIzMk7LrL78=; b=bJ3DZd9EC/q6HeDD307V7kjoAyoe+EOIgelVj01SHY+RBFMo8vLcvCqE+1ISS9PMat 9cQXjZfIhY/XS4glk5ff+GDx5iLa6JmNva6NNLHUgIZ/mzcF8/ysoKPQSOlIsBLngjdQ apixd62WjU19BpjWwc2OfLKMk1ul98I/9hUd6ci63w90CnR+zMV5FJKOCkOWDoqYx7He G+tJm7EwJR4KRpf/3/m2hnEsZWm/Z1bULoNEwcrLOeGIQYmXTIZd/t90A8pfSFxiKJcp yWWoYD/a0PhUd8BquMwu6pw//KwE/HUu7QwBGf0CiPv9Y6uIce0FX5AWTlg94auy7qiz 26+w== X-Received: by 10.50.79.234 with SMTP id m10mr10039199igx.23.1451459358055; Tue, 29 Dec 2015 23:09:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.227.173 with HTTP; Tue, 29 Dec 2015 23:08:38 -0800 (PST) In-Reply-To: <83d1tpdusw.fsf@gnu.org> References: <83ege9k3xa.fsf@gnu.org> <83d1tpdusw.fsf@gnu.org> From: Brian Burns Date: Wed, 30 Dec 2015 01:08:38 -0600 Message-ID: Content-Type: multipart/alternative; boundary=089e0122a59c71652d052818379b X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e0122a59c71652d052818379b Content-Type: text/plain; charset=UTF-8 Thanks for the feedback - the updated file is included at the end and at https://gist.github.com/bburns/43c9f170361aecee3b71 - Chris added a few comments there. >> 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. This turned out to be due to not being in the right environment - I added the step to switch to the MinGW-w64 environment and now it works without specifying the --host, etc. > Sorry, I don't understand: this _is_ INSTALL, isn't it? And the > current INSTALL does include a couple of examples. What am I missing? At the moment, this is a separate file - e.g. it could be nt/INSTALL64, though if we wanted we could merge them. When I tried using the nt/INSTALL instructions last year I was mostly confused about the --prefix option - I didn't understand what was meant by build inside or outside the source tree, and the example given, /d/usr, was a bit foreign to me as a place to store programs, so Chris's example was easier to follow. I tried to keep these instructions simple also, but referred the user to the nt/INSTALL file for more information in a couple of places. >> 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, > But that's a problem MSYS2 and MinGW64 should have solved already, > right? IOW, it's not something specific to Emacs. Okay, straightened that out a bit, now it says Adding these directories to your PATH tells Emacs where to find the DLLs it needs to run, and some optional commands like grep and find. These commands will also be available at the Windows console. > I indeed think that the instructions should tell how to create a > desktop shortcut for running Emacs. > I would suggest removing this time information Okay, added a section for making a shortcut, and removed the time info. > I guess you didn't use "make -j8" or some such. That's a good option to include - I added it to the make section. Thanks again for your help - 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 space required is 3GB: 1.8GB for MSYS2 / MinGW-w64 and 1.2GB for Emacs with the full repository, or less if you're using a release tarball. * Set up the MinGW-w64 / MSYS2 build environment MinGW-w64 provides a complete runtime for projects built with gcc for 64-bit Windows - it's located at http://mingw-w64.org/. MSYS2 is a Cygwin-derived software distribution for Windows which provides build tools for MinGW-w64 - see http://msys2.github.io/. ** Download and install MinGW-w64 and MSYS2 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 directory names 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 Control Panel / System and Security / System / Advanced system settings / Environment Variables / Edit path. Adding these directories to your PATH tells Emacs where to find the DLLs it needs to run, and some optional commands like grep and find. These commands will also be available at the Windows console. ** Download and install the necessary packages 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. Only the first three packages are required (base-devel, toolchain, xpm-nox) - the rest are optional. You now have a complete build environment for Emacs. * Install git (optional) and disable autocrlf If you're going to be building the development version of Emacs from the git repository, and 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 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 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. 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 ** From the git repository 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 * Build Emacs Now you're ready to build and install Emacs with autogen, configure, make, and make install. First we need to switch to the MinGW-w64 environment - exit the MSYS2 BASH console and run mingw64_shell.bat in the C:\msys64 folder, then cd back to your Emacs source directory, e.g.: cd /c/emacs/emacs-25 ** Run autogen 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 Now you can run configure, which will build the various Makefiles - note that the example given here is just a simple one - for more information on the options available please see the nt/INSTALL file. The --prefix option specifies a location for the resulting binary files, which 'make install' will use - in this example we set it to C:\emacs\emacs-25. If a prefix is not specified the files will be put in the standard Unix directories located in your C:\msys64 directory, but this is not recommended. Note also that we need to disable Imagemagick because Emacs does not yet support it on Windows. PKG_CONFIG_PATH=/mingw64/lib/pkgconfig \ ./configure \ --prefix=/c/emacs/emacs-25 \ --without-imagemagick ** Run make This will compile Emacs and build the executables, putting them in the src directory: make To speed up the process, you can try running make -jN where N is the number of cores in your system - if your MSYS2 make supports parallel execution it will run significantly faster. ** Run make install Now you can run make install, which will copy the executable and other files to the location specified in the configure step. This will create the bin, libexec, share, and var directories: make install You can also say make install prefix=/c/somewhere to install them somewhere else. * 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. * Make a shortcut To make a shortcut to run the new Emacs, right click on the location where you want to put it, e.g. the Desktop, select New / Shortcut, then select runemacs.exe in the bin folder of the new Emacs, and give it a name. You can set any command line options by right clicking on the resulting shortcut, select Properties, then add any options to the Target command, e.g. --debug-init. * 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 . On Tue, Dec 29, 2015 at 11:33 AM, Eli Zaretskii wrote: > > From: Brian Burns > > Date: Tue, 29 Dec 2015 01:12:51 -0600 > > Cc: 22240@debbugs.gnu.org, Chris Zheng > > > > Okay thanks, here's a rough draft for the instructions > > Thanks. Allow me a few comments. > > > > 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. > > Please do file a bug report. Users shouldn't need to specify the host > for supported systems. > > It's also worthwhile to report this to MSYS2 developers, I think: that > string is not the canonical host description for MinGW64, it's for > building an MSYS program, which is not what is going on here. > > > 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 > > Sorry, I don't understand: this _is_ INSTALL, isn't it? And the > current INSTALL does include a couple of examples. What am I missing? > > > > 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, > > But that's a problem MSYS2 and MinGW64 should have solved already, > right? IOW, it's not something specific to Emacs. > > > > 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. > > I indeed think that the instructions should tell how to create a > desktop shortcut for running Emacs. > > > 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. > > See below for some more. > > > * 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'. > > I would suggest removing this time information: it is very > system-dependent, and can also change radically depending on your > network access speed. nt/INSTALL doesn't have such information, and I > don't recall anyone ever complaining. > > > 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. > > GNU Coding Standards frown upon using "path" for anything except > PATH-style lists of directories. Please use "file names" or > "directory name" instead. > > Also, please keep 2 spaces between sentences, as we use the US English > conventions in GNU documentation. > > > 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. > > Here I would say that the user can omit some or all of the optional > libraries (all but the first 3), if they so wish. > > > * Install git (optional) and disable autocrlf [2 mins] > > This section should say that Git is only needed if the user wants to > build the development version. > > > 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. > > No, if --prefix is not specified, the files will be installed in the > standard _Unix_ directories, not standard MinGW-w64 directories. > > > ** Run make [30 mins] > > This takes 4 min on my system, for the full bootstrap (building a > release tarball is much faster). I guess you didn't use "make -j8" or > some such. See, this is why these times are not such a good idea. > > > ** Run make install [6 mins] > > Takes something like 2 min here. > > > Now you can run make install, which will copy the executable and other > files > > to the location specified in the configure step: > > > > make install > > One can also say > > make install prefix=/wherever > > to install in a different place. > > > * Emacs settings > > > > Local Variables: > > mode: org > > sentence-end-double-space: t > > End: > > This should be preceded by a Ctrl-L character, since Emacs looks for > the file-local variables in the last page of the file. > > Thanks. > --089e0122a59c71652d052818379b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for the feedback - the updated file is included at = the end and at
https://gist.github.com/bburns/43c9f170361aecee3b7= 1 - Chris added a
few comments there.

>> I tried runn= ing configure without the '--host=3Dx86_64-w64-mingw32' etc switche= s
>> but got an error:
>> configure: error: Emacs does no= t support 'x86_64-pc-msys' systems.

This turned out to be du= e to not being in the right environment - I added the
step to switch to = the MinGW-w64 environment and now it works without specifying
the --host= , etc.

> Sorry, I don't understand: this _is_ INSTALL, isn= 9;t it?=C2=A0 And the
> current INSTALL does include a couple of exam= ples.=C2=A0 What am I missing?

At the moment, this is a separate fil= e - e.g. it could be nt/INSTALL64, though
if we wanted we could merge th= em.

When I tried using the nt/INSTALL instructions last year I was m= ostly confused
about the --prefix option - I didn't understand what = was meant by build inside
or outside the source tree, and the example gi= ven, /d/usr, was a bit foreign to
me as a place to store programs, so Ch= ris's example was easier to follow. I
tried to keep these instructio= ns simple also, but referred the user to the
nt/INSTALL file for more in= formation in a couple of places.

>> I think this was in part b= ecause MSYS2 doesn't add its folders to the PATH, and
>> if yo= u use the PATH variable there might be both 32-bit and 64-bit DLLs on it,> But that's a problem MSYS2 and MinGW64 should have solved alread= y,
> right?=C2=A0 IOW, it's not something specific to Emacs.
<= br>Okay, straightened that out a bit, now it says

=C2=A0 Adding the= se directories to your PATH tells Emacs where to find the DLLs it
=C2=A0= needs to run, and some optional commands like grep and find.=C2=A0 These c= ommands
=C2=A0 will also be available at the Windows console.

>= ; I indeed think that the instructions should tell how to create a
> = desktop shortcut for running Emacs.
> I would suggest removing this t= ime information

Okay, added a section for making a shortcut, and rem= oved the time info.

> I guess you didn't use "make -j8&= quot; or some such.=C2=A0

That's a good option to include - I a= dded it to the make section.

Thanks again for your help -
=C2=A0<= br>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 Software 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 Se= e the end of the file for license conditions.

This document describe= s 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 bu= ilding a 32-bit Emacs using MSYS and MinGW, see the INSTALL document in
= this directory.

Do not use this recipe with Cygwin.=C2=A0 For buildi= ng on Cygwin, use the normal
installation instructions in ../INSTALL.

* Requirements

=C2=A0 The total space required is 3GB: 1.8G= B for MSYS2 / MinGW-w64 and 1.2GB for
=C2=A0 Emacs with the full reposit= ory, or less if you're using a release tarball.


* Set up the= MinGW-w64 / MSYS2 build environment

=C2=A0 MinGW-w64 provides a com= plete runtime for projects built with gcc for 64-bit
=C2=A0 Windows - it= 's located at http://mingw-w64.org/.

=C2=A0 MSYS2 is a Cygwin-derived software distribution for Windo= ws which provides
=C2=A0 build tools for MinGW-w64 - see
http://msys2.github.io/.


** Download an= d install MinGW-w64 and MSYS2

=C2=A0 You can download the x86_64 ver= sion 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 preferred d= irectory, e.g. the default
=C2=A0 C:\msys64 - this will install MinGW-w6= 4 also.=C2=A0 Note that directory names
=C2=A0 containing spaces may cau= se problems.

=C2=A0 Then you'll need to add the following direct= ories 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 Control Panel / System and Security / System /<= br>=C2=A0 Advanced system settings / Environment Variables / Edit path.
=
=C2=A0 Adding these directories to your PATH tells Emacs where to find = the DLLs it
=C2=A0 needs to run, and some optional commands like grep an= d find.=C2=A0 These commands
=C2=A0 will also be available at the Window= s console.


** Download and install the necessary packages
=C2=A0 Run msys2_shell.bat in your MSYS2 directory and you will see a BASH= window
=C2=A0 opened.

=C2=A0 In the BASH prompt, use the followi= ng command to install the necessary
=C2=A0 packages (you can copy and pa= ste 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-x= 86_64-toolchain \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-xpm-no= x \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-libtiff \
=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-w64-x86_64-libxml2 \<= br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mingw-w64-x86_64-gnutls

=C2=A0 The= packages include the base developer tools (autoconf, automake, grep, make,=
=C2=A0 etc.), the compiler toolchain (gcc, gdb, etc.), several image li= braries, an
=C2=A0 xml library, and the GnuTLS (transport layer security= ) library.=C2=A0 Only the
=C2=A0 first three packages are required (base= -devel, toolchain, xpm-nox) - the rest
=C2=A0 are optional.

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


* Insta= ll git (optional) and disable autocrlf

=C2=A0 If you're going to= be building the development version of Emacs from the git
=C2=A0 reposi= tory, and you don't already have git on your system, you can install it=
=C2=A0 in your MSYS2 environment with:

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 pacman -S git

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

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git config co= re.autocrlf false


* Get the Emacs source code

=C2=A0 Now = you 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 = 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:\emacs\,
=C2=A0 then u= ncompress it with tar. This will put the Emacs source into a folder like=C2=A0 C:\emacs\emacs-24.5:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cd /c/em= acs
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tar xf emacs-24.5.tar.xz


*= * From the git repository

=C2=A0 To download the git repository, do = something like the following - this will
=C2=A0 put the Emacs source int= o C:\emacs\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/emacs.git emacs-25


* Build Emacs

=C2=A0 Now you&#= 39;re ready to build and install Emacs with autogen, configure, make,
= =C2=A0 and make install.

=C2=A0 First we need to switch to the MinGW= -w64 environment - exit the MSYS2 BASH
=C2=A0 console and run mingw64_sh= ell.bat in the C:\msys64 folder, then cd back to
=C2=A0 your Emacs sourc= e directory, e.g.:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cd /c/emacs/emacs-= 25


** Run autogen

=C2=A0 Run autogen to generate the conf= igure script (note: this step is not necessary
=C2=A0 if you are using a= release source tarball, as the configure file is included):

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


** Run configure

= =C2=A0 Now you can run configure, which will build the various Makefiles - = note that
=C2=A0 the example given here is just a simple one - for more = information on the
=C2=A0 options available please see the nt/INSTALL fi= le.

=C2=A0 The --prefix option specifies a location for the resultin= g binary files, which
=C2=A0 'make install' will use - in this e= xample we set it to C:\emacs\emacs-25. If a
=C2=A0 prefix is not specifi= ed the files will be put in the standard Unix directories
=C2=A0 located= in your C:\msys64 directory, but this is not recommended.

=C2=A0 No= te also that we need to disable Imagemagick because Emacs does not yet
= =C2=A0 support it on Windows.

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PKG_CON= FIG_PATH=3D/mingw64/lib/pkgconfig \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ./con= figure \
=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 --without-imagemagick


** Run ma= ke

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

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

=C2=A0 To speed up the process, you can try running

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 make -jN

=C2=A0 where N is the number of= cores in your system - if your MSYS2 make supports
=C2=A0 parallel exec= ution it will run significantly faster.


** Run make install
<= br>=C2=A0 Now you can run make install, which will copy the executable and = other files
=C2=A0 to the location specified in the configure step.=C2= =A0 This will create the bin,
=C2=A0 libexec, share, and var directories= :

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

=C2=A0 You can = also say

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 make install prefix=3D/c/som= ewhere

=C2=A0 to install them somewhere else.


* Test Emac= s

=C2=A0 To test it out, run

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .= /bin/runemacs.exe -Q

=C2=A0 and if all went well, you will have a ne= w 64-bit version of Emacs.


* Make a shortcut

=C2=A0 To ma= ke a shortcut to run the new Emacs, right click on the location where you=C2=A0 want to put it, e.g. the Desktop, select New / Shortcut, then sele= ct
=C2=A0 runemacs.exe in the bin folder of the new Emacs, and give it a= name.

=C2=A0 You can set any command line options by right clicking= on the resulting
=C2=A0 shortcut, select Properties, then add any optio= ns to the Target command,
=C2=A0 e.g. --debug-init.


* Credits=

=C2=A0 Thanks to Chris Zheng for the original build outline as used= by the
=C2=A0 emacsbinw64 project, located at:

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


* License

= =C2=A0 This file is part of GNU Emacs.

=C2=A0 GNU Emacs is free soft= ware: you can redistribute it and/or modify
=C2=A0 it under the terms of= the GNU General Public License as published by
=C2=A0 the Free Software= Foundation, either version 3 of the License, or
=C2=A0 (at your option)= any later version.

=C2=A0 GNU Emacs is distributed in the hope that= it will be useful,
=C2=A0 but WITHOUT ANY WARRANTY; without even the im= plied warranty of
=C2=A0 MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR= POSE.=C2=A0 See the
=C2=A0 GNU General Public License for more details.<= br>
=C2=A0 You should have received a copy of the GNU General Public Lic= ense
=C2=A0 along with GNU Emacs.=C2=A0 If not, see <http://www.gnu.org/licenses/>.


<= /div>

On Tue, Dec = 29, 2015 at 11:33 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Brian Burns <bburns.km@gmail.com>
> Date: Tue, 29 Dec 2015 01:12:51 -0600
> Cc: 22240@debbugs.gnu.org= , Chris Zheng <chriszheng99@gm= ail.com>
>
> Okay thanks, here's a rough draft for the instructions

Thanks.=C2=A0 Allow me a few comments.

> > the --host, --target, and --build switches should not be needed >
> I tried running configure without the '--host=3Dx86_64-w64-mingw32= ' etc switches
> but got an error:
>
> configure: error: Emacs does not support 'x86_64-pc-msys' syst= ems.
> 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 bu= g report
> for that also if needed.

Please do file a bug report.=C2=A0 Users shouldn't need to specify the = host
for supported systems.

It's also worthwhile to report this to MSYS2 developers, I think: that<= br> string is not the canonical host description for MinGW64, it's for
building an MSYS program, which is not what is going on here.

> Okay, I put the --prefix on the configure command, but I think it woul= d be good
> if the instructions included a simple example, and refer the user to t= he
> INSTALL
> instructions for more options

Sorry, I don't understand: this _is_ INSTALL, isn't it?=C2=A0 And t= he
current INSTALL does include a couple of examples.=C2=A0 What am I missing?=

> > the 'cp' commands I don't understand at all: if PREFI= X is chosen
> > correctly, the Emacs's bin/ directory and the MinGW64's b= in/
> > 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 DLL= s on it,

But that's a problem MSYS2 and MinGW64 should have solved already,
right?=C2=A0 IOW, it's not something specific to Emacs.

> > The "Run" section doesn't belong in installation in= structions.
>
> I think it might be good to include a simple Test section that just sa= ys to
> run emacs with
>
> ./bin/runemacs.exe -Q
>
> to check that it works - mainly because a Windows user might tend to l= aunch
> 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.

I indeed think that the instructions should tell how to create a
desktop shortcut for running Emacs.

> Any corrections or additions are welcome - I'm a novice at buildin= g things
> like this so am not sure what a more advanced user might want to see.<= br>
See below for some more.

> * 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'.
I would suggest removing this time information: it is very
system-dependent, and can also change radically depending on your
network access speed.=C2=A0 nt/INSTALL doesn't have such information, a= nd I
don't recall anyone ever complaining.

> Run this file to install MSYS2 in your preferred directory, e.g. the d= efault
> C:\msys64 - this will install MinGW-w64 also. Note that a path contain= ing
> spaces may cause problems.

GNU Coding Standards frown upon using "path" for anything except<= br> PATH-style lists of directories.=C2=A0 Please use "file names" or=
"directory name" instead.

Also, please keep 2 spaces between sentences, as we use the US English
conventions in GNU documentation.

> 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, gre= p, make,
> etc.), the compiler toolchain (gcc, gdb, etc.), several image librarie= s, an
> xml library, and the GnuTLS (transport layer security) library.

Here I would say that the user can omit some or all of the optional
libraries (all but the first 3), if they so wish.

> * Install git (optional) and disable autocrlf [2 mins]

This section should say that Git is only needed if the user wants to
build the development version.

> Note that the --prefix option specifies a location for the resulting b= inary
> files, which 'make install' will use - if a prefix is not spec= ified the files
> will be put in the standard MinGW-w64 directories.

No, if --prefix is not specified, the files will be installed in the
standard _Unix_ directories, not standard MinGW-w64 directories.

> ** Run make [30 mins]

This takes 4 min on my system, for the full bootstrap (building a
release tarball is much faster).=C2=A0 I guess you didn't use "mak= e -j8" or
some such.=C2=A0 See, this is why these times are not such a good idea.

> ** Run make install [6 mins]

Takes something like 2 min here.

> Now you can run make install, which will copy the executable and other= files
> to the location specified in the configure step:
>
> make install

One can also say

=C2=A0 make install prefix=3D/wherever

to install in a different place.

> * Emacs settings
>
> Local Variables:
> mode: org
> sentence-end-double-space: t
> End:

This should be preceded by a Ctrl-L character, since Emacs looks for
the file-local variables in the last page of the file.

Thanks.

--089e0122a59c71652d052818379b-- From unknown Sat Aug 16 23:51:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Brian Burns Subject: bug#22240: closed (Re: bug#22240: Build instructions for 64-bit Windows?) Message-ID: References: <83d1tmblhd.fsf@gnu.org> X-Gnu-PR-Message: they-closed 22240 X-Gnu-PR-Package: emacs Reply-To: 22240@debbugs.gnu.org Date: Thu, 31 Dec 2015 17:02:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1451581322-16479-1" This is a multi-part message in MIME format... ------------=_1451581322-16479-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22240: Build instructions for 64-bit Windows? which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22240@debbugs.gnu.org. --=20 22240: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22240 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1451581322-16479-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22240-done) by debbugs.gnu.org; 31 Dec 2015 17:01:23 +0000 Received: from localhost ([127.0.0.1]:51892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEgbL-0004Gp-Jg for submit@debbugs.gnu.org; Thu, 31 Dec 2015 12:01:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40989) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEgbJ-0004Gd-R0 for 22240-done@debbugs.gnu.org; Thu, 31 Dec 2015 12:01:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEgbD-0006Te-Sp for 22240-done@debbugs.gnu.org; Thu, 31 Dec 2015 12:01:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEgb8-0006Qb-FV; Thu, 31 Dec 2015 12:01:10 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2332 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aEgb7-00062l-AT; Thu, 31 Dec 2015 12:01:10 -0500 Date: Thu, 31 Dec 2015 19:01:50 +0200 Message-Id: <83d1tmblhd.fsf@gnu.org> From: Eli Zaretskii To: Brian Burns In-reply-to: (message from Brian Burns on Wed, 30 Dec 2015 01:08:38 -0600) Subject: Re: bug#22240: Build instructions for 64-bit Windows? References: <83ege9k3xa.fsf@gnu.org> <83d1tpdusw.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22240-done Cc: chriszheng99@gmail.com, 22240-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Brian Burns > Date: Wed, 30 Dec 2015 01:08:38 -0600 > Cc: 22240@debbugs.gnu.org, Chris Zheng > > Thanks for the feedback - the updated file is included at the end and at > https://gist.github.com/bburns/43c9f170361aecee3b71 - Chris added a > few comments there. Thanks, pushed to the emacs-25 branch. ------------=_1451581322-16479-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Dec 2015 22:50:48 +0000 Received: from localhost ([127.0.0.1]:35813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCbCB-0004IX-Jd for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48219) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCbC9-0004IJ-Rl for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCbC3-00042X-8g for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCbC3-00042T-65 for submit@debbugs.gnu.org; Fri, 25 Dec 2015 17:50:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCbC1-0003t0-D8 for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 17:50:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCbC0-000420-29 for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 17:50:37 -0500 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]:32847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCbBz-00041w-SJ for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 17:50:35 -0500 Received: by mail-io0-x234.google.com with SMTP id 186so269903145iow.0 for ; Fri, 25 Dec 2015 14:50:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Ymq5Kz0j+9HPYO2oicsAtT0l7NFSMB4Fu30EMO6FUeo=; b=JVdi7NbVl0AukT8Kgp7ZsokROP++XjXmKIEKBjHLbEOK3NUYPj+QtfjTtK9SBpO4GG /NBnWESe/8eI5h9Q6PegrTa8W0cMJ2tKeW5MaJW2nsstG850gVa5VBVeGvgRpIExfeOq RI4SPqsnOD4C3aodtZuUs3xAm5RChexr3VSMXs75MlJSvH8Oqzf2UMdmExGv+/joSFtc O1qfJ/1h6HlVSU78OOKZNbgZ3YQeGzppOK9qu4W54UtpC2GDvBa4I1ItTeVvR3DKwxTf DZhvSMxw9FzeE221eZnT1G9KAl4lhLxXSeiycuGy2OiKpZa1DcfNO19zg9UULcfLsWzZ mpTQ== X-Received: by 10.107.185.6 with SMTP id j6mr37167284iof.111.1451083834936; Fri, 25 Dec 2015 14:50:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.212.74 with HTTP; Fri, 25 Dec 2015 14:49:55 -0800 (PST) From: Brian Burns Date: Fri, 25 Dec 2015 16:49:55 -0600 Message-ID: Subject: Build instructions for 64-bit Windows? To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=94eb2c0866388553270527c0c8a6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c0866388553270527c0c8a6 Content-Type: text/plain; charset=UTF-8 I noticed recently that Emacs didn't have any build instructions for 64-bit Windows - I tried the instructions for the 32-bit build in nt/INSTALL last year [1] but something went wrong at some point (I don't remember what, exactly). I tried again recently using the instructions from the Emacs-w64 project [2] which uses MSYS2 and MinGW-w64 - it worked well and it was also easier to get the necessary libraries, as it has a package manager, pacman. So I thought I would try adapting those instructions to include with Emacs, if it would be helpful - the author Chris Zheng said he wouldn't mind, and I could post it here or the devlist for feedback - it could go in a separate INSTALL64 document, if the existing one is too long. Are there any issues with using MSYS2 over MSYS? I think you can build a 32-bit Emacs with MSYS2 also, but I'm not sure - if so it would be possible to cover both with one document, which might be simpler, but I could start with the 64-bit instructions anyway. Brian Burns [1] https://github.com/emacs-mirror/emacs/blob/master/nt/INSTALL [2] http://sourceforge.net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/ --94eb2c0866388553270527c0c8a6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I noticed recently that Emacs didn't have any build in= structions for 64-bit
Windows - I tried the instructions for the 32-bit = build in nt/INSTALL last
year [1] but something went wrong at some point= (I don't remember what,
exactly). I tried again recently using the = instructions from the Emacs-w64
project [2] which uses MSYS2 and MinGW-w= 64 - it worked well and it was also
easier to get the necessary librarie= s, as it has a package manager, pacman.

So I thought I would try ada= pting those instructions to include with Emacs, if
it would be helpful -= the author Chris Zheng said he wouldn't mind, and I could
post it h= ere or the devlist for feedback - it could go in a separate INSTALL64
do= cument, if the existing one is too long.

Are there any issues with u= sing MSYS2 over MSYS? I think you can build a 32-bit
Emacs with MSYS2 al= so, but I'm not sure - if so it would be possible to cover
both with= one document, which might be simpler, but I could start with the
64-bit= instructions anyway.

--94eb2c0866388553270527c0c8a6-- ------------=_1451581322-16479-1--