Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: ldd and LD_DEBUG completions



Peter wrote:
> Oliver Kiddle wrote:
> > The zsh libraries are not especially cleanly linked by the way. Run ldd
> > -ur (preferably on Solaris) on them to see what I mean.
> 
> I'm getting this:
>    unused object=/usr/lib/libsocket.so.1
> Mostly that doesn't look unreasonable.

Not unreasonable but you get curses in there too for a lot of libraries.
(I wonder whether curses dependent things could be moved to zle.so so
that a non-interactive zsh didn't need it).

> That's a fairly cosmetic problem requiring a rewrite of the build system that's

It's not entirely cosmetic. Removing unused dependencies can reduce
startup times. Optimising this made a very noticeably difference to some
other software a colleague of mine was working on (though admittedly
that was pulling in a lot more stuff from libraries).

And while I agree that rewriting the build system for this issue would
be excessive, it is closely related to the issue of modules having extra
dependencies.  Didn't Clint put in some hack so that only the cap module
depends on libcap.so.

As pointed out by Danek, using -z ignore for compiler's that support it
could be an easy fix. At the very least, Debian etc packages could do
this (Hello Clint). In some cases Sun's -z lazyload would also
be useful (e.g. iconv). 

Note: ldd -u -r also lists a lot of "symbol not found" errors. I think
these may be the symbols from the main zsh binary (or libzsh) so they
aren't an issue. With most software, they indicate that your library
needs to be linked against other libraries (the same information comes
from the compile option -z defs).

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author