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

Lukas Slebodnik lslebodn at redhat.com
Mon Jul 7 12:01:33 UTC 2014


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.

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'

LS
-------------- next part --------------
#include <stdio.h>
#include <sss_sifp.h>

int main(void)
{
    sss_sifp_error ret;
    sss_sifp_ctx *ctx;
    sss_sifp_object *domain;

    ret = sss_sifp_init(&ctx);
    if (ret != SSS_SIFP_OK) {
        printf("sss_sifp_init failed [%d]\n", ret);
        return 1;
    }

    ret = sss_sifp_fetch_domain_by_name(ctx, "default",
                                        &domain);
    if (ret != SSS_SIFP_OK) {
        printf("sss_sifp_fetch_domain_by_name failed [%d]\n", ret);
        printf("io_error_name: %s\nio_error_message: %s\n",
                sss_sifp_get_last_io_error_name(ctx),
                sss_sifp_get_last_io_error_message(ctx));
        return 1;
    }

    printf("name: '%s'\n", domain->name);
    printf("object_path: '%s'\n", domain->object_path);
    printf("interface: '%s'\n", domain->interface);

    return 0;
}


More information about the sssd-devel mailing list