is there a list of lib dependencies?

Paulo Cesar Pereira de Andrade pcpa at mandriva.com.br
Thu Jul 24 11:33:41 PDT 2008


Chuck Robey wrote:
> I seem to be on this endless hunt for library dependencies.
>
> Running on that hint I got to look into xf86-input/mouse/src/mouse.c, I took a
> function out of there and stuck it into the test template I'd made out of
> xserver/hw/xfree86/parser/cpconfig.c.  I found the original library that the
> function, xf86SetStrOption(), came from (libosandcommon.a), but I seem to be
> caught in this endless loop, because every time I add a library, I seem to add
> 2-4 new libs, ones that are dependent on that library.  It seems to be an
> endless search, probably because there's a particular list and order that I
> ought to be following to add libs to link against my test template.
  X Server modules are loaded dynamically, but there are also static
libraries to which the server is linked.

  Your best bet to quickly find definitions is to use something like ctags.
I think several editors support multiple projects/tags.
 If you just want to find where the symbol is defined, you can use a command
like:
for f in `list-of-shared-binaries`; do
  objdump -T $f | grep $symbol-name | grep -v '*UND*' && echo $f
done

  If you are building a module, you don't need to explicitly link to those
libraries, as the symbols end up being exported by the X Server. But you are
better using only symbols defined in the headers in /usr/include/xorg/*.h.

  Depending on what build system you use, you may also need it to somehow
accept creating shared binaries with unresolved symbols, if that is the
problem. I have a script that finds missings symbols, attached to a
freedesktop bugzilla (the script only checks for symbols that are
present in some Xorg modules and doesn't know if the module will be loaded
at runtime).

> And, so far, not a single one is from the regular X11/R7.4/lib.  I'm forever
> searching for things internal to the xorg sources.  Is there some list of the
> correct library linking dependencies?  If I can't find one, this is gonna take
> me forever to hunt these all down

Paulo




More information about the xorg mailing list