Re: Minimizing ld dependencies with --as-needed

2005-04-23 Thread Tollef Fog Heen
* Ralf Wildenhues 

| * Tollef Fog Heen wrote on Wed, Apr 13, 2005 at 09:45:03PM CEST:
|  * Ralf Wildenhues 
|  
|  | I would be much happier if someone with time would just help to put
|  | this into libtool properly as an option (and possible adjust pkg-config,
|  | FWIW).  I'm pretty sure it would minimize the combined amount of work,
|  | with increased benefit.
|  
|  pkg-config has the necessary patches now, but the support is disabled
|  by default in Debian.  It'll be enabled post-sarge.
| 
| I think that is not enough.  Unless libtool supports this properly, you
| will end up having weird, seemingly unrelated bug reports with things
| that broke by this change. 

Why?

| It won't work at all unless Debian Libtool keeps its
| link_all_deplibs=no patch, which is unfortunate.

pkg-config is used outside of a libtool context too.

[...]

| We started some discussions on this issue[1], but no final conclusion
| nor patch has been proposed.  It would be much nicer to solve the
| problem cleanly in libtool.

You can't solve the whole problem in libtool.  I was merely saying
that pkg-config upstream and in Debian now has the necessary patches,
but they will stay disabled until sarge releases; I wasn't talking
about libtool at all.

| To put it another way: Please don't blame libtool for failures caused by
| using --as-needed behind its back.

--as-needed is more or less just a way to hide errors and should
really be renamed to --print-unneeded or something similar where it
would generate warnings for unused libraries.

-- 
Tollef Fog Heen,''`.
UNIX is user friendly, it's just picky about who its friends are  : :' :
  `. `' 
`-  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-20 Thread Ralf Wildenhues
Hi Tollef,

Sorry for the high response latency.

* Tollef Fog Heen wrote on Wed, Apr 13, 2005 at 09:45:03PM CEST:
 * Ralf Wildenhues 
 
 | I would be much happier if someone with time would just help to put
 | this into libtool properly as an option (and possible adjust pkg-config,
 | FWIW).  I'm pretty sure it would minimize the combined amount of work,
 | with increased benefit.
 
 pkg-config has the necessary patches now, but the support is disabled
 by default in Debian.  It'll be enabled post-sarge.

I think that is not enough.  Unless libtool supports this properly, you
will end up having weird, seemingly unrelated bug reports with things
that broke by this change.  It won't work at all unless Debian Libtool
keeps its link_all_deplibs=no patch, which is unfortunate.  I would
like to see less variations in Distributions' libtool packages.  Even
with the patch I think you are not safe.  At the very least, user
compiling their own software might encounter needless trouble.

We started some discussions on this issue[1], but no final conclusion
nor patch has been proposed.  It would be much nicer to solve the
problem cleanly in libtool.

To put it another way: Please don't blame libtool for failures caused by
using --as-needed behind its back.

Regards,
Ralf

[1] http://lists.gnu.org/archive/html/libtool/2004-11/msg00455.html
http://lists.gnu.org/archive/html/libtool/2004-12/msg00029.html


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-13 Thread Tollef Fog Heen
* Ralf Wildenhues 

| I would be much happier if someone with time would just help to put
| this into libtool properly as an option (and possible adjust pkg-config,
| FWIW).  I'm pretty sure it would minimize the combined amount of work,
| with increased benefit.

pkg-config has the necessary patches now, but the support is disabled
by default in Debian.  It'll be enabled post-sarge.

-- 
Tollef Fog Heen,''`.
UNIX is user friendly, it's just picky about who its friends are  : :' :
  `. `' 
`-  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-12 Thread Ralf Wildenhues
[ please cc: me on replies ]

* Ron Johnson wrote:
 What are the opinions of d-d's of --as-needed?
 
 According to this thread, the number of dependencies can sometimes
 be slashed drastically.

I would be much happier if someone with time would just help to put
this into libtool properly as an option (and possible adjust pkg-config,
FWIW).  I'm pretty sure it would minimize the combined amount of work,
with increased benefit.

Regards,
Ralf, no DD, but involved with Libtool


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Minimizing ld dependencies with --as-needed

2005-04-01 Thread Ron Johnson
What are the opinions of d-d's of --as-needed?

http://www.ubuntuforums.org/showthread.php?t=17287

According to this thread, the number of dependencies can sometimes
be slashed drastically.

(Of course, it would have to wait until Sarge becomes Stable.)

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B I prefer encrypted mail.

The man who has gotten everything he wants is all in favor of
peace and order.
Jawaharlal Nehru



signature.asc
Description: This is a digitally signed message part


Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Andrew Suffield
On Fri, Apr 01, 2005 at 02:34:44AM -0600, Ron Johnson wrote:
 What are the opinions of d-d's of --as-needed?

It's a method of working around bugs. Just fix the bugs
instead. Update libtool to the latest version and don't -l stuff you
don't need to -l.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- --  |


signature.asc
Description: Digital signature


Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Tollef Fog Heen
* Andrew Suffield 

| It's a method of working around bugs. Just fix the bugs
| instead. Update libtool to the latest version and don't -l stuff you
| don't need to -l.

pkgconfig does add a bunch of gratious -l, similar to what libtool
used to.  This will be fixed, but I'm not sure I want to introduce
that so late in the release cycle.

-- 
Tollef Fog Heen,''`.
UNIX is user friendly, it's just picky about who its friends are  : :' :
  `. `' 
`-  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Andrew Suffield
On Fri, Apr 01, 2005 at 12:24:23PM +0200, Tollef Fog Heen wrote:
 * Andrew Suffield 
 
 | It's a method of working around bugs. Just fix the bugs
 | instead. Update libtool to the latest version and don't -l stuff you
 | don't need to -l.
 
 pkgconfig does add a bunch of gratious -l, similar to what libtool
 used to.  This will be fixed, but I'm not sure I want to introduce
 that so late in the release cycle.

I'm pretty sure we don't want to go meddling with this stuff at all so
late in the release cycle, so everything here is post-sarge.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- --  |


signature.asc
Description: Digital signature


Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Josselin Mouette
Le vendredi 01 avril 2005 à 02:34 -0600, Ron Johnson a écrit :
 What are the opinions of d-d's of --as-needed?
 
 http://www.ubuntuforums.org/showthread.php?t=17287
 
 According to this thread, the number of dependencies can sometimes
 be slashed drastically.

I'm moving all my packages to use it. It's not only a workaround for
libtool or pkgconfig bugs, it's also a great tool when some upstream
authors gratuitously adds unneeded -l flags.
-- 
 .''`.   Josselin Mouette/\./\
: :' :   [EMAIL PROTECTED]
`. `'[EMAIL PROTECTED]
   `-  Debian GNU/Linux -- The power of freedom



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Steve Langasek
On Fri, Apr 01, 2005 at 12:53:27PM +0200, Josselin Mouette wrote:
 Le vendredi 01 avril 2005 à 02:34 -0600, Ron Johnson a écrit :
  What are the opinions of d-d's of --as-needed?

  http://www.ubuntuforums.org/showthread.php?t=17287

  According to this thread, the number of dependencies can sometimes
  be slashed drastically.

 I'm moving all my packages to use it.

Please don't.  Last I knew, this option was still labelled *experimental*
upstream -- there's no possible damage that stray lib dependencies can do to
sarge that competes with the certain damage of having *missing* library
dependencies.

-- 
Steve Langasek
postmodern programmer


signature.asc
Description: Digital signature


Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Ron Johnson
On Fri, 2005-04-01 at 03:09 -0800, Steve Langasek wrote:
 On Fri, Apr 01, 2005 at 12:53:27PM +0200, Josselin Mouette wrote:
  Le vendredi 01 avril 2005 à 02:34 -0600, Ron Johnson a écrit :
   What are the opinions of d-d's of --as-needed?
 
   http://www.ubuntuforums.org/showthread.php?t=17287
 
   According to this thread, the number of dependencies can sometimes
   be slashed drastically.
 
  I'm moving all my packages to use it.
 
 Please don't.  Last I knew, this option was still labelled *experimental*
 upstream -- there's no possible damage that stray lib dependencies can do to
 sarge that competes with the certain damage of having *missing* library
 dependencies.

And since these are (always?) dependencies on shared objects,
these libraries never get used, except to say, Here I am!,
right?

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B I prefer encrypted mail.

Capitalism needs a culture of shame to work properly.
Paraphrased from Victor David Hansen, seen on CSPAN 2004-03-07



signature.asc
Description: This is a digitally signed message part


Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Gustavo Franco
On Apr 1, 2005 7:32 AM, Andrew Suffield [EMAIL PROTECTED] wrote:
 On Fri, Apr 01, 2005 at 12:24:23PM +0200, Tollef Fog Heen wrote:
  * Andrew Suffield
 
  | It's a method of working around bugs. Just fix the bugs
  | instead. Update libtool to the latest version and don't -l stuff you
  | don't need to -l.
 
  pkgconfig does add a bunch of gratious -l, similar to what libtool
  used to.  This will be fixed, but I'm not sure I want to introduce
  that so late in the release cycle.
 
 I'm pretty sure we don't want to go meddling with this stuff at all so
 late in the release cycle, so everything here is post-sarge.
 

I agree, but are we tracking all these post-sarge issues that are coming on d-d
and others lists? I hope that after sarge we start working on these
issues before
etch came closer.

I'm interested in put online a web page containing some things suggested to be 
investigated post-sarge (technical stuff only), anyone too?

--
Gustavo Franco -- [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread GOMBAS Gabor
On Fri, Apr 01, 2005 at 06:01:27AM -0600, Ron Johnson wrote:

 And since these are (always?) dependencies on shared objects,
 these libraries never get used, except to say, Here I am!,
 right?

The runtime linker still loads them, which can be expensive (esp.
if there are many relocation records), and unneccessarily consumes
virtual address space (which can be a problem for applications with
large working set on 32-bit systems).

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread GOMBAS Gabor
On Fri, Apr 01, 2005 at 12:53:27PM +0200, Josselin Mouette wrote:

 I'm moving all my packages to use it. It's not only a workaround for
 libtool or pkgconfig bugs, it's also a great tool when some upstream
 authors gratuitously adds unneeded -l flags.

General note: you have to be careful with --as-needed if you link with
libraries having global constructors/desctuctors as these can alter the
execution of the program even if no symbol is used directly from the
library in question.

Not many libraries have constructors (at least not many C libraries,
with C++ it is much more common) so in the majority of cases this is not
an issue, but you have to be aware that you cannot just blindly add
--as-needed everywhere.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Daniel Jacobowitz
On Fri, Apr 01, 2005 at 03:09:13AM -0800, Steve Langasek wrote:
 On Fri, Apr 01, 2005 at 12:53:27PM +0200, Josselin Mouette wrote:
  Le vendredi 01 avril 2005 à 02:34 -0600, Ron Johnson a écrit :
   What are the opinions of d-d's of --as-needed?
 
   http://www.ubuntuforums.org/showthread.php?t=17287
 
   According to this thread, the number of dependencies can sometimes
   be slashed drastically.
 
  I'm moving all my packages to use it.
 
 Please don't.  Last I knew, this option was still labelled *experimental*
 upstream -- there's no possible damage that stray lib dependencies can do to
 sarge that competes with the certain damage of having *missing* library
 dependencies.

For the record, it isn't actually labelled as experimental upstream -
but there have been some problems with it, and they were fixed in
versions of binutils not yet included in Debian.  I second Steve's
advice; if you want to use this ld feature, wait a little longer.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Tollef Fog Heen
* Gustavo Franco 

| I agree, but are we tracking all these post-sarge issues that are
| coming on d-d and others lists? I hope that after sarge we start
| working on these issues before etch came closer.

I'm doing a rebuild of sarge with a changed pkg-config now, to see
what breaks.

-- 
Tollef Fog Heen,''`.
UNIX is user friendly, it's just picky about who its friends are  : :' :
  `. `' 
`-  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Minimizing ld dependencies with --as-needed

2005-04-01 Thread Gustavo Franco
On Apr 1, 2005 1:58 PM, Tollef Fog Heen [EMAIL PROTECTED] wrote:
 * Gustavo Franco
 
 | I agree, but are we tracking all these post-sarge issues that are
 | coming on d-d and others lists? I hope that after sarge we start
 | working on these issues before etch came closer.
 
 I'm doing a rebuild of sarge with a changed pkg-config now, to see
 what breaks.
 

It's good to hear, let us known about the results. 

I'll do something about collect what's being discussed on the lists
and is being pushed to after sarge this weekend. It would be good
sum up these ideas in a wiki like wiki.debian.net but i accept help
and suggestions.

--
Gustavo Franco -- [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]