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

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



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.