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

RE: ldbm backend does not build if static libraries disabled (ITS#3071)



> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of B.Candler@pobox.com

> On Thu, Apr 08, 2004 at 12:25:24PM -0700, Howard Chu wrote:
> > This is a libtool limitation. "Don't do this."
>
> Hmm, so I'm not sure what conclusion to draw:
>
> (1) Is --disable-static not supported? Then perhaps it should
> be removed entirely.
>
> (2) Is the combination of --disable-static and --enable-slapd
> causing the
>     problem? Or --disable-static and --enable-ldbm? In which
> case either
>     it could be documented, or the configure script could
> check for this
>     combination and throw up an error if you try to do it.

Neither.

The same libtool script is used to compile the libraries and all the slapd
backends. If you configure with --disable-static then none of the backends
can be compiled as static objects. You can of course build them as dynamic
modules instead.

We used to have a hack in the libtool that we bundled, to allow static/shared
mode to be selected on a per-target basis, but that was removed some time ago
when our patch to support this feature was rejected by the libtool project.
You may be able to use a newer (1.5.x) version of libtool to get around this
issue, but you'll have to build that separately and edit the OpenLDAP
Makefiles to get it to be used.

We have not bundled libtool 1.5.x ourselves because it depends on the current
autoconf etc. and upgrading the entire build suite is a major undertaking.

> >   -- Howard Chu
> >   Chief Architect, Symas Corp.       Director, Highland Sun
> >   http://www.symas.com               http://highlandsun.com/hyc
> >   Symas: Premier OpenSource Development and Support
> >
> > > -----Original Message-----
> > > From: owner-openldap-bugs@OpenLDAP.org
> > > [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> B.Candler@pobox.com
> >
> > > Full_Name: Brian Candler
> > > Version: 2.2.8
> > > OS: FreeBSD-5.2.1-RELEASE
> > > URL: ftp://ftp.openldap.org/incoming/
> > > Submission from: (NULL) (80.44.132.138)
> > >
> > >
> > > If you build OpenLDAP with only shared libraries
> > > (--disable-static), and try to
> > > build the ldbm backend with gdbm, it fails.
> > >
> > > LDFLAGS="-L/path/to/lib" CPPFLAGS="-I/path/to/include"
> ./configure \
> > >   --enable-shared --disable-static --disable-bdb --enable-ldbm
> > > --with-ldbm-api=gdbm \
> > >   && make depend && make
> > >
> > > (where /path/to/lib and /path/to/include are where gdbm
> > > libraries/headers are
> > > installed)
> > >
> > > Results in:
> > >
> > > ...
> > > /bin/sh /v/build/openldap-2.2.8/libtool  --mode=compile  cc -g -O2
> > > -I../../../include -I../../../include -I.. -I./..
> > > -I/path/to/include   -c
> > > ldbm.c
> > > cc -g -O2 -I../../../include -I../../../include -I.. -I./..
> > > -I/path/to/include
> > > -c ldbm.c  -fPIC -DPIC -o ldbm.lo
> > > /bin/sh /v/build/openldap-2.2.8/libtool  --mode=compile  cc -g -O2
> > > -I../../../include -I../../../include -I.. -I./..
> > > -I/path/to/include   -c
> > > version.c
> > > cc -g -O2 -I../../../include -I../../../include -I.. -I./..
> > > -I/path/to/include
> > > -c version.c  -fPIC -DPIC -o version.lo
> > > ar ruv libback_ldbm.a `echo idl.lo add.lo search.lo cache.lo
> > > dbcache.lo dn2id.lo
> > > entry.lo  id2entry.lo index.lo id2children.lo nextid.lo
> > > compare.lo modify.lo
> > > modrdn.lo delete.lo init.lo  config.lo bind.lo attr.lo
> > > filterindex.lo close.lo
> > > alias.lo tools.lo key.lo extended.lo  referral.lo
> > > operational.lo ldbm.lo | sed
> > > 's/\.lo/.o/g'` version.o
> > > ar: idl.o: No such file or directory
> > > *** Error code 1
> > >
> > > Stop in /v/build/openldap-2.2.8/servers/slapd/back-ldbm.
> > > *** Error code 1
> > >
> > > Stop in /v/build/openldap-2.2.8/servers/slapd.
> > > *** Error code 1
> > >
> > > Stop in /v/build/openldap-2.2.8/servers.
> > > *** Error code 1
> > >
> > > Stop in /v/build/openldap-2.2.8.
> > >
> >
>