Public feed #893991

Stuff

public text v1 · immutable
Raw Edit
·published 2008-02-06 16:33 UTC
rendered paste body
Hello,

I'd like to suggest that we use the new (as of pkg-config 0.22)
'Requires.private' flag in the .pc files instead of the current 'Requires' flag.

'Requires.private' is a field that basically has the same role as 'Requires'.
However, the dependencies listed in this field are not looked at when calling
pkg-config --libs foobar when dynamic linking is done (ie, no --static is
specified).
This prevents unneeded recursive linking of the dependencies, like this is
currently the case (eg, everything linked against ecore-file with CURL support
enabled is also linked against curl, which is a maintenance hell and a complete
nonsense, and this is one example out of many).
That means that in our case, Requires.private field can replace Requires
virtually everywhere if the dependencies have no undefined symbols and if they
don't specify anything else than -l/-L flags.

As a quick example of what the benefit would be, I rebuilt the EFL, E, etk and
ewl using Requires.private instead of Requires in their pkg-config files, and
ran objdump -p $foo | grep NEEDED on every {module,shared library,binary} before
and after the change. The results can be found at
http://people.dunnewind.net/lutin/files/efl_links--.diff

The obvious drawback, of course, is that it would break build on every install
where pkg-config 0.22 is not available, which is quite unpleasant, given that
it's only 8-month old. I'm sending this mail for the record, though :)

Cheers,
-- 
Albin Tonnerre, aka Lutin