Problems with openchange libs

Thiago Macieira thiago at kde.org
Tue Dec 2 11:49:04 CET 2008


On Tuesday 02 December 2008 11:18:02 Brad Hards wrote:
> bradh at kubuntu10:~$ pkg-config --cflags-only-I libmapi
> -I/usr/local/samba/include
> bradh at kubuntu10:~$ pkg-config --cflags-only-other libmapi
> -g -O2 -DHAVE_IMMEDIATE_STRUCTURES=1
> bradh at kubuntu10:~$ pkg-config --libs-only-L libmapi
> -L/usr/local/samba/lib
> bradh at kubuntu10:~$ pkg-config --libs-only-l libmapi
> -lz -lmapi -ldcerpc -lldb -lndr -lsamba-hostconfig -ltalloc
> bradh at kubuntu10:~$ pkg-config --libs-only-other libmapi

That pkgconfig file looks just plain broken to me. That's an upstream issue.

The -g and -O2 flags should never have appeared there. Those are build flags, 
nothing changing the ABI/API or the use of the library.

The -l flags that appear there are also useless if you're building 
dynamically. Finding the libmapi.so file should be enough and that's the CMake 
preferred way.

When linking statically, those libs should be used. That means they should be 
listed in "libs.private" in the .pc file, not in "libs".

So maybe we should use find_library directly and bypass pkgconfig?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Software Engineer - Nokia, Qt Software
  Qt Software is hiring - ask me
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20081202/14782568/attachment.sig 


More information about the Kde-buildsystem mailing list