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

Re: (ITS#6517) undefined references to ldif_*

masarati@aero.polimi.it wrote:
>> masarati@aero.polimi.it wrote:
>>> Actually it's not that; Michael routinely builds with --enable-dynamic,
>>> and libldap now (dynamically) depends on liblutil for the LDIF part.
>> I did not want to introduce any new dependencies nor break any existing
>> code with the new LDIF library.  Ideally, you would only have to link
>> with -lldif for external code that wants to use the LDIF API (such as
>> ldif_get_entry or ldif_parse_line).  Any existing code, or code that
>> just wants to use the new higher level api ldap_parse_ldif_record_x
>> would only have to link with -lldap.
>> Is --enable-dynamic the only additional build flag I need to use?
> In fact, you did not introduce any further dependence, as ldif_* functions
> (those provided in liblutil/ldif.c) are present in liblutil.  I fixed the
> issue by reversing the link order of libraries.
> It used to be liblutil, liblber, libldap (I think that was because earlier
> there used to be dependencies of liblutil on the others, please correct
> me). Now it's libldap, liblber, liblutil, and it builds fine with
> --enable-dynamic=yes/no.  Please check whether my fix is appropriate.

It seems to work for me now.

Ciao, Michael.