From f7aa938dbba2514aab73691eb6beea26dfa41d70 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 7 Nov 2017 18:01:01 -0500 Subject: [PATCH v3] * nt/INSTALL.W64: Add "Troubleshooting" section (Bug#28601). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Vincent Belaiche --- nt/INSTALL.W64 | 75 ++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64 index 71864ce..c612b13 100644 --- a/nt/INSTALL.W64 +++ b/nt/INSTALL.W64 @@ -35,18 +35,6 @@ 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 c:/msys64/msys2.exe in your MSYS2 directory and you will see a BASH window @@ -112,11 +100,11 @@ C:\emacs\emacs-24.5: ** 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: +put the Emacs source into C:\emacs\emacs-26: mkdir /c/emacs cd /c/emacs - git clone git://git.sv.gnu.org/emacs.git emacs-25 + git clone git://git.sv.gnu.org/emacs.git emacs-26 (We recommend using the command shown on Savannah Emacs project page.) @@ -150,11 +138,10 @@ which 'make install' will use - in this example we set it to C:\emacs\emacs-26. 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. +Note also that we need to disable Imagemagick and DBUS because Emacs +does not yet support them on Windows. - PKG_CONFIG_PATH=/mingw64/lib/pkgconfig \ - ./configure --prefix=/c/emacs/emacs-26 --without-imagemagick + ./configure --prefix=/c/emacs/emacs-26 --without-imagemagick --without-dbus ** Run make @@ -192,6 +179,14 @@ To test it out, run and if all went well, you will have a new 64-bit version of Emacs. +When running Emacs from outside the mingw64 shell, you will need to +add c:\msys64\mingw64\bin to your Windows PATH, or copy the needed +DLLs into Emacs' bin/ directory. Otherwise features such as TLS which +depend on those DLLs will be missing. + +You can do this through Control Panel / System and Security / System / +Advanced system settings / Environment Variables / Edit path. + * Make a shortcut To make a shortcut to run the new Emacs, right click on the location where you @@ -202,6 +197,50 @@ 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. +* Troubleshooting + +** Missing mingw64.exe launcher + +Older versions of Msys2 may lack the mingw64.exe launcher program. If +you have them, running mingw64_shell.bat or "msys2_shell.cmd -mingw64" +should work instead. + +Alternatively, install mingw64.exe with + + pacman -S msys/msys2-launcher-git + +** Check your $PATH + +When building Emacs, you should have /mingw64/bin in $PATH, such that running + + which gcc + +gives '/mingw64/bin/gcc'. + +** Check your $PKG_CONFIG_PATH + +It should start with '/mingw64/lib/pkgconfig'. + +** Check your MSYS2 fstab file + +Assuming that MSYS2 is installed in c:\msys64, make sure that your fstab file +(c:\msys64\etc\fstab) file contains the following lines (starting a column 0 +in the fstab file): + + c:/msys64/mingw64/bin /mingw64/bin ntfs binary,noacl 0 0 + c:/msys64/mingw32/bin /mingw32/bin ntfs binary,noacl 0 0 + +Please note that only the first line is needed for 64bit compilation, the +second one is for a complete fstab file w.r.t. 32bit compilation. + +If there is a space in the diectory where MSYS2 is installed, it shall be +replaced by \040. For instance, if MSYS is installed under "C:\Program +Files\msys64" there must be this line: + + C:/Program\040Files/msys64/mingw64/bin /mingw64/bin ntfs binary,noacl 0 0 + +As mentioned above, avoiding spaces is preferable. + * Credits Thanks to Chris Zheng for the original build outline as used by the -- 2.6.2.windows.1