is there a list of lib dependencies?

Chuck Robey chuckr at telenix.org
Thu Jul 24 07:28:10 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adam Jackson wrote:
> On Wed, 2008-07-23 at 20:46 -0400, Chuck Robey wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> 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.
>>
>> 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.
> 
> There's a topologically sorted list in build.sh:
> 
> http://cgit.freedesktop.org/xorg/util/modular/tree/build.sh
> 
> But those are, primarily, client-side libraries, which doesn't seem to
> be what you're talking about at all.
> 
> X drivers are not themselves executable objects.  They are shared
> libraries.  They only work when dlopen()'d by the X server, and the
> unresolved symbols in the driver are provided by the server.  So you
> don't link the driver against libosandcommon, or against anything else
> from the server, at build time.
> 
> You really sound like you're making this more complicated than it is.

Oh.  Well.  Hmm, then I either need to give up this testing strategy, or take my
code from object files.  What I have been trying to do it to duplicate what I
already did for the usb part of my driver: to write test code that does what I
need as a user app, so that I can test it there rather more easily than actually
doing it in drivers.  The driver part yielded reasonably well to this wort of
thing, but there, I had about 85% coverage of man files.  Here, I have maybe 10%
coverage (and organized in a way that makes it pretty hard for me to find) so I
figured that testing here was far more important that the USB part.  I have
really high confidence in my usb part because of the test template which I made
work.

The one thing I didn't want to do, at all, was just to write this, then struggle
for months as I try to make sense of whatever error messages I have,  I can't
see how I'll get gdb to help me out on such a really complicated setup, if I
don't make things a bit more direct at the beginning, by using a simple test setup.

Thanks to your hint, I'll stop my effort to get the libs to link, I can use the
object files involved.  It's a bit silly way to do this, but it _will_ work (I
just won't be sharing any code that looks that weird, not MY code!)

> 
> - ajax

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiIkXoACgkQz62J6PPcoOkPDQCfRBHq2QqUPGLZuvfWFX4d8rYC
0J0An11GwGpQDpFREQX/VReop6joWWE6
=HMWR
-----END PGP SIGNATURE-----



More information about the xorg mailing list