reduced link interface: some link breakage possible

Matthew Woehlke mw_triad at users.sourceforge.net
Mon Dec 15 23:22:05 GMT 2008


Richard Moore wrote:
> On Mon, Dec 15, 2008 at 10:20 PM, Alexander Neundorf <neundorf at kde.org> wrote:
>>  2.) You are probably using symbols from some library which you don't link to
>> directly, but which was dragged in via one of the other libraries you link
>> to, and these "dragged in" libraries have now been mostly removed.
>> In this case, add these missing libraries explicitely to the
>> TARGET_LINK_LIBRARIES() command.
>> (because: less dependencies for packages, faster startup, some advantages in
>> keeping binary compatiblity).
> 
> How does this affect binary compatibility? It sounds like this might break it.

Why would it affect BC? As I understand, this means that:

- libfoo links with libbar
- libcow links with libfoo and uses functions from libbar
- this used to work, now it won't

Previously this would work because telling cmake you wanted libfoo would 
know that libfoo needs libbar, and would therefor implicitly link libcow 
with both libfoo and libbar. Now you need to specify that you are using 
libbar.

The only "some advantages in keeping BC" I can come up with is that 
libcow would previously expect libbar regardless if it used it or not, 
which means that if libfoo is rebuilt without libbar and libbar is 
dropped, you have a problem. In which case, this change doesn't break 
BC, and reduces the chances of a future library removal causing a BC break.

That said, it's entirely possible I missed something ;-).

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
Me: wtf?? "#warning This is temporary since Dec 2000". Seven-year 
"temporary" code?
Mathieu Chouinard: Sounds like the correct definition of temporary :)





More information about the kde-core-devel mailing list