Issue 602 - Linking of slapd/tools
Summary: Linking of slapd/tools
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-06-21 09:46 UTC by christian.lorenz@suse.de
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description christian.lorenz@suse.de 2000-06-21 09:46:19 UTC
Full_Name: Christian Lorenz
Version: 2.0-devel
OS: linux-2.2.14
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.243.113.230)


I suggest to only link those slapd/tools with the MODULE_LIBS which also
link against the libbackend.a.
I had problems with a backend that uses librecode: I confiured -lrecode
into the MODULE_LIBS. The slapd itself builds fine, but ldif failed, because
the global variable 'program_name' (which librecode depends on) was only
defined in my backend!

Here's the patch:
------------------------------------------------------------------------
--- ldap/servers/slapd/tools/Makefile.in.orig   Tue Jun 13 15:05:48 2000
+++ ldap/servers/slapd/tools/Makefile.in        Wed Jun 21 11:32:16 2000
@@ -30,7 +30,7 @@
 XXLIBS = $(QUIPU_LIBS) $(SLAPD_LIBS) \
        $(LDBM_LIBS) $(SECURITY_LIBS) \
        $(LDIF_LIBS) $(LUTIL_LIBS)
-XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
+XXXLIBS = $(LTHREAD_LIBS)
 
 PROGRAMS=ldif slappasswd slapadd slapcat slapindex
 LDBMPROGRAMS=centipede sizecount
@@ -84,13 +84,13 @@
 # SLAP Tools
 #
 slapadd:       slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
$(MODULES_LIBS)
 
 slapcat:       slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
$(MODULES_LIBS)
 
 slapindex:     slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
$(MODULES_LIBS)
 
 ldif:          ldif.o $(SLAPD_LIBDEPEND) 
        $(LTLINK) -o $@ ldif.o $(LIBS)
----------------------------------------------------------------------------

Have fun!
Comment 1 Kurt Zeilenga 2000-06-25 12:00:45 UTC
moved from Incoming to Development
Comment 2 Kurt Zeilenga 2000-06-25 19:18:51 UTC
At 09:46 AM 6/21/00 GMT, Christian.Lorenz@suse.de wrote:
>Full_Name: Christian Lorenz
>Version: 2.0-devel
>OS: linux-2.2.14
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (195.243.113.230)
>
>
>I suggest to only link those slapd/tools with the MODULE_LIBS which also
>link against the libbackend.a.
>I had problems with a backend that uses librecode: I confiured -lrecode
>into the MODULE_LIBS. The slapd itself builds fine, but ldif failed, because
>the global variable 'program_name' (which librecode depends on) was only
>defined in my backend!

If you disregard ldif, I believe MODULE_LIBS belongs on XXLIBS, not
XXXLIBS.  It certainly needs to come before LTHREAD_LIBS.

The obvious thing to do is move ldif to clients/tools.
But, then again, do we really need ldif(8) anymore?
ldapmodify(1) handles the -b case directly... and the
per line to base64 is infrequently used (I've never used
it).

I think we should:
	1) move ldif(1) to the Attic
	2) move MODULES_LIB
		a) to XXLIBS
		b) before LTHREAD_LIBS

Comments?
	Kurt


>Here's the patch:
>------------------------------------------------------------------------
>--- ldap/servers/slapd/tools/Makefile.in.orig   Tue Jun 13 15:05:48 2000
>+++ ldap/servers/slapd/tools/Makefile.in        Wed Jun 21 11:32:16 2000
>@@ -30,7 +30,7 @@
> XXLIBS = $(QUIPU_LIBS) $(SLAPD_LIBS) \
>        $(LDBM_LIBS) $(SECURITY_LIBS) \
>        $(LDIF_LIBS) $(LUTIL_LIBS)
>-XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
>+XXXLIBS = $(LTHREAD_LIBS)
> 
> PROGRAMS=ldif slappasswd slapadd slapcat slapindex
> LDBMPROGRAMS=centipede sizecount
>@@ -84,13 +84,13 @@
> # SLAP Tools
> #
> slapadd:       slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
>-       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
>+       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
>$(MODULES_LIBS)
> 
> slapcat:       slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
>-       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
>+       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
>$(MODULES_LIBS)
> 
> slapindex:     slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
>-       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
>+       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
>$(MODULES_LIBS)
> 
> ldif:          ldif.o $(SLAPD_LIBDEPEND) 
>        $(LTLINK) -o $@ ldif.o $(LIBS)
>----------------------------------------------------------------------------
>
>Have fun!
>
>
>
Comment 3 Kurt Zeilenga 2000-09-02 15:05:29 UTC
moved from Development to Build
Comment 4 Kurt Zeilenga 2001-01-16 12:10:38 UTC
changed notes
changed state Open to Closed
Comment 5 OpenLDAP project 2014-08-01 21:05:08 UTC
resolved