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

Re: Assistance in compiling OpenLDAP 1.2.6



On 31/08/99 at 10:59:30 -0700, Kurt D. Zeilenga spoke thus :
> At 04:33 PM 8/31/99 +1000, Andrew Kemp wrote:
> >Greetings,
> >
> >We currently use OpenLDAP 1.2.3 and today I tried to upgrade to OpenLDAP
> >1.2.6
> >
> >I have installed SleepyCat's DB 2.7.5 under /usr/local/BerkeleyDB/..
> >
> >I use the following command line to try and build 1.2.6 :
> >
> >env CC=cc CFLAGS=-pthread \
> >CPPFLAGS="-I/usr/local/BerkeleyDB/include -I/usr/local/include" \
> >LDFLAGS="-L/usr/local/BerkeleyDB/lib -L/usr/local/lib" \
> >PATH="/usr/local/bin:$PATH" \
> >./configure --enable-dns --enable-wrappers \
> >--enable-wrappers --enable-ldbm --with-ldbm-api=db2
> >
> >
> >When using the above (and various combinations) I get the following
> >error:
> >
> >checking for DB2 library... checking for db_open in -ldb... no
> >no
> >checking for db.h... yes
> >checking if db.h is DB2... yes
> >checking for Berkeley DB2... no
> >configure: warning: could not find suitable LDBM backend
> >configure: error: select appropriate LDBM options or disable
> >
> >
> >Obviously configure is still finding the old DB library shipped with the
> >system (Digital Unix 4.0D).

Kurt,

> It appears to not to find -ldb in the specified library search path.
> You should verify that BerkeleyDB libraries were in fact installed
> under /usr/local/BerkeleyDB/lib.  Configure does find db.h and
> believes it to be DB2.

Yes, the BerkeleyDB libraries were correctly installed :

Script started on Wed Sep  1 10:47:01 1999
[root@lucille]$	
[root@lucille]$	ls -la /usr/local/BerkeleyDB/include
total 84
drwxr-xr-x   2 root     system      8192 Sep  1 09:57 .
drwxr-xr-x   6 root     system      8192 Apr 23 15:43 ..
-r--r--r--   1 root     opr        37947 Sep  1 09:54 db.h
-r--r--r--   1 root     opr         5972 Sep  1 09:54 db_185.h
-r--r--r--   1 bin      opr        24338 Jan 20  1999 db_cxx.h
[root@lucille]$	
[root@lucille]$	ls -la /usr/local/BerkeleyDB/lib/
total 1056
drwxr-xr-x   2 root     system      8192 Sep  1 09:57 .
drwxr-xr-x   6 root     system      8192 Apr 23 15:43 ..
-r--r--r--   1 root     opr      1064432 Sep  1 09:56 libdb.a
[root@lucille]$	
[root@lucille]$	exit

script done on Wed Sep  1 10:47:19 1999

Actually, configure appears to find the DB 1.85 library shipped
with Digital Unix instead of the BerkeleyDB one.

> >How do I force it to find and use the new 2.7.5 library ?
> 
> The command like looks appropriate for forcing use of DB2.
> That is, you have the -I and -L flags prepended
> to the appropriate environment variables and have selected
> the right configure options to require DB2.

> The question really is why didn't configure find -ldb in
> the search path.  Check config.log.  It should provide an
> indicatation as to the exact reason why the configure test
> failed to find -ldb.

Here is the config.log - it appears to completely ignore the -L
option and try and load the DB1.85 library shipped with the OS.

Suggestions ?


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:627: checking for a BSD compatible install
configure:684: checking whether build environment is sane
configure:745: checking for mawk
configure:745: checking for gawk
configure:775: checking whether make sets ${MAKE}
configure:815: checking for working aclocal
configure:828: checking for working autoconf
configure:841: checking for working automake
configure:854: checking for working autoheader
configure:867: checking for working makeinfo
configure:887: checking for gnutar
configure:887: checking for gtar
configure:887: checking for tar
configure:928: checking configure arguments
configure:1651: checking host system type
configure:1726: checking for a BSD compatible install
configure:1807: checking build system type
configure:1848: checking for ranlib
configure:1878: checking for gcc
configure:1991: checking whether the C compiler (cc -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include ) works
configure:2007: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  1>&5
configure:2033: checking whether the C compiler (cc -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include ) is a cross-compiler
configure:2038: checking whether we are using GNU C
configure:2047: cc -E conftest.c
configure:2066: checking whether cc accepts -g
configure:2136: checking for non-GNU ld
configure:2172: checking if the linker (/usr/bin/ld) is GNU ld
configure:2188: checking for BSD-compatible nm
configure:2225: checking whether ln -s works
ltconfig:581: checking whether we are using GNU C
ltconfig:589: cc -E conftest.c
ltconfig:603: checking for object suffix
ltconfig:604: cc -c -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c 1>&5
ltconfig:629: checking for executable suffix
ltconfig:630: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  1>&5
ltconfig:829: checking if cc supports -c -o file.o
ltconfig:830: cc -c -pthread -o out/conftest2.o -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c 1>&5
ltconfig:862: checking if cc supports -c -o file.lo
ltconfig:863: cc -c -pthread -c -o conftest.lo -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c 1>&5
ltconfig:958: checking if cc static flag -non_shared works
ltconfig:959: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  -non_shared conftest.c  1>&5
ld:
Can't locate file for: -lpthread
ltconfig:1592: checking if global_symbol_pipe works
ltconfig:1593: cc -c -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c 1>&5
ltconfig:1596: eval "/usr/local/bin/nm -B conftest.o | sed -n -e 's/^.*[ 	]\([ABCDGISTW]\)[ 	][ 	]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' > conftest.nm"
ltconfig:1648: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c conftstm.o 1>&5
configure:2408: checking for sendmail
configure:2444: checking for vi
configure:2480: checking for finger
configure:2528: checking how to run the C preprocessor
configure:2549: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
configure:2609: checking for AIX
configure:2633: checking for POSIXized ISC
configure:2655: checking for minix/config.h
configure:2665: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
cc: Error: configure, line 2661: Cannot find file <minix/config.h> specified in #include directive.
#include <minix/config.h>
-^
configure: failed program was:
#line 2660 "configure"
#include "confdefs.h"
#include <minix/config.h>
configure:2704: checking for be_app in -lbe
configure:2723: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c -lbe -lroot -lnet  1>&5
ld:
Can't locate file for: -lbe
configure: failed program was:
#line 2712 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char be_app();

int main() {
be_app()
; return 0; }
configure:2749: checking for cc option to accept ANSI C
configure:2803: cc  -c -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c 1>&5
configure:2834: checking for socket
configure:2863: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  1>&5
configure:3150: checking for res_search
configure:3179: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  1>&5
configure:3314: checking for sigset in -lV3
configure:3333: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c -lV3   1>&5
ld:
Can't locate file for: -lV3
configure: failed program was:
#line 3322 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char sigset();

int main() {
sigset()
; return 0; }
configure:3588: checking for kerberosIV/krb.h
configure:3598: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
cc: Error: configure, line 3594: Cannot find file <kerberosIV/krb.h> specified in #include directive.
#include <kerberosIV/krb.h>
-^
configure: failed program was:
#line 3593 "configure"
#include "confdefs.h"
#include <kerberosIV/krb.h>
configure:3588: checking for kerberosIV/des.h
configure:3598: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
cc: Error: configure, line 3594: Cannot find file <kerberosIV/des.h> specified in #include directive.
#include <kerberosIV/des.h>
-^
configure: failed program was:
#line 3593 "configure"
#include "confdefs.h"
#include <kerberosIV/des.h>
configure:3727: checking for krb.h
configure:3737: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
cc: Error: configure, line 3733: Cannot find file <krb.h> specified in #include directive.
#include <krb.h>
-^
configure: failed program was:
#line 3732 "configure"
#include "confdefs.h"
#include <krb.h>
configure:3727: checking for des.h
configure:3737: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
cc: Error: configure, line 3733: Cannot find file <des.h> specified in #include directive.
#include <des.h>
-^
configure: failed program was:
#line 3732 "configure"
#include "confdefs.h"
#include <des.h>
configure:3827: checking for pthread.h
configure:3837: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
configure:3827: checking for sched.h
configure:3837: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
configure:3866: checking POSIX thread version
configure:3947: checking for LinuxThreads
configure:3973: checking for pthread_create
configure:4002: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  1>&5
ld:
Unresolved:
pthread_create
configure: failed program was:
#line 3978 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pthread_create(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_pthread_create) || defined (__stub___pthread_create)
choke me
#else
f = pthread_create;
#endif

; return 0; }
configure:4024: checking for pthread_create with -kthread
configure:4039: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c -kthread  1>&5
configure:4825: checking for sched_yield
configure:4854: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure:4825: checking for pthread_yield
configure:4854: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
ld:
Unresolved:
pthread_yield
configure: failed program was:
#line 4830 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pthread_yield(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_yield();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_pthread_yield) || defined (__stub___pthread_yield)
choke me
#else
f = pthread_yield;
#endif

; return 0; }
configure:4996: checking for pthread_kill
configure:5025: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure:5051: checking for pthread_detach with <pthread.h>
configure:5064: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure:5096: checking for pthread_setconcurrency
configure:5125: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure:5096: checking for pthread_getconcurrency
configure:5125: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure:5096: checking for thr_setconcurrency
configure:5125: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
ld:
Unresolved:
thr_setconcurrency
configure: failed program was:
#line 5101 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char thr_setconcurrency(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char thr_setconcurrency();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_thr_setconcurrency) || defined (__stub___thr_setconcurrency)
choke me
#else
f = thr_setconcurrency;
#endif

; return 0; }
configure:5096: checking for thr_getconcurrency
configure:5125: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
ld:
Unresolved:
thr_getconcurrency
configure: failed program was:
#line 5101 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char thr_getconcurrency(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char thr_getconcurrency();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_thr_getconcurrency) || defined (__stub___thr_getconcurrency)
choke me
#else
f = thr_getconcurrency;
#endif

; return 0; }
configure:5151: checking if pthread_create() works
configure:5183: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure:5205: checking if select yields when using pthreads
configure:5287: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  -kthread  1>&5
configure: failed program was:
#line 5215 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <pthread.h>
#ifndef NULL
#define NULL (void*) 0
#endif

static int fildes[2];

static void *task(p)
	void *p;
{
	int i;
	struct timeval tv;

	fd_set rfds;

	tv.tv_sec=10;
	tv.tv_usec=0;

	FD_ZERO(&rfds);
	FD_SET(fildes[0], &rfds);

	/* we're not interested in any fds */
	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);

	if(i < 0) {
		perror("select");
		exit(10);
	}

	exit(0); /* if we exit here, the select blocked the whole process */
}

int main(argc, argv)
	int argc;
	char **argv;
{
	pthread_t t;

	/* create a pipe to select */
	if(pipe(&fildes[0])) {
		perror("select");
		exit(1);
	}

#ifdef HAVE_PTHREAD_SETCONCURRENCY
	(void) pthread_setconcurrency(2);
#else
#ifdef HAVE_THR_SETCONCURRENCY
	/* Set Solaris LWP concurrency to 2 */
	thr_setconcurrency(2);
#endif
#endif

	pthread_create(&t, NULL, task, NULL);

#if HAVE_SCHED_YIELD
	sched_yield();	/* make sure task runs first */
#else
#ifdef HAVE_PTHREAD_YIELD
	pthread_yield();	/* make sure task runs first */
#endif
#endif

	exit(2);
}
configure:6011: checking for thread specific errno
configure:6024: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c  1>&5
configure:6066: checking for DB2 library
configure:6072: checking for db_open in -ldb
configure:6091: cc -o conftest -pthread -I/usr/local/BerkeleyDB/include -I/usr/local/include  conftest.c -ldb   1>&5
ld:
Unresolved:
db_open
configure: failed program was:
#line 6080 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char db_open();

int main() {
db_open()
; return 0; }
configure:6122: checking for db.h
configure:6132: cc -E -I/usr/local/BerkeleyDB/include -I/usr/local/include conftest.c >/dev/null 2>conftest.out
configure:6160: checking if db.h is DB2
configure:6198: checking for Berkeley DB2


Regards,

Andrew

-- 
Unix,WWW,Proxy,News,DNS,LDAP,... Administrator	Phone	: 61 +3 9214-8252
Information Technology Services			Fax	: 61 +3 9214-8944
Swinburne University of Technology		E-Mail: andrew@swin.EDU.AU
Hawthorn, Victoria, Australia 3122 	URL: http://opax.swin.edu.au/andrew