Bug 38744 - net/openldap20 doesn't work if db3 and db4 are installed
Summary: net/openldap20 doesn't work if db3 and db4 are installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-30 20:30 UTC by Faried Nawaz
Modified: 2003-04-07 00:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Faried Nawaz 2002-05-30 20:30:00 UTC
	Compile it.  Try to run it.  It won't.
	ktracing /usr/local/libexec/slapd -d 0 and confirming with
	ldd shows that it compiles with db3's headers (as specified
	by the port makefile) but links with /usr/local/lib/libdb4
	(if present...as it is on my system).

	openldap2's configure script specifically checks for db4 and uses it.

Fix: 

One possible fix (to the port makefile):

.if exists(/usr/local/lib/libdb4.a)
DB_CFLAGS=      -I${LOCALBASE}/include/db4
.else
DB_CFLAGS=      -I${LOCALBASE}/include/db3
.endif
[...]
CPPFLAGS+=      -D_REENTRANT ${PTHREAD_CFLAGS} \
                -I${LOCALBASE}/include \
                ${DB_CFLAGS}

I don't know if openldap2 works fine with db4.  It certainly appears to...
How-To-Repeat: 	Compile it.  Try to run it.  It won't.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-07 00:51:13 UTC
State Changed
From-To: open->closed

Commited, thanks!