#810 msysdvlpr - command not found

MSYS
closed
None
works-for-me
Unknown
2013-01-31
2005-07-30
No

With recent version of MSYS the 'msysdvlpr' command has
stopped working. It produces 'command not found' or
words to that effect.

I have traced this problem to the existance of the
'/bin/start' script. The execution of '/msys.bat'
includes several references to 'start' that are taken
as references to this script rather than the MSDOS
command with that name.

There are several possible solutions - from the least
desirable in order of increasing desirability:

1) Remove '/bin/start' - not desirable because people
and scripts have become acustomed to its existance.

2) Add %WINDIR%\COMMAND\ to the front of each instance
of 'start' in '/msys.bat' - questionable because a)
'start' may be in some other directory on different
versons of windows, and b) there may be other MSDOS
commands that have a similar problem and this does not
address the problem.

3) Modify '/bin/cmd' to temporarily rearange PATH so
that the original windows PATH appears first followed
by the added MSys, MinGW and user PATH components. The
following line added before the active parts of
'/bin/cmd' has worked for me:

p=":$PATH"; p=":${p##*:/mingw/bin:}"; p=${p/:\/bin:/:};
PATH="${p:1}:${PATH:0:${#PATH}-${#p}}"

Note that the MSys component needs to be present
because the active part of '/bin/cmd' invokes 'sed'.
Therefore the temporary PATH has to find 'sed' or the
reference to 'sed' could be changed to '/bin/sed'.

mtew@users.sf.net

Discussion

  • Luke Dunstan

    Luke Dunstan - 2005-07-31

    Logged In: YES
    user_id=30442

    This doesn't make much sense to me. Msys.bat is executed
    by the Windows command interpreter
    (cmd.exe/command.com), which does not understand bash
    shell scripts, and therefore could not execute /bin/start.

    I think your failure of msysdvlpr must be caused by
    something else. Does the /bin/cmd script work for you? Have
    you actually tried your solution 2?

     
  • Max TenEyck Woodbury

    Logged In: YES
    user_id=735003

    >Sender: infidelSourceForge.net Subscriber

    >This doesn't make much sense to me. Msys.bat is executed
    >by the Windows command interpreter
    >(cmd.exe/command.com), which does not understand bash
    >shell scripts, and therefore could not execute /bin/start.

    Yep. It's definitely strange, but that's apparently what is
    happening. I tried renaming '/bin/start' to somthing else
    (solution 1) and 'msysdvlpr' started working. Another
    useful diagnostice is to type:

    cmd //c echo %PATH%

    That shows that the MinGW / MSys 'PATH' is in fact being
    back translated for use in the windows environment.

    >I think your failure of msysdvlpr must be caused by
    >something else. Does the /bin/cmd script work for you? Have
    >you actually tried your solution 2?

    'cmd' works as long as the thing being executed does not
    reference a batch file in the path by name as the /msys.bat
    file does.

    I try to make sure the solutions I propose work at least in
    my own environment -- in other words, I have indeed tried
    solution (2) on a windows 98 SE environment and it does in
    fact work, but I am not certain that it would work on other
    versions of windows. Further, I suspect that changing
    'start' to 'start.exe' would also work, but I have not tried
    that and therefore did not recomend it.

    Solution (3) is preferable because it attacks what I believe
    is the root of the problem -- the windows command
    interpreter should search the windows environment for
    commands before looking at the MinGW or MSys environments.

     
  • Earnie Boyd

    Earnie Boyd - 2005-08-01

    Logged In: YES
    user_id=15438

    What happens if you remove/rename /bin/cmd?

    boyde@OH6000GBOYDE ~
    $ which cmd
    /c/WINNT/SYSTEM32/cmd

    I'm not sure why /bin/cmd doesn't exist in my system. I no
    longer use msysdvlpr but instead use ``start /msys MSYS''.

    Earnie

     
  • Max TenEyck Woodbury

    Logged In: YES
    user_id=735003

    >Sender: earnieAccepting Donations

    >What happens if you remove/rename /bin/cmd?

    >boyde@OH6000GBOYDE ~
    >$ which cmd
    >/c/WINNT/SYSTEM32/cmd

    >I'm not sure why /bin/cmd doesn't exist in my system. I no
    >longer use msysdvlpr but instead use ``start /msys MSYS''.

    $ mv /bin/cmd /bin/cmdx; which cmd; msysdvlpr; mv /bin/cmdx
    /bin/cmd
    /bin/msysdvlpr: cmd: command not found

    In other words there is no cmd.exe on windows 9x/ME.

    ARGH! CUSS Cuss cuss. Something else IS apparently involved
    since I just commented out the change to /bin/cmd and
    msysdvlpr continued to work. I even put the one in CVS HEAD
    msys/dvlpr/bin back and it continues to work. I'm going to
    close this as no longer reproducable...

    Maybe moving '.' from the beginning to the end of PATH,
    which I did for other reasons, had something to do with it.
    GKID.

     
  • Max TenEyck Woodbury

    • status: open --> closed-works-for-me
     
  • Earnie Boyd

    Earnie Boyd - 2005-08-01

    Logged In: YES
    user_id=15438

    The ``.'' is in the front of PATH to better emulate the
    search order of cmd.exe/command.com.

    Earnie

     
  • Earnie Boyd

    Earnie Boyd - 2013-01-31
    • status: closed-works-for-me --> closed
    • resolution: --> works-for-me
    • category: --> Unknown
    • milestone: --> MSYS
     
  • Earnie Boyd

    Earnie Boyd - 2013-01-31
    • labels: MSYS -->
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks