[OT] Re: libxcb-xlib.la failures when building X11 with libxcb-1.2
Eirik Byrkjeflot Anonsen
eirik at opera.com
Thu Mar 19 02:24:26 PDT 2009
Simon Thum <simon.thum at gmx.de> writes:
> Bill Crawford wrote:
>> included on the command line at link time. Libtool sort of abstracts this, but
>> to do so it needs to keep track of what those dependencies are, and does so by
>> storing them in this .la file.
> Thanks for the explanation. What baffles me is that AFAICT this
> introduces a lot of names to the linker, which you hadn't in mind when
> programming. So this practice is dangerous, because if you misspell
> something it may still be satisfied as libnever-heard-or-seen.so
> provides just your typo as a symbol, suppressing the proper error.
That's correct. However, the likelihood of such misspellings are
fairly small as long as the shared objects use a reasonable naming
convention. This is complicated by the traditional export-everything
policy of unix toolchains, though.
Although, in C/C++ such an error would also mean that the misspelling
matched some header file as well. So when this happens I don't think
the link-time match is your main problem :)
On the other hand. I think it is a much bigger problem that two
libraries may in fact export the same name. Now that really causes
problems, as you may get a completely different function than you
expected even though you spelled it correctly.
Or, when the (load-time) dependency tree of libraries ends up pulling
in mutually incompatible libraries (like when opera depended on on one
version of libpng, and libqt depended on a different version).
eirik
More information about the xorg
mailing list