From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) Newsgroups: gmane.emacs.bugs Subject: bug#28601: 26.0.50; configure: error: Emacs does not support 'x86_64-pc-msys' systems. Date: Mon, 16 Oct 2017 10:59:58 +0200 Message-ID: <84h8uzwjqp.fsf@AigleRoyal> References: <84o9pyim1a.fsf@AigleRoyal> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1508144439 25532 195.159.176.226 (16 Oct 2017 09:00:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2017 09:00:39 +0000 (UTC) Cc: 28601@debbugs.gnu.org, Vincent =?UTF-8?Q?Bela=C3=AFche?= To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 16 11:00:33 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e41Fy-0004JA-0w for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 11:00:18 +0200 Original-Received: from localhost ([::1]:60053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e41G3-0000Xd-Pl for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 05:00:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e41Fq-0000Sd-5y for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 05:00:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e41Fj-00050q-Fn for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 05:00:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33821) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e41Fj-00050d-Ak for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 05:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e41Fj-0001Ku-1r for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 05:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Oct 2017 09:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28601 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28601-submit@debbugs.gnu.org id=B28601.15081443995090 (code B ref 28601); Mon, 16 Oct 2017 09:00:02 +0000 Original-Received: (at 28601) by debbugs.gnu.org; 16 Oct 2017 08:59:59 +0000 Original-Received: from localhost ([127.0.0.1]:42501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e41Fe-0001K1-Uv for submit@debbugs.gnu.org; Mon, 16 Oct 2017 04:59:59 -0400 Original-Received: from mail-wm0-f44.google.com ([74.125.82.44]:46706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e41Fd-0001Jm-QD for 28601@debbugs.gnu.org; Mon, 16 Oct 2017 04:59:58 -0400 Original-Received: by mail-wm0-f44.google.com with SMTP id m72so853248wmc.1 for <28601@debbugs.gnu.org>; Mon, 16 Oct 2017 01:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version; bh=o2MPOfXb2xBuhk0g13M7lfiTm+9f27qLoRHjuw5H72k=; b=HpjydAmznZtKls/gEl2bWUbANzz25nmx5L4b0PGvM2Ul8FLp6TucxzMMEACOLVJD9k uOn0gH+XFQdiMyWut7b690tPf4Wud4Eo+L8opHPUtZvAF+KNmLL+3dhs/zOioI96Z+0J Tz3iHClR5Ewo1ehez5A/00MqLC1mxPz2bUKQhsgCDnjKVqJGUIAyHC1q+3hMfEJLbfKg rLaEjp1/dCIwyT58IZzeYbV6xRA/aEmD7WPusm387XPm7RLtAs+rPYBuFvkBDGDcrsSV kAnqPoTo46Y/PJlQnvqLZuiIayT9kN+kvJbxjK519dVUeFpl0tQDCSVVLaFsM7L5cPmf 3f9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=o2MPOfXb2xBuhk0g13M7lfiTm+9f27qLoRHjuw5H72k=; b=s4XBIOJKEdGMZ1qByfR968I1rUgDIhQmg549dO6zzWVHWurRVvexhM90k/oNSlj9ip Cu0040T7S05bdgqp3JCLUl23qWEc1CRxGE2Sk5rFXvJEC9TJ+VXHKFLyCSXi5RD9I3a9 H6Gh4IuAwVjEhSTbkoXH2SPGPF0JDBXwDDh0wCG1vJDG7T+NZyg2vjTw42QMNm/PeLS9 KfSDfrWunY7dL+1+6wa2rbKi882Bz0YIhKHeFrN5uXc1Tq7eNTDv0skVDrv5CLk/H6Z1 vuSX+B2HeBi/jbrEs1uae0gpZAOva+GkAu3tJunE1aUXXF43gxEcHevwDKd7vhmBJZ5s bdZA== X-Gm-Message-State: AMCzsaW1TS9Sek8vIxkUb+uz4k8YqDs8VIiUYcBfu+QdTOmeOmW9nZc0 ErplRbIOM2zaHACllViHWNgjmP69 X-Google-Smtp-Source: ABhQp+SR408HPWMysLR9CUBQ/mEWWvPv86+Ke9MuNbWr+9tCqzr23ksW1vaMIHI73DYmoa5gStOShg== X-Received: by 10.28.23.1 with SMTP id 1mr212566wmx.101.1508144391620; Mon, 16 Oct 2017 01:59:51 -0700 (PDT) Original-Received: from AigleRoyal (ARennes-656-1-275-111.w109-218.abo.wanadoo.fr. [109.218.75.111]) by smtp.gmail.com with ESMTPSA id f6sm10834402wre.66.2017.10.16.01.59.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 01:59:49 -0700 (PDT) In-Reply-To: <87vajia4ly.fsf@users.sourceforge.net> X-Antivirus: Avast (VPS 171015-0, 15/10/2017), Outbound message X-Antivirus-Status: Clean X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138507 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Dear Noam, Le 14/10/2017 =E0 03:40, Noam Postavsky a =E9crit : > Noam Postavsky writes: > >> On Fri, Oct 13, 2017 at 10:09 AM, Vincent Bela=EFche >> wrote: >> >>> Please note that gcc -v makes this output even though my MSYSTEM envvar= >>> expands to MINGW64. >>> >>> I think that the objective of the gcc -v is to discriminate between 32 >>> and 64 bits, not between MINGW and MSYS. So, it seems that what we have= >>> is an autoconf bug. Am I wrong ? >> >> I think it means you didn't install the mingw-w64-x86_64-toolchain >> metapackage, so you are using the msys toolchain rather than the mingw >> one. > > Check the output of 'which gcc', it should be at /mingw64/bin/gcc. If > it's /bin/gcc, or /usr/bin/gcc, then you are using the wrong gcc. I managed to build Emacs thanks ot your kind help. I attached a patch to INSTALL.W64 to collect all the instruction needed in my case to install Emacs. Please feel free for brickbat. Vincent. --- L'absence de virus dans ce courrier =E9lectronique a =E9t=E9 v=E9rifi=E9e p= ar le logiciel antivirus Avast. https://www.avast.com/antivirus --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=INSTALL.W64.diff diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64 index 4a93dc0..b28540d 100644 --- a/nt/INSTALL.W64 +++ b/nt/INSTALL.W64 @@ -29,24 +29,35 @@ build tools for MinGW-w64 -- see http://msys2.github.io/. 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 + 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. +In the sequel we denote by c:\MSYS\INSTALL\DIR\msys64 the +directory where MSYS2 is installed, e.g. C:\msys64 by default. + +* Configure your MSWindows PATH variable + Then you'll need to add the following directories to your Windows PATH environment variable: - c:\msys64\usr\bin;c:\msys64\mingw64\bin + c:\MSYS\INSTALL\DIR\msys64\usr\bin;c:\MSYS\INSTALL\DIR\msys64\mingw64\bin + +where c:\MSYS\INSTALL\DIR\msys64 depends on your MSYS2 installation, +and is c:\msys64 by default. -you can do this through Control Panel / System and Security / System / +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. +Concerning the find command see also the last step about configuring +your init file to get an MSWindows find port. + ** Download and install the necessary packages Run msys2_shell.bat in your MSYS2 directory and you will see a BASH window @@ -55,25 +66,86 @@ 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-liblcms2 \ - mingw-w64-x86_64-libxml2 \ - mingw-w64-x86_64-gnutls \ - mingw-w64-x86_64-zlib - -The packages include the base developer tools (autoconf, grep, make, etc.), -the compiler toolchain (gcc, gdb, etc.), several image libraries, an XML -library, the GnuTLS (transport layer security) library, and zlib for -decompressing text. Only the first three packages are required (base-devel, -toolchain, xpm-nox); the rest are optional. You can select only part of the -libraries if you don't need them all. + for w in msys/msys2-launcher-git \ + msys/m4 \ + msys/autoconf \ + msys/grep \ + msys/findutils \ + mingw64/mingw-w64-x86_64-pkg-config \ + mingw64/mingw-w64-x86_64-make \ + mingw64/mingw-w64-x86_64-toolchain \ + mingw64/mingw-w64-x86_64-xpm-nox \ + mingw64/mingw-w64-x86_64-libtiff \ + mingw64/mingw-w64-x86_64-giflib \ + mingw64/mingw-w64-x86_64-libpng \ + mingw64/mingw-w64-x86_64-libjpeg-turbo \ + mingw64/mingw-w64-x86_64-librsvg \ + mingw64/mingw-w64-x86_64-liblcms2 \ + mingw64/mingw-w64-x86_64-libxml2 \ + mingw64/mingw-w64-x86_64-gnutls \ + mingw64/mingw-w64-x86_64-zlib; do pacman -S $w; done + +Answer Y (for yes) to all questions when the package is not up to +date, and n (for no) otherwise. + +The packages include the base developer tools (autoconf, grep, make, +etc.), the compiler toolchain (gcc, gdb, etc.), several image +libraries, an XML library, the GnuTLS (transport layer security) +library, and zlib for decompressing text. Only the packages up to +xpm-nox are required; the rest are optional. You can select only part +of the libraries if you don't need them all. + +** Check your MSYS2 fstab file + +make sure that your fstab file (c:\MSYS\INSTALL\DIR\msys64\etc\fstab) +file contains the following lines (starting a column 0 in the fstab +file): + + c:/MSYS/INSTALL/DIR/msys64/mingw64/bin /mingw64/bin ntfs binary,noacl 0 0 + c:/MSYS/INSTALL/DIR/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 c:\MSYS\INSTALL\DIR 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 + +Anyway, avoiding to have any space in the path is preferable. + +** Configure your MSYS2 PATH variable for application running from an mingw64 console + +When you launch the mingw64.exe console from the c:\MSYS\INSTALL\DIR\msys64, and type + + echo "$PATH" + +You must have /mingw64/bin and /usr/bin in the paths list in this order. + +Otherwise, you will need to exit the MINGW64 console and edit your +~/.bashrc file, where ~ denote +c:\MSYS\INSTALL\DIR\msys64\home\%USERNAME%, to have the correct PATH +variable from MSYS/MINGW32/MINGW64 consoles: + +In this cas, please make sure that ~/.bashrc contains some statement +like: + + case x$MSYSTEM in + xMINGW64) + PATH="/mingw64/bin:/usr/bin:$PATH" + ;; + xMINGW32) + PATH="/mingw32/bin:/usr/bin:$PATH" + ;; + xMSYS) + PATH="/usr/bin:$PATH" + ;; + esac + +Actually, for the Emacs build only the MINGW64 is useful. There could +other cases for MSYSTEM envvar equal to MSYS or to MINGW32. You now have a complete build environment for Emacs. @@ -125,9 +197,9 @@ put the Emacs source into C:\emacs\emacs-26: 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.: +First we need to switch to the MinGW-w64 environment. Exit the MSYS2 +BASH console and run mingw64.exe in the C:\MSYS\INSTALL\DIR\msys64 +folder, then cd back to your Emacs source directory, e.g.: cd /c/emacs/emacs-26 @@ -202,6 +274,40 @@ 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. +* Configure your init file for Emacs to get a findutils windows port + +As far as find is concerned, at this stage you have configured the +MSWindows PATH envvar to have c:\MSYS\INSTALL\DIR\msys64\usr\bin in +it. + +You should have done that in a way that +c:\MSYS\INSTALL\DIR\msys64\usr\bin is after C:\Windows\System32 in the +PATH, otherwise the MSYS2 find.exe will be used instead of the +MSWindows find.exe by other MSWindows application and this may cause +some problem in your MSWindows environment --- although nobody has +ever reported such a trouble. + +As far as Emacs is concerned, the lasy way is to use the MSYS2 find +utility despit the PATH envvar by setting in your init file the +following: + + (setq grep-program "c:/MSYS/INSTALL/DIR/msys64/usr/bin/find.exe") + +Actually, it is better to work a little bit more and use a MSWindows +port rather than the MSYS find. See why here +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27393 + +For instance this port can be used. + +https://sourceforge.net/projects/ezwinports/files/findutils-4.2.30-5-w64-bin.zip/download + +Then add to your init file lines like these : + + (setq find-program "c:/PATH/TO/FIND/PORT/find.exe") + +where "c:/PATH/TO/FIND/PORT/" is the place where you have installed +this find MSWindows port. + * Credits Thanks to Chris Zheng for the original build outline as used by the @@ -225,3 +331,4 @@ 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 . + --=-=-=--