[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5184) pkg-config file for libraries



Björn JACKE wrote:
> On 2014-06-17 at 07:04 -0700 Howard Chu sent off:
>> bj@sernet.de wrote:
>>> for Samba we really have some pain to get the right compile and linker flags
>>> for different architectures, especially there, where OpenLDAP is not a
>>> first-class citizen like on AIX.
>>>
>>> mozldap offers pkg-config files which we will start to use in Samba soon. It
>>> would be great if OpenLDAP would offer a pkg-config file also to not have to
>>> make wild guesses which linker/compile flags and which paths to use.
>>
>> I don't see the problem. There are no special compiler or linker
>> flags for applications to use libldap.
>
> if you build on a system where you don't know what LDAP library you have you
> exactly have to test for the existing header files, you have to test for the
> libs that you find in the library search paths (and maybe also in
> library paths that are not in the search path), you have to look for
> existing symbols to know which exact flavor of the lib you have, you
> have to use the right include paths. All those things that you have to
> look up, have to fit together also. If you are LUCKY they will fit together on
> an AIX or on a Solaris box. If not, you use the right header files but the
> wrong linker flags, there are many things to screw up. It is a huge bunch of
> work to get all this information pieces together and puzzle them right for your
> build system. In Samba we had have a hard time to do that in the past and with
> the new waf base build system we have to fix a lot that was working before. The
> LDAP libaries (also OpenLDAP on Unix systems...) have always been a major pain
> for the build system and a pkg-config file, which we can just use to get the
> right compiler and linker flags would be a great help for that and it
> would make the build agains openldap much more predictable and stable.
>
If you're depending on some unknown OpenLDAP install to provide all of the 
features that your Samba package needs, you need more than luck. You need to 
know that it was built against a compatible Kerberos library, a sane Cyrus 
SASL version, and a working crypto library. The only way to know that is to 
build it yourself against valid packages, in which case, you don't need to go 
grubbing through the system looking for them.

If you're depending on some OpenLDAP that was packaged by someone else, then 
you should be asking them to provide a pkg-config file for their package. 
Installation issues are strictly not our concern, we distribute source code. 
That should have already been clear from 
http://www.openldap.org/its/index.cgi/Archive.Build?id=5184 Followup 1.

Even if we provided a .pc file, you still have to guess where *that* got 
installed - was it in /usr, or in /usr/local, or somewhere else? I've 
certainly never seen pkg-config as a standard component of AIX or Solaris.

Is pkg-config even supported on AIX?

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/