Re: MinGW-users Digest, Vol 99, Issue 1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: MinGW-users Digest, Vol 99, Issue 1

Andrew Sauber

Thanks Keith and Eli, I have a complete picture of the situation now. Hopefully that mingw-get hook gets patched in soon! It's great to have bash and gcc that targets Windows, but confusing when it doesn't work out of the box.

- Andrew

On Aug 1, 2014 4:00 PM, <[hidden email]> wrote:
Send MinGW-users mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/mingw-users
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-users digest..."


NOTE: If you respond to a digest in full your account will be moderated without consideration of the message.  It is a grievous act to inundate the list with a full digest.  If you cannot conform to responding to the individual mail by modifying the subject for the reply to match the individual mail or you cannot conform to removing the unneeded text then we suggest you receive the individual mail instead of the digest.

Today's Topics:

   1. Support for bash functions (Eric Chamberlain)
   2. Re: Support for bash functions (Mcgroder, James)
   3. Re: Support for bash functions (Eric Chamberlain)
   4. Why do MinGW and MSYS have separate versions of gcc?
      (Andrew Sauber)
   5. Re: Why do MinGW and MSYS have separate versions of       gcc?
      (Eli Zaretskii)
   6. Re: Why do MinGW and MSYS have separate versions of gcc?
      (Keith Marshall)


----------------------------------------------------------------------

Message: 1
Date: Fri, 1 Aug 2014 17:31:29 +0000
From: Eric Chamberlain <[hidden email]>
Subject: [Mingw-users] Support for bash functions
To: "[hidden email]"
        <[hidden email]>
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="us-ascii"

I am using the git for windows bash shell<http://msysgit.github.io/> and I cannot seem to define and use a shell function.
I understand that mingw is the implementation used by git-for-windows to implement their bash shell.
So my question for this distribution:   Is there support for bash functions in mingw?

Thanks.

Tevya

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Fri, 1 Aug 2014 18:05:17 +0000
From: "Mcgroder, James" <[hidden email]>
Subject: Re: [Mingw-users] Support for bash functions
To: MinGW Users List <[hidden email]>
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="iso-8859-1"

Friday, August 01, 2014 1:31 PM Eric wrote:
> [.] Is there support for bash functions in MinGW???

Seems to me there is. here is a simple one I have in my .profile:

function vi (){
c:/mingw/msys/1.0/local/bin/winvi32.exe $1 &
}

I routinely utilize others with a little more sophistication too.

HTH
--
Jim





------------------------------

Message: 3
Date: Fri, 1 Aug 2014 18:48:03 +0000
From: Eric Chamberlain <[hidden email]>
Subject: Re: [Mingw-users] Support for bash functions
To: MinGW Users List <[hidden email]>
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="us-ascii"

Sorry for bothering you all with my post.  I found my problem and I have functions working now.

 == Tevya ==

-----Original Message-----
From: Mcgroder, James [mailto:[hidden email]]
Sent: Friday, August 01, 2014 11:05 AM
To: MinGW Users List
Subject: Re: [Mingw-users] Support for bash functions

Friday, August 01, 2014 1:31 PM Eric wrote:
> [.] Is there support for bash functions in MinGW?

Seems to me there is. here is a simple one I have in my .profile:

function vi (){
c:/mingw/msys/1.0/local/bin/winvi32.exe $1 & }

I routinely utilize others with a little more sophistication too.

HTH
--
Jim



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe



------------------------------

Message: 4
Date: Fri, 1 Aug 2014 15:16:25 -0400
From: Andrew Sauber <[hidden email]>
Subject: [Mingw-users] Why do MinGW and MSYS have separate versions of
        gcc?
To: [hidden email]
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

This is my understanding of the relationship between MinGW and MSYS.

When installing MinGW and its gcc toolchain, installing MSYS is optional.

With MSYS installed, you get bash and a few other tools that *I assume* are
meant to be used with the MinGW gcc that you just installed. However, when
you run the MSYS batch script that opens up a bash shell, gcc is not on
your PATH. At this point you do one of two things:

   - You launch the MinGW installer again, and notice that you didn't
   select gcc under the MSYS category. You think to yourself, "didn't I
   already install gcc?" You wait for that package to download, and drop back
   to MSYS's bash shell. You run gcc --version and see that it's an ancient
   version of gcc from ten years ago. You then proceed to do the thing
   below, if you even realize that it's an option.

OR

   - You echo $PATH, to find that C:\MinGW\bin is on your path, but
   C:\MinGW\bin is not mounted. You add the proper mount command to your
   ~/.profile, and are happy to find that the recent version of gcc
   provided by MinGW is now on your PATH.

Why do MinGW and MSYS have separate versions of gcc? Why doesn't the user
have access to the recent version of gcc provided by MinGW immediately
within MSYS? I don't use Windows very often, and I was trying to use MinGW
and MSYS to teach my brother C. I didn't want to be using a version of gcc
from ten years ago. This behavior was baffling.
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 5
Date: Fri, 01 Aug 2014 22:27:05 +0300
From: Eli Zaretskii <[hidden email]>
Subject: Re: [Mingw-users] Why do MinGW and MSYS have separate
        versions of     gcc?
To: MinGW Users List <[hidden email]>
Message-ID: <[hidden email]>

> Date: Fri, 1 Aug 2014 15:16:25 -0400
> From: Andrew Sauber <[hidden email]>
>
> Why do MinGW and MSYS have separate versions of gcc?

Because MSYS programs and MinGW programs use different runtimes.

> Why doesn't the user have access to the recent version of gcc
> provided by MinGW immediately within MSYS?

You will, if you install MinGW correctly (which includes putting its
bin directory on PATH), before you install MSYS.  Installing MSYS
prepends a few directories to the existing PATH, so your MinGW GCC
will be accessible from MSYS Bash.

> I don't use Windows very often, and I was trying to use MinGW and
> MSYS to teach my brother C.

In that case, you shouldn't be installing MSYS at all.  It is not
needed for compiling and running MinGW programs written in C.  Just
install MinGW, and start using it.



------------------------------

Message: 6
Date: Fri, 01 Aug 2014 21:00:07 +0100
From: Keith Marshall <[hidden email]>
Subject: Re: [Mingw-users] Why do MinGW and MSYS have separate
        versions of gcc?
To: Eli Zaretskii <[hidden email]>,       MinGW Users List
        <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

On 01/08/14 20:27, Eli Zaretskii wrote:
>> Date: Fri, 1 Aug 2014 15:16:25 -0400
>> From: Andrew Sauber <[hidden email]>
>>
>> Why do MinGW and MSYS have separate versions of gcc?
>
> Because MSYS programs and MinGW programs use different runtimes.

Correct.  The MSYS specific GCC -- the ancient version -- is intended to
be used only by those who are developing MSYS itself.

>> Why doesn't the user have access to the recent version of gcc
>> provided by MinGW immediately within MSYS?
>
> You will, if you install MinGW correctly (which includes putting its
> bin directory on PATH), before you install MSYS.  Installing MSYS
> prepends a few directories to the existing PATH, so your MinGW GCC
> will be accessible from MSYS Bash.

That's not strictly accurate.  MSYS relies on a mount table assignment,
*not* on a Windows PATH setting, to locate the MinGW /bin directory,
(which is where MinGW GCC executables live).  Correctly *starting* the
MSYS shell, (with the --login option, and usually also the -i option),
places /mingw/bin early in $PATH, but it's the MSYS mount table which
maps that to the correct Windows path.

Right now, the MSYS installation instructions request the user to
manually configure the requisite mount table entry; mingw-get needs a
hook, which I contributed a couple of months ago, to have it do that
automatically.  This hook should be activated with the next (1.0.19)
MSYS release, but it doesn't work with the current (1.0.18) release.

>> I don't use Windows very often, and I was trying to use MinGW and
>> MSYS to teach my brother C.
>
> In that case, you shouldn't be installing MSYS at all.

That's a rather draconian assertion...

> It is not needed for compiling and running MinGW programs written in C.  Just
> install MinGW, and start using it.

No, it isn't *needed*, but maybe the OP would just prefer it anyway; (I
certainly do, on the increasingly rare occasions when I have to fire up
my Windows VM).

--
Regards,
Keith.



------------------------------

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

------------------------------

_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


End of MinGW-users Digest, Vol 99, Issue 1
******************************************

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe