Multiple copies of the same programs in GCC and Binutils

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple copies of the same programs in GCC and Binutils

Eli Zaretskii
Could someone please explain why the distributed binaries of GCC and
Binutils include the same programs several times?  For each foo.exe,
there's bin/foo.exe, bin/mingw32-foo.exe, mingw32/bin/foo.exe, etc.
And similarly with libexec/.

Why are these multiple copies needed?  Which software out there
expects to see mingw32-foo.exe, and anything else besides bin/foo.exe?

Also, the "HOWTO Install the MinGW GCC" page at
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
says that one needs to download both the dev and dll packages for the
runtime support libraries (such as mpc, gmp, iconv, etc.), but it
looks like the dev packages are not required for running the compiler
and Binutils, they are only required if you want to develop your own
programs that link against those support libraries.  Am I missing
something?

TIA

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Keith Marshall
On 11/08/14 19:46, Eli Zaretskii wrote:
> Could someone please explain why the distributed binaries of GCC and
> Binutils include the same programs several times?  For each foo.exe,
> there's bin/foo.exe, bin/mingw32-foo.exe, mingw32/bin/foo.exe, etc.
> And similarly with libexec/.

I agree with your implied comment, that it seems perverse, but that's
the way GCC's and binutils' build systems install them, and we just
bundle our distributed tarballs from a staged installation snapshot.

Arguably, we could be more selective in what we bundle, but ...

> Why are these multiple copies needed?  Which software out there
> expects to see mingw32-foo.exe, and anything else besides bin/foo.exe?

GCC's build system itself appears to want the copies of the binutils
executables in the mingw32/bin subtree; I don't know what else may have
similar expectations ... nothing jumps to mind.

FWIW and IIRC, in the gcc-4.8.2 bundles which I posted, I substituted
tiny stubs in place of the myriad duplicates, leaving just one physical
copy of each distinct executable, to which the stub redirects its
execution.  Ideally, of course, we would be able to use hard links
rather than stubs, but unfortunately many (if not most) of the archive
extraction tools which prevail on Windows mishandle them, creating a
standalone zero sized file instead of the intended link; (besides, if a
user happens to install on a FAT32 file system, such as is prevalent on
USB thumb drives, for example, hard links simply aren't supported anyway).

> Also, the "HOWTO Install the MinGW GCC" page at
> http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
> says that one needs to download both the dev and dll packages for the
> runtime support libraries (such as mpc, gmp, iconv, etc.), but it
> looks like the dev packages are not required for running the compiler
> and Binutils, they are only required if you want to develop your own
> programs that link against those support libraries.  Am I missing
> something?

No, I think you are right on the money; one of the perils of using a
wiki as a documentation host is that misinformation can all to easily
creep in, and we don't have the resources to vet every edit.  Please
feel free to join in, edit the page, and help to improve QOI.

Another (related) issue is that sometimes the package maintainers may
over-specify the dependencies, when writing the mingw-get catalogue
entries for their packages.  I've challenged this tendency, in the past,
only to get a response along the lines of: "Isn't it better to
over-specify, than to omit something critical?  I'd rather not have to
devote too much time to the thought process needed to identify the
minimum set of true dependencies".

--
Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Eli Zaretskii
> Date: Tue, 12 Aug 2014 11:41:23 +0100
> From: Keith Marshall <[hidden email]>

Thanks for answering my questions.

> > Could someone please explain why the distributed binaries of GCC and
> > Binutils include the same programs several times?  For each foo.exe,
> > there's bin/foo.exe, bin/mingw32-foo.exe, mingw32/bin/foo.exe, etc.
> > And similarly with libexec/.
>
> I agree with your implied comment, that it seems perverse, but that's
> the way GCC's and binutils' build systems install them, and we just
> bundle our distributed tarballs from a staged installation snapshot.

This is true for the mingw32/bin/ part.  But the bin/mingw32-foo.exe
part seems to be an invention private to MinGW.  I've just built the
stock Binutils 2.24, and it doesn't install any prefixed executables.

Moreover, different binary distributions provided by the MinGW
download site are inconsistent in this regard.  E.g., binutils-2.22-1
and binutils-2.24-1 don't include the mingw32- prefixed binaries,
while binutils-2.23-2 and gcc-core-4.8.1 do.

I guess this prefix comes from the typical GNU configure script which
sets looks for ${host_alias}-gcc etc.  And since it is customary to
configure MinGW ports with an explicit --host=mingw32 (which is not
strictly required, as configure, when running natively, will correctly
guess the canonical host name), I suppose someone thought that without
these prefixes the programs won't be found.  Which is false: if
"mingw32-gcc" is not found, the script continues to look for just
"gcc".

So it sounds like these just waste disk space and complicate
maintenance (e.g., when you upgrade and incidentally leave behind a
stale mingw32-foo.exe, especially since the different bundles do this
inconsistently).

> > Also, the "HOWTO Install the MinGW GCC" page at
> > http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
> > says that one needs to download both the dev and dll packages for the
> > runtime support libraries (such as mpc, gmp, iconv, etc.), but it
> > looks like the dev packages are not required for running the compiler
> > and Binutils, they are only required if you want to develop your own
> > programs that link against those support libraries.  Am I missing
> > something?
>
> No, I think you are right on the money; one of the perils of using a
> wiki as a documentation host is that misinformation can all to easily
> creep in, and we don't have the resources to vet every edit.  Please
> feel free to join in, edit the page, and help to improve QOI.

I seem to be unable to do that: I got an account and succeeded to log
in, but there's no "Edit" tab on any Wiki page.  What am I missing?

> Another (related) issue is that sometimes the package maintainers may
> over-specify the dependencies, when writing the mingw-get catalogue
> entries for their packages.  I've challenged this tendency, in the past,
> only to get a response along the lines of: "Isn't it better to
> over-specify, than to omit something critical?  I'd rather not have to
> devote too much time to the thought process needed to identify the
> minimum set of true dependencies".

This issue is IMO less of an importance for users who use mingw-get,
because they explicitly trust the system to err on the safe side.  But
the page I cited talks about manual installation instructions, where
IMO the text should be more accurate, because people who do this
manually like to be in full control of their systems (I know I do ;-).
So I think explaining there when the dev packages are needed and when
not is a Good Thing, whereas the automated specifications can continue
with their potential over-specification habits, if they don't want to
hear your voice of reason (really, how hard can it be to identify all
the dependencies?).

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Keith Marshall
On 12/08/14 15:58, Eli Zaretskii wrote:

>> Date: Tue, 12 Aug 2014 11:41:23 +0100
>> From: Keith Marshall <[hidden email]>
>
> Thanks for answering my questions.
>
>>> Could someone please explain why the distributed binaries of GCC and
>>> Binutils include the same programs several times?  For each foo.exe,
>>> there's bin/foo.exe, bin/mingw32-foo.exe, mingw32/bin/foo.exe, etc.
>>> And similarly with libexec/.
>>
>> I agree with your implied comment, that it seems perverse, but that's
>> the way GCC's and binutils' build systems install them, and we just
>> bundle our distributed tarballs from a staged installation snapshot.
>
> This is true for the mingw32/bin/ part.  But the bin/mingw32-foo.exe
> part seems to be an invention private to MinGW.  I've just built the
> stock Binutils 2.24, and it doesn't install any prefixed executables.

No, it doesn't for me either, (although it does duplicate a subset of
the executables from bin in mingw32/bin); this is consistent with the
content I uploaded as binutils-2.24-1-mingw32-bin.tar.xz

> Moreover, different binary distributions provided by the MinGW
> download site are inconsistent in this regard.  E.g., binutils-2.22-1
> and binutils-2.24-1 don't include the mingw32- prefixed binaries,
> while binutils-2.23-2 and gcc-core-4.8.1 do.

The binutils-2.24-1 contribution was mine; since my staged installation
didn't include those extra mingw32- prefixed executables, I did nothing
to create them.

Both binutils-2.23-2 and gcc-4.8.1 were Earnie's; I've no idea if he did
anything out of the ordinary, to create those extra files.  Prior to
those, Chris Sutcliffe managed our binutils releases, and it was Cesar
Strauss who managed GCC.

> I guess this prefix comes from the typical GNU configure script which
> sets looks for ${host_alias}-gcc etc.  And since it is customary to
> configure MinGW ports with an explicit --host=mingw32 (which is not
> strictly required, as configure, when running natively, will correctly
> guess the canonical host name),

It seems like a reasonable guess, but I'm not sure that it's correct;
after all, I cross-compile, so I've got to configure with:

  $ .../configure --build=x86_64-linux-gnu --host=mingw32 ...

and I don't create those extra files, in my binutils-2.24 build.  When I
built a crossed-native gcc-4.8.2, however, there were a few of those
mingw32- prefixed executables created, and those did find their way into
my gcc-core-4.8.2-mingw32-pre-20140218-1-bin.tar.xz upload.

> I suppose someone thought that without these prefixes the programs
> won't be found.  Which is false: if "mingw32-gcc" is not found, the
> script continues to look for just "gcc".

Yes, but it only looks for those prefixed variants when $host != $build
and that means cross-compiling; it's likely bad news if the prefixed
variant isn't found, in this case, and configure does issue a warning.

> So it sounds like these just waste disk space and complicate
> maintenance (e.g., when you upgrade and incidentally leave behind a
> stale mingw32-foo.exe, especially since the different bundles do this
> inconsistently).

The inconsistencies certainly aren't desirable, but from the POV of the
distributor, they don't impose any additional maintenance burden; we
just distribute what the stock build procedure puts into the staged
installation.  For end users, who use the recommended installation
management tools, they shouldn't be a problem either:

  $ mingw-get upgrade

should clean up the left-overs, just fine.  Of course, if you eschew the
use of the recommended tools, then you may have a more difficult ride,
but then, isn't that your choice?

>>> Also, the "HOWTO Install the MinGW GCC" page at
>>> http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
>>> says that one needs to download both the dev and dll packages for the
>>> runtime support libraries (such as mpc, gmp, iconv, etc.), but it
>>> looks like the dev packages are not required for running the compiler
>>> and Binutils, they are only required if you want to develop your own
>>> programs that link against those support libraries.  Am I missing
>>> something?
>>
>> No, I think you are right on the money; one of the perils of using a
>> wiki as a documentation host is that misinformation can all to easily
>> creep in, and we don't have the resources to vet every edit.  Please
>> feel free to join in, edit the page, and help to improve QOI.
>
> I seem to be unable to do that: I got an account and succeeded to log
> in, but there's no "Edit" tab on any Wiki page.  What am I missing?

What's the user name for your account?  We need to explicitly authorize
edit access for you, because without that layer of protection, too many
hooligans were opening accounts then trashing the site.

--
Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Keith Marshall
On 12/08/14 19:19, Keith Marshall wrote:
>>> No, I think you are right on the money; one of the perils of using a
>>> wiki as a documentation host is that misinformation can all to easily
>>> creep in, and we don't have the resources to vet every edit.  Please
>>> feel free to join in, edit the page, and help to improve QOI.
>>
>> I seem to be unable to do that: I got an account and succeeded to log
>> in, but there's no "Edit" tab on any Wiki page.  What am I missing?
>
> What's the user name for your account?

Never mind; I found the obvious account anyway.

> We need to explicitly authorize edit access for you,

And this should now be in place; I've identified you as a "trusted
authenticated user", which should be sufficient to let you edit wiki
pages.  If you'd like to change anything on the non-wiki pages, then I'd
be willing to consider escalating your access permission to full
"content management" level.

--
Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Eli Zaretskii
> Date: Tue, 12 Aug 2014 19:53:04 +0100
> From: Keith Marshall <[hidden email]>
>
> On 12/08/14 19:19, Keith Marshall wrote:
> >>> No, I think you are right on the money; one of the perils of using a
> >>> wiki as a documentation host is that misinformation can all to easily
> >>> creep in, and we don't have the resources to vet every edit.  Please
> >>> feel free to join in, edit the page, and help to improve QOI.
> >>
> >> I seem to be unable to do that: I got an account and succeeded to log
> >> in, but there's no "Edit" tab on any Wiki page.  What am I missing?
> >
> > What's the user name for your account?
>
> Never mind; I found the obvious account anyway.
>
> > We need to explicitly authorize edit access for you,
>
> And this should now be in place; I've identified you as a "trusted
> authenticated user", which should be sufficient to let you edit wiki
> pages.  If you'd like to change anything on the non-wiki pages, then I'd
> be willing to consider escalating your access permission to full
> "content management" level.

Thanks, I made the corrections in the Wiki.  Comments are welcome.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Keith Marshall
On 15/08/14 08:16, Eli Zaretskii wrote:
> Thanks, I made the corrections in the Wiki.  Comments are welcome.

Looks good to me, thanks.  Just one potential issue, I've noticed:

> The linker scripts are also in the binutils "dev" package.

May be true of some older packages, but in my binutils-2.24 collection I
see them in the "bin" package, (and not in "dev"); seems like the more
logical delivery vehicle, I think.

--
Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Eli Zaretskii
> Date: Fri, 15 Aug 2014 20:40:00 +0100
> From: Keith Marshall <[hidden email]>
>
> On 15/08/14 08:16, Eli Zaretskii wrote:
> > Thanks, I made the corrections in the Wiki.  Comments are welcome.
>
> Looks good to me, thanks.  Just one potential issue, I've noticed:
>
> > The linker scripts are also in the binutils "dev" package.
>
> May be true of some older packages, but in my binutils-2.24 collection I
> see them in the "bin" package, (and not in "dev")

Thanks, fixed.

> seems like the more logical delivery vehicle, I think.

I agree.

Btw, the same can be said about having the cc1.exe and cc1plus.exe in
the respective "dev" packages.  Here, I'd say it makes even less
sense, because having gcc.exe without cc1.exe means you have no
working compiler at all.

I think the "bin" packages for the compilers should include everything
required to provide a stand-alone (a.k.a. "free-standing") compiler,
and the "dev" packages should include everything else.  Otherwise, the
partition between these two packages doesn't make sense, because you
cannot install one without the other and have some meaningful
functionality.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Keith Marshall
On 16/08/14 08:54, Eli Zaretskii wrote:
> Btw, the same can be said about having the cc1.exe and cc1plus.exe in
> the respective "dev" packages.  Here, I'd say it makes even less
> sense, because having gcc.exe without cc1.exe means you have no
> working compiler at all.

I completely agree; FWIW, my gcc-4.8.2 preview packages, (in the
"experimental" directory, on the download site), don't include "dev"
sub-packages at all.

> I think the "bin" packages for the compilers should include everything
> required to provide a stand-alone (a.k.a. "free-standing") compiler,
> and the "dev" packages should include everything else.  Otherwise, the
> partition between these two packages doesn't make sense, because you
> cannot install one without the other and have some meaningful
> functionality.

Exactly so; gcc-4.8.1-mingw32 is a mess.  I've attached the package spec
I've used for 4.8.2; I think it's reasonable, but comments are welcome.

--
Regards,
Keith.

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

_______________________________________________
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

gcc-4.8.2-mingw32.pkgspec (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Eli Zaretskii
> Date: Sat, 16 Aug 2014 21:22:28 +0100
> From: Keith Marshall <[hidden email]>
>
> I've attached the package spec I've used for 4.8.2; I think it's
> reasonable, but comments are welcome.

Looks OK to me.  But where do the dependencies like mpc etc. hide in
this spec?

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Keith Marshall
On 17/08/14 15:28, Eli Zaretskii wrote:
>> Date: Sat, 16 Aug 2014 21:22:28 +0100
>> From: Keith Marshall <[hidden email]>
>>
>> I've attached the package spec I've used for 4.8.2; I think it's
>> reasonable, but comments are welcome.
>
> Looks OK to me.  But where do the dependencies like mpc etc. hide in
> this spec?

They don't.  I performed a crossed native build, with their sources
linked into the GCC tree, just as I described for the cross-compiler
build here:
http://thread.gmane.org/gmane.comp.gnu.mingw.user/44022/focus=44077

This didn't create any DLLs for gmp, mpfr, or mpc, so I guess I've
linked them statically; thus, they wouldn't constitute dependencies,
would they?

--
Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple copies of the same programs in GCC and Binutils

Eli Zaretskii
> Date: Sun, 17 Aug 2014 16:39:17 +0100
> From: Keith Marshall <[hidden email]>
>
> > But where do the dependencies like mpc etc. hide in this spec?
>
> They don't.  I performed a crossed native build, with their sources
> linked into the GCC tree, just as I described for the cross-compiler
> build here:
> http://thread.gmane.org/gmane.comp.gnu.mingw.user/44022/focus=44077
>
> This didn't create any DLLs for gmp, mpfr, or mpc, so I guess I've
> linked them statically; thus, they wouldn't constitute dependencies,
> would they?

Right.

------------------------------------------------------------------------------
_______________________________________________
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