[SSSD] [PATCH] sss_sifp: pkg-config requires is a comma separated list

Pavel Březina pbrezina at redhat.com
Tue Jul 8 17:37:38 UTC 2014


On 07/08/2014 12:51 PM, Lukas Slebodnik wrote:
> On (08/07/14 10:26), Pavel Březina wrote:
>> On 07/07/2014 02:01 PM, Lukas Slebodnik wrote:
>>> On (03/07/14 14:35), Jakub Hrozek wrote:
>>>> On Wed, Jul 02, 2014 at 01:46:49PM +0200, Pavel Březina wrote:
>>>>> cmake complained about this when building openlmi
>>>>
>>>> What was the error you were seeing?
>>>>
>>>> As a note, I was reading the pkg-config docs again:
>>>>     http://people.freedesktop.org/~dbn/pkg-config-guide.html
>>>> and I think it's correct we use Requires and not Requires.private since
>>>> we do expose some libdbus types in our public header.
>>> Field 'Requires' should contain a list of packages, therwise there is a warning
>>>
>>> user at a80c17581d5a:/tmp$ pkg-config --libs sss_simpleifp
>>> Requires field occurs twice in '/usr/lib/x86_64-linux-gnu/pkgconfig/sss_simpleifp.pc'
>>>
>>> user at a80c17581d5a:/tmp$ pkg-config --version
>>> 0.26
>>>
>>> I think we can remove dependency "dbus-1". The review process of sss_simpleifp
>>> was very long and there were lots of changes.
>>
>> The dbus dependency is there once you include sss_sifp_dbus.h, so it is a
>> question whether we can remove it from pkgconfig.
>>
> I see.
> In this case, you patch was right.
>
>>>
>>> I tested compilation of simple program (attached in mail). It works without any
>>> problem.
>>>     gcc sifp.c -Wl,--as-needed `pkg-config --libs sss_simpleifp`
>>>
>>> Pavel could you test with cmake in openlmi?
>>>
>>>>
>>>> I'm inclined to ack this patch, but I'd like to see the particular error
>>>> first.
>>>>
>>>>>  From 3b945c3da5b3717752451cac7868b285f158eabd Mon Sep 17 00:00:00 2001
>>>>> From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina at redhat.com>
>>>>> Date: Wed, 2 Jul 2014 13:45:53 +0200
>>>>> Subject: [PATCH] sss_sifp: pkg-config requires is a comma separated list
>>>>>
>>>>> ---
>>>>>   src/lib/sifp/sss_simpleifp.pc.in | 3 +--
>>>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/src/lib/sifp/sss_simpleifp.pc.in b/src/lib/sifp/sss_simpleifp.pc.in
>>>>> index a8b625608b0e8451b8fa44e1a927d51a3e11cef1..e57ed8db4174db433d0aad56cbd8179c140e0b17 100644
>>>>> --- a/src/lib/sifp/sss_simpleifp.pc.in
>>>>> +++ b/src/lib/sifp/sss_simpleifp.pc.in
>>>>> @@ -4,8 +4,7 @@ includedir=@includedir@
>>>>>   Name: sss_simpleifp
>>>>>   Description: A library that simplifies work with the InfoPipe responder
>>>>>   Version: @VERSION@
>>>>> -Requires: dbus-1
>>>>> -Requires: dhash
>>>>> +Requires: dbus-1, dhash
>>>>>   Libs: -L at libdir@ -lsss_simpleifp
>>>>>   Cflags: -I${includedir}
>>>>>   URL: http://fedorahosted.org/sssd/
>>>
>>> Could you add next line to this file?
>>>     prefix=@prefix@
>>> because there is another pkg-config warning
>>>
>>> user at a80c17581d5a:/tmp$ pkg-config --libs sss_simpleifp
>>> Variable 'prefix' not defined in '/usr/lib/x86_64-linux-gnu/pkgconfig/sss_simpleifp.pc'
>>
>> Hmm, didn't we remove it during the review process?
>>
> Yes, it was; but it was not good idea :-)
> It is not problem with default prefix "/usr". (fedora)
>
> You can try to install into different prefix(exec_prefix) "/usr/local/"
>
> sh-4.2$ cat /usr/local/lib/pkgconfig/sss_simpleifp.pc
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
>
> Name: sss_simpleifp
> Description: A library that simplifies work with the InfoPipe responder
> Version: 1.11.92
> Requires: dbus-1
> Requires: dhash
> Libs: -L${exec_prefix}/lib -lsss_simpleifp
> Cflags: -I${includedir}
> URL: http://fedorahosted.org/sssd/
>
>
> sh-4.2$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ pkg-config --libs sss_simpleifp
> Variable 'exec_prefix' not defined in '/usr/local/lib/pkgconfig/sss_simpleifp.pc'
>
> You should add both variables prefix and exec_prefix
> prefix=@prefix@
> exec_prefix=@exec_prefix@
>
> LS

Hi, thanks. Patches are attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sss_sifp-pkg-config-requires-is-a-comma-separated-li.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140708/6acd6e92/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-sss_sifp-add-prefix-and-exec_prefix-to-pkg-config.patch
Type: text/x-patch
Size: 693 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140708/6acd6e92/attachment-0001.bin>


More information about the sssd-devel mailing list