Menu

#1109 error if msys is installed in directory with spaces

MSYS
closed
None
out-of-date
Known_bugs
2013-02-04
2007-11-29
No

I just installed latest MSYS version (1.0.11) on a Windows XP box in a directory with spaces in it (e.g. C:\Program Files\MSYS).

Invoking msys.bat, I got the error:

Windows cannot find 'C :\Program' . Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.

The attached patch solves that problem.

Related

Issues: #1109

Discussion

<< < 1 2 3 (Page 3 of 3)
  • Hamish B

    Hamish B - 2013-02-02

    man there's a lot of heat around this bug..

    in the spirit of 'we'll get further if we all pull in the same direction', see also the patch in #416, "patch: fix quoting and handle spaces in path gracefully" mentioned earlier in the report which results in an easy to understand "this isn't supported, exiting now." error message instead of an ugly crash.

    As a 2c field report I'd note that in the copy of MSYS we ship with the Windows port of our software we include a modified version of the patch provided in this bug report. We actively encourage users to install to Program Files (note that on a managed corporate system they may not have any choice but to install to "Documents and Settings" or some other place with a space). We make controled, but moderate use of a few dozen of the regular suspect UNIX/GNU power tools provided, and after a couple years and many 10s of thousands of downloads we haven't had any complaints. Well, we've had tons of complaints, but none that anyone could or would blame on MSYS due to this issue.

    best,
    Hamish

     
    • Keith Marshall

      Keith Marshall - 2013-02-02

      in the spirit of 'we'll get further if we all pull in the same direction', see also the patch in #416, "patch: fix quoting and handle spaces in path gracefully" mentioned earlier in the report which results in an easy to understand "this isn't supported, exiting now." error message instead of an ugly crash.

      I do recall that, and this is a strategy which I could support, but ... it isn't my decision to make.

      We actively encourage users to install to Program Files (note that on a managed corporate system they may not have any choice but to install to "Documents and Settings" or some other place with a space).

      Well, I'd classify any such system as a grossly mismanaged corporate system; (FWIW, my own employer runs a managed system, but the admins are sufficiently astute to recognise the insanity of spaces in path names -- they provide C:\Local as an open alternative to the stupidity of "C:\Documents and Settings" or "C:\Program Files"). I've seen far too many issues which are directly attributable to spaces in path names, to ever consider encouraging this asinine practice.

       
  • BGINFO for X and for Windows!

    Hello,

    I see: the "space issue" seems a more philosofical question than the problem itself.

    I have a question: is MSYS a Windows program, or not?

    If yes: my opinion is that nowadays a Windows program works if installed in a folder with spaces. And in fact, it seems that MSYS itself works if used with the msys.bat patch. (confirmed by Hamish aplication).

    If not, what is instead of?

    Perhaps the space issue can afect when you compile, or when you use MINGW32 as Development platform ... I don't know.

    Thanks, your comments are welcome.

     

    Last edit: BGINFO for X and for Windows! 2013-02-03
    • Hamish B

      Hamish B - 2013-02-03

      Perhaps the space issue can afect when you compile

      fwiw the widely used Autoconf(2.13) is quite bad at supporting spaces in path names, so often your ./configure will break if you try that even if the program you are building is ok with it. In that case build without spaces, install to anywhere.

      perhaps this is a bad time to bring up i18n and UTF-8 chars in the default path names on non-English versions of Windows? ;-)

      ok, walking away before someone explodes,
      Hamish

       
  • Earnie Boyd

    Earnie Boyd - 2013-02-03

    This issue is closed, please stop the insane questioning. The corresponding patch issue is left pending consideration from the maintainer.

    SPACES in paths are a known issue. Care must be taken in its use and the typical POSIX programs we are using do not expect to have to deal with spaces in paths and typically use white space as a delimiter for input. Therefore we do not encourage the use of spaces in path names. It isn't a matter of "is MSYS a Windows program", it is a matter of what is expected by the programs we port to use them. We do not wish to spend our time tracking down all of the issues caused by a space in a path in the programs we port so we tell you the user to not use a path with spaces.

     
  • BGINFO for X and for Windows!

    Hello,

    I don't think that I do insane questioning. I'm sorry, if you think this. Is not my intention. Some thoughts:

    1- Perhaps the issue is closed, but I can write on the post. Perhaps could be better don't permit to write to a closed post, if possible by the application. I don't know.

    2- Perhaps the "space issue" is in the development area only. This is my point that perhaps I didn't explained well: I only want MSYS as a BASH shell (installed in a folder with spaces via the modified msys.bat). I will never compile. I will never port any program.

    3- Perhaps you will think, why I want to install MSYS in a folder with spaces?
    Well, what I'm trying to do is package my application (based on bash scripts) together with MSYS , as a Windows Package (.exe, .msi). So when users will install it, they will have the typical question: folder to install? And I'm sure that 99% will put in "program files" .... This is my concern / issue ...

    4- We will wait for the maintainer consideration.

    Regards and thanks a lot.

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-04

    1- Perhaps the issue is closed, but I can write on the post. Perhaps could be better don't permit to write to a closed post, if possible by the application. I don't know.

    I've already requested a feature for that. The new Allura system doesn't allow it yet or I would have already.

    2- Perhaps the "space issue" is in the development area only. This is my point that perhaps I didn't explained well: I only want MSYS as a BASH shell (installed in a folder with spaces via the modified msys.bat). I will never compile. I will never port any program.

    Bash itself hates spaces unless you quote enough; good luck with that.

    3- Perhaps you will think, why I want to install MSYS in a folder with spaces?
    Well, what I'm trying to do is package my application (based on bash scripts) together with MSYS , as a Windows Package (.exe, .msi). So when users will install it, they will have the typical question: folder to install? And I'm sure that 99% will put in "program files" .... This is my concern / issue ...

    Our installers and our web pages always warn about paths with spaces. If you choose to do otherwise it is at your own risk.

    4- We will wait for the maintainer consideration.

    Good, because I've completed my say on this matter. If it continues I'll delete the ticket.

     
  • kfeina

    kfeina - 2013-02-04

    Hi Hamish, nice to meet you.

    After "all the paranoia", I have two questions:

    What is your windows application ? Can you send me the url?

    Do you have the "real good one" msys.bat that solves the space issue,
    because there are different patches disperssed .... or where to get it ?

    Thaks a lot.

    2013/2/4 Hamish B hbowman@users.sf.net

    Perhaps the space issue can afect when you compile

    fwiw the widely used Autoconf(2.13) is quite bad at supporting spaces in
    path names, so often your ./configure will break if you try that even if
    the program you are building is ok with it. In that case build without
    spaces, install to anywhere.

    perhaps this is a bad time to bring up i18n and UTF-8 chars in the default
    path names on non-English versions of Windows? ;-)

    ok, walking away before someone explodes,
    Hamish


    Status: closed
    Created: Thu Nov 29, 2007 12:43 PM UTC by Andreas Deininger
    Last Updated: Sun Feb 03, 2013 06:00 PM UTC
    Owner: Cesar Strauss

    I just installed latest MSYS version (1.0.11) on a Windows XP box in a
    directory with spaces in it (e.g. C:\Program Files\MSYS).

    Invoking msys.bat, I got the error:

    Windows cannot find 'C :\Program' . Make sure you typed the name
    correctly, and then try again. To search for a file, click the Start
    button, and then click Search.

    The attached patch solves that problem.

    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/mingw/bugs/1109/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     

    Related

    Issues: #1109

  • Keith Marshall

    Keith Marshall - 2013-02-04

    I'm loathe to perpetuate this dialogue any further, so this is positively my last word on the issue; I have just four closing comments:--

    1. We, (as the MinGW.org Project), offer MSYS as a package with a specific goal; within the context of that goal we know that spaces in path names are often extremely problematic. We have no desire to promote, nor to support installation in any manner which we know will be vulnerable to such problems.

    2. We also know that MSYS may be useful in alternative contexts, where the spaces in path names issue may not be so much of a problem; this doesn't justify our acceptance of any patch which may be prejudicial to our primary objective for MSYS.

    3. Our licensing terms allow, and indeed encourage, you to redistribute your own version of MSYS, (subject to preservation of software freedom, and conveyancing of source), with any modifications you deem fit. If you wish to distribute a patched version, which will support spaces in the installation path name, then by all means do so; that is your right. However, if you do this, and you break it, you assume the support burden, with no come-back on us; (you get to keep all of the pieces).

    4. There is still a patch under consideration, pending a decision by the MSYS maintainer, which will formalize our prohibition of installation in any path with spaces in its name; if this doesn't suit you, then see point (3).

     
<< < 1 2 3 (Page 3 of 3)