[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to convince maintainer to use --as-needed?



On Fri, 10 Feb 2012 23:15:22 Bernhard R. Link wrote:

> I personally strongly recommend against using --as-needed unless you
> understand very well what it does. It may change the runtime behaviour of a
> program without any signs at link time.

Surely it's a powerful thing which should be used with care.
Many packages has no or little benefit so using --as-needed would not be 
justified.

But sometimes an innocent call to library causing package to inherit the whole 
hierarchy of needless dependencies. 
And this affect not just obvious things like slower start-up and installation 
but also troubles with migration to testing and complications with library 
transitions. The latter sucks our precious manpower not just from package 
maintainer.

Package maintainers can surely track problems to --as-needed if that's the 
case and here we have hope because many packages using it already for years 
successfully.


> Unless you are entangled in libraries ignoring usual best practises and
> ignoring library borders in their headers (libglib, libboost), there
> might be better solutions than --as-needed.

I'd like to learn more about --as-needed alternatives. 
Could you suggest any resources/guidelines, please?

> 
> That is not to say there might not be cases where --as-needed is the
> best solution, but it is definitely not something one should apply
> blindly.
 
Indeed. 
But this seems to be more like risk management and less like informed 
technical decision. (I wonder what makes Ubuntu taking the risk applying --as-
needed to everything?)
Surely there must be software incompatible with --as-needed. But what are the 
chances to experience it? How to identify situation when --as-needed is likely 
to cause troubles?

Regards,
Dmitry.


Reply to: