Re: the meaning of pkgconfig's Libs fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Robbie Harwood:

> Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx> writes:
>
>> 1. pc(5) talks about "package", as if one would want to link to a
>>    whole "package" instead one of the specific library files provided
>>    by a package. Thankfully most .pc files only list one "-l" in Libs.
>>    (Counterexamples: tbbmalloc_proxy.pc says 'Libs:-ltbbmalloc_proxy -ltbbmalloc',
>>    and mit-krb5.pc says Libs:-lkrb5 -lk5crypto -lcom_err.)
>
> k5crypto and com_err are internal libraries used across the different
> interfaces krb5 provides - they're not intended for external
> consumption, and upstream doesn't support their direct use by other
> applications.
>
>> To a large extent pkgconfig files are duplicating dependency logic
>> that is already provided by distro packaging (rpm in our case). This
>> would seem like an OK idea: upstreams specify which libraries they
>> need and downstreams use it.
>
> So you're technically right that this information is already duplicated
> by the dependencies libkrb5.so has already, but that's only true on
> Linux.  The .pc files are provided by upstream, and need to work on all
> OSs that upstream supports - which includes OSs whose linkers don't
> follow dependencies, like AIX.

But dropping these -l directives on Linux would ensure that it's not
possible to link against those internal symbols by accident (at least
from applications; with shared objects, you just get underlinking unless
you specify -Wl,-z,defs).  The Linux linking failure could actually help
other systems as well, to avoid those unwanted reliance on internal
features.

Thanks,
Florian
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux