public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [RFC] Removing .la files from x86
@ 2016-08-03  3:11 Yaakov Selkowitz
  2016-08-03  4:16 ` Warren Young
  2016-08-03  8:00 ` Corinna Vinschen
  0 siblings, 2 replies; 5+ messages in thread
From: Yaakov Selkowitz @ 2016-08-03  3:11 UTC (permalink / raw)
  To: cygwin-apps

Libtool .la files are generally a waste of time and space.  They slow 
down linking of other libraries with libtool, and they cause otherwise 
unnecessary private dependencies to be pulled in by -devel packages. 
Therefore, the major distros generally remove them from their packages 
unless they are really necessary.

When we first enabled Cygwin for x86_64, as we had no backwards 
compatibility to worry about, I made removing all .la files the default. 
  AFAIK this has worked well, and any missing link libraries that the 
presence thereof would have masked have already been fixed.

In order to do the same for x86 without breaking builds of other 
packages, AFAICS we would need a perpetual postinstall script which will 
continually remove them.  The downside is that (unless the script is 
made a *LOT* more complicated) a number of -devel packages will show up 
as "Incomplete" until such time they are rebuilt with a new version of 
cygport.

Any objections?

-- 
Yaakov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Removing .la files from x86
  2016-08-03  3:11 [RFC] Removing .la files from x86 Yaakov Selkowitz
@ 2016-08-03  4:16 ` Warren Young
  2016-08-03  8:00 ` Corinna Vinschen
  1 sibling, 0 replies; 5+ messages in thread
From: Warren Young @ 2016-08-03  4:16 UTC (permalink / raw)
  To: cygwin-apps

On Aug 2, 2016, at 9:09 PM, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
> 
> Any objections?

This script would need to consult the same package database cygcheck uses to find out if an installed Cygwin package owns each *.la file it proposes to remove.  It should not remove any other *.la file just because it happens to be in /usr/lib.

It should not remove anything in other common libdirs like /usr/local/lib.  If I’ve installed something from source and its make install rule installs the *.la file, that’s an issue for the upstream provider.

Doesn’t libtool provide some of the magic library dependency chasing that exists on Linux but almost nowhere else?

That is, if library B depends on library C, and library A depends on B, on Linux you generally only need to explicitly link to library A, and the linker will chase down B and C for you.  This doesn’t usually happen on other systems, so you may have to explicitly link to library B, and sometimes to library C as well.

A common practical example is that libpng depends on zlib, but it is sufficient on Linux to link only with -lpng, whereas porting such software to non-Linux systems generally requires appending -lz.

Would we still have that behavior on Windows without the .la files?  If not, it’s possible that some build systems would break.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Removing .la files from x86
  2016-08-03  3:11 [RFC] Removing .la files from x86 Yaakov Selkowitz
  2016-08-03  4:16 ` Warren Young
@ 2016-08-03  8:00 ` Corinna Vinschen
  2016-08-03  9:19   ` Marco Atzeri
  1 sibling, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2016-08-03  8:00 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

On Aug  2 22:09, Yaakov Selkowitz wrote:
> Libtool .la files are generally a waste of time and space.  They slow down
> linking of other libraries with libtool, and they cause otherwise
> unnecessary private dependencies to be pulled in by -devel packages.
> Therefore, the major distros generally remove them from their packages
> unless they are really necessary.
> 
> When we first enabled Cygwin for x86_64, as we had no backwards
> compatibility to worry about, I made removing all .la files the default.
> AFAIK this has worked well, and any missing link libraries that the presence
> thereof would have masked have already been fixed.
> 
> In order to do the same for x86 without breaking builds of other packages,
> AFAICS we would need a perpetual postinstall script which will continually
> remove them.  The downside is that (unless the script is made a *LOT* more
> complicated) a number of -devel packages will show up as "Incomplete" until
> such time they are rebuilt with a new version of cygport.
> 
> Any objections?

User confusion about incomplete packages?

What I wonder is, if cygport builds don't create/install .la files
anymore, don't we end up without them at one point anyway?  Isn't it
sufficient if they go away over time?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Removing .la files from x86
  2016-08-03  8:00 ` Corinna Vinschen
@ 2016-08-03  9:19   ` Marco Atzeri
  2016-08-03 15:58     ` Yaakov Selkowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Atzeri @ 2016-08-03  9:19 UTC (permalink / raw)
  To: cygwin-apps

On 03/08/2016 10:00, Corinna Vinschen wrote:
> On Aug  2 22:09, Yaakov Selkowitz wrote:
>> Libtool .la files are generally a waste of time and space.  They slow down
>> linking of other libraries with libtool, and they cause otherwise
>> unnecessary private dependencies to be pulled in by -devel packages.
>> Therefore, the major distros generally remove them from their packages
>> unless they are really necessary.
>>
>> When we first enabled Cygwin for x86_64, as we had no backwards
>> compatibility to worry about, I made removing all .la files the default.
>> AFAIK this has worked well, and any missing link libraries that the presence
>> thereof would have masked have already been fixed.
>>
>> In order to do the same for x86 without breaking builds of other packages,
>> AFAICS we would need a perpetual postinstall script which will continually
>> remove them.  The downside is that (unless the script is made a *LOT* more
>> complicated) a number of -devel packages will show up as "Incomplete" until
>> such time they are rebuilt with a new version of cygport.
>>
>> Any objections?
>
> User confusion about incomplete packages?
>
> What I wonder is, if cygport builds don't create/install .la files
> anymore, don't we end up without them at one point anyway?  Isn't it
> sufficient if they go away over time?
>
>
> Corinna

I prefer just the change in cygport behaviour.

Please note we have still some *.la files on x86_64
for other reasons and we can not run an indiscriminate prune
on x86.

  $ ls -1 /usr/lib/*.la
/usr/lib/libguilereadline-v-17.la
/usr/lib/libguilereadline-v-18.la
/usr/lib/libguile-srfi-srfi-13-14-v-3.la
/usr/lib/libguile-srfi-srfi-1-v-3.la
/usr/lib/libguile-srfi-srfi-4-v-3.la
/usr/lib/libguile-srfi-srfi-60-v-2.la
/usr/lib/libltdl.la
/usr/lib/libntl.la

Regards
Marco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Removing .la files from x86
  2016-08-03  9:19   ` Marco Atzeri
@ 2016-08-03 15:58     ` Yaakov Selkowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Yaakov Selkowitz @ 2016-08-03 15:58 UTC (permalink / raw)
  To: cygwin-apps

On 2016-08-03 04:18, Marco Atzeri wrote:
> On 03/08/2016 10:00, Corinna Vinschen wrote:
>> On Aug  2 22:09, Yaakov Selkowitz wrote:
>>> Any objections?
>>
>> User confusion about incomplete packages?

That is my concern, although we are generally dealing with -devel 
packages here.  AFAICS the only way to work around that is to make the 
script much more complicated (and hence slower).

>> What I wonder is, if cygport builds don't create/install .la files
>> anymore, don't we end up without them at one point anyway?  Isn't it
>> sufficient if they go away over time?

The problem with that approach is that it would have to be done in a 
top-down order, otherwise builds of other packages would break.  For 
example, libFLAC.la (from flac-devel) requires libogg.la (from 
libogg-devel).  If libogg.la is removed by rebuilding libogg with a new 
cygport but libFLAC.la is not, then any libtool-based packages which 
link with -lFLAC will fail because of the missing libogg.la mentioned 
therein.  Hence, the only way not to break things once they're there is 
to either remove them from the top-down (mass rebuild), or all at once 
(a perpetual postinstall).

> Please note we have still some *.la files on x86_64
> for other reasons and we can not run an indiscriminate prune
> on x86.

I know. :-)  The modules that are kept on x86_64 would be left alone by 
the script.

-- 
Yaakov

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-03 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03  3:11 [RFC] Removing .la files from x86 Yaakov Selkowitz
2016-08-03  4:16 ` Warren Young
2016-08-03  8:00 ` Corinna Vinschen
2016-08-03  9:19   ` Marco Atzeri
2016-08-03 15:58     ` Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).