From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19989: 25.0.50; Build instructions on Windows Date: Fri, 06 Mar 2015 10:29:12 +0200 Message-ID: <83lhjao7fr.fsf@gnu.org> References: <20150303163453.GA25244@math.berkeley.edu> <834mq2qana.fsf@gnu.org> <83385mq9og.fsf@gnu.org> <20150303203037.GA26426@math.berkeley.edu> <83pp8ppgvw.fsf@gnu.org> <20150305211821.GA2915@math.berkeley.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1425630627 6918 80.91.229.3 (6 Mar 2015 08:30:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Mar 2015 08:30:27 +0000 (UTC) Cc: 19989@debbugs.gnu.org To: Ilya Zakharevich Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 06 09:30:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YTne6-0006Ol-Gi for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Mar 2015 09:30:10 +0100 Original-Received: from localhost ([::1]:56774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTne6-00049D-1n for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Mar 2015 03:30:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTne2-00046J-9x for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2015 03:30:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTndz-0001Dh-CB for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2015 03:30:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTndz-0001B7-8R for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2015 03:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YTndy-0003iX-LH for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2015 03:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Mar 2015 08:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19989 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19989-submit@debbugs.gnu.org id=B19989.142563056114174 (code B ref 19989); Fri, 06 Mar 2015 08:30:02 +0000 Original-Received: (at 19989) by debbugs.gnu.org; 6 Mar 2015 08:29:21 +0000 Original-Received: from localhost ([127.0.0.1]:36781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTndI-0003gU-HV for submit@debbugs.gnu.org; Fri, 06 Mar 2015 03:29:21 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:57461) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTndF-0003fR-9v for 19989@debbugs.gnu.org; Fri, 06 Mar 2015 03:29:18 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NKS007006WBJR00@mtaout24.012.net.il> for 19989@debbugs.gnu.org; Fri, 06 Mar 2015 10:21:15 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKS0037977F1160@mtaout24.012.net.il>; Fri, 06 Mar 2015 10:21:15 +0200 (IST) In-reply-to: <20150305211821.GA2915@math.berkeley.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100133 Archived-At: > Date: Thu, 5 Mar 2015 13:18:21 -0800 > From: Ilya Zakharevich > Cc: 19989@debbugs.gnu.org > > On Wed, Mar 04, 2015 at 05:42:59AM +0200, Eli Zaretskii wrote: > > > > > > • mingw shell sets path to (essentially) FOO/msys/1.0/mingw/bin (here FOO > > > > > > is the install path), but there is no directory > > > > > > FOO/msys/1.0/mingw > > > > > > what is is > > > > > > FOO/bin > > > > > > So I needed to make a symbolic link (Windows style required) by > > > > > > running > > > > > > mklink /j mingw FOO > > > > > > in FOO/msys/1.0 > > > > > > > > FWIW, the 2nd issue sounds to me like an installation mistake of some > > > > > kind (did you install MinGW inside the MSYS tree, by chance?). > > > > > > How would I know? > > > > You could look at the directory hierarchy that got created. > > *This* I did — and I reported the result in my initial message (quoted > below). This does not answer your question. It doesn't answer the question, indeed, because you didn't say where MinGW programs are, only what PATH you see in the MSYS shell window. And the PATH you reported was not exactly what you saw, AFAIU, at least that's what follows from the "(essentially) FOO/msys/1.0/mingw/bin" part. > > > I just ran mingw-get (as described), and set > > > install directory ( = FOO) once. > > > > Did you select the same install directory for MinGW and for MSYS? > > AFAIR, there was no “install directory ‘for”’. Only “install directory”. I'm asking if they share the same directory tree. Can you show the entire tree, e.g. by running 'find -type d'? > > > The result: > > > FOO/bin - contains gcc executables etc > > > FOO/msys/1.0/ - contains msys > > > FOO/msys/1.0/bin - contains msys executables > > > > > > But > > > > > I'm not an expert; all I know is that on my system, the MSYS Bash > > > > > window has PATH set to whatever my system-wide PATH is, with these > > > > > directories prepended: > > > > > > > > > > .:/usr/local/bin:/mingw/bin:/bin: > > > > > > > > > > IOW, no msys/1.0/mingw/ anywhere in sight. > > > > > > ??? Of course it IS in sight: > > > > > > /bin IS native FOO/msys/1.0/bin > > > /mingw/bin IS native FOO/msys/1.0/mingw/bin > > > > But then there's no problem, because missing directories on PATH do no > > harm. > > Of course they do. configure did not work (since the gcc found on > path was not MINGW one). So that's the problem: you installed the MSYS GCC (and probably the whole MSYS development environment), something one shouldn't do for building MinGW programs. The MSYS GCC and development environment is for developing MSYS programs, like the MSYS Bash etc. -- you don't want and don't need that. > > The binaries are in /bin, and it is on PATH, so there should be > > no problem; there isn't one in my installation. > > Are you joking?! What do you think is a reason for filing bug > reports? I followed instructions, AND GOT PROBLEMS! Well, now I at least understand the reason for your problems: an extra development environment that gets in your way. I didn't understand that before, sorry for being too stupid. > > /etc/profile is a standard place in many Posix shells. > > How would it help? How would the user find it on their disk? > > > > As you see, even > > > *you* got lost what denotes which native directory. If what the users > > > know is what is in nt/INSTALL, they have no way to deduce this info. > > > > I wasn't talking about some abstract user, I was trying to help you to > > get your installation in good shape. > > Thanks! But did I ask for that? This is a bug report, not a cry for > help. I don't think it's a bug report about Emacs. Your development environment was botched (and maybe still is, if you didn't uninstall the MSYS GCC). > > > BTW: you reminded me: there is another bug in Emacs build — this one > > > purely in Emacs. My default PATH accesses a complete cygwin > > > installation > > > How does Cygwin enter this equation? Do you have both Cygwin and > > MinGW/MSYS installed? > > I have tens of environment installed. cygwin is on PATH. I suggest to remove it. You might have additional runtime problems, e.g. if there are DLLs there that Emacs looks for, whose names are identical to their MinGW namesakes. It's a problem waiting to happen. You can avoid it by being extra-vigilant, and carefully set up the order of directories, but it's easier to side-step the problem to begin with. > > If you mix incompatible stuff in the same shell session, you get what > > you deserve. > > Sigh… Again — all I did was following instructions in nt/INSTALL. If those instructions somehow cause you to download the MSYS development environment, please tell how to amend them as to avoid that. These instructions exist for quite some time, and no one has bumped into this particular problem yet. (I myself don't use mingw-get, so the part in the instructions for using it was provided by someone else who did.) > > My advice is to have MSYS in separate tree from MinGW, > > Is this advice in nt/INSTALL? Yes: MSYS packages should be installed in a separate tree from MinGW. For example, use D:\MSYS or D:\usr\MSYS as the top-level directory from which you unpack all of the MSYS packages. > And how to do it from mingw-get? If someone knows how to do that with mingw-get, please tell. > > and only let MSYS shell see MinGW executables _after_ its own. MinGW, > > OTOH, should not have the MSYS's /bin directory on its PATH. > > Same questions. Same answers: Do NOT add the MSYS bin directory to your Windows Path! Only the MinGW bin directory should be on Path. When you install MSYS, it creates a shortcut on your desktop that invokes the MSYS Bash shell in a Command Prompt window; that shell is already set up so that the MSYS bin directory is on PATH ahead of any other directory. Thus, Bash will find MSYS executables first, which is exactly what you need. > > As for Cygwin, it should be in yet another segregated tree, > > It is. > > > and never on the same PATH as either MSYS or MinGW. > > It was not in *MY* $PATH. It was in the $PATH created by /etc/profile > which was created following instructions in nt/INSTALL. /etc/profile just takes your PATH and prepends a few directories to it, that's all. > > It is next to impossible to have > > the Posix configure scripts distinguish between foo.exe or foo.h that > > are for Cygwin and their namesakes for MinGW. > > For foo.exe — one does not care. For foo.h — one compiles and runs a > simple program. See above: you forget the DLLs, for which Windows has quite a convoluted search algorithm. > > Like I said: you need to get your MinGW/MSYS installation in good > > shape, and then things will work seamlessly. This isn't an Emacs > > issue, per se. > > Again: this is an issue with nt/INSTALL. We need to identify the issues first. One issue is now clear: the MSYS development environment should not be installed. The manual instructions take care of that: they provide a list of packages to install; for the mingw-get instructions I'd appreciate if someone who uses it says how to avoid it. The other part is Cygwin; if you want to keep it on PATH, and you know what you are doing, fine. It's not the job of nt/INSTALL to tell users how to configure their systems to avoid future trouble. Are there any other issues? If so, can you suggest specific changes to nt/INSTALL.