Bug 460174
| Summary: | FedoraDS install failt to look for / find db.h VERSION info in non-RHEL/Fedora OS' standard location | ||
|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | bwailea+11 |
| Component: | Directory Server | Assignee: | Rich Megginson <rmeggins> |
| Status: | CLOSED DUPLICATE | QA Contact: | Chandrasekar Kannan <ckannan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 1.1.1 | CC: | benl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-01-22 19:33:28 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 543590 | ||
Is there some way, on suse, to determine what db directory to use e.g. pkg-config --cflags db4 or db-config or something like that? It would be nice to have some standard mechanism to determine where to look for the db include dir and libname/libdir. other than the aforementioned,
cat /usr/include/db.h
#include <db4/db.h>
indicating use of
/usr/include/db4/db.h
unfortunately, not that i'm aware of.
also note that if, e.g., the default db version's (4.5) libdb45-devel is installed, AND libdb43-devel is installed as well, then, in
cd /usr/include
ls db*
db_185.h db.h
db4: <-- v45 is in here
db_185.h db.h
db43:
db_185.h db_cxx.h db.h
*** This bug has been marked as a duplicate of bug 519459 *** |
FedoraDS ldapserver install, per ldapserver/m4/db.m4, looks for db.h version info, dnl figure out which version of db we're using from the header file db_ver_maj=`grep DB_VERSION_MAJOR $db_incdir/db.h | awk '{print $3}'` db_ver_min=`grep DB_VERSION_MINOR $db_incdir/db.h | awk '{print $3}'` db_ver_pat=`grep DB_VERSION_PATCH $db_incdir/db.h | awk '{print $3}'` first in, /usr/include/db.h with a simple "file exists?" check. problem on opensuse11 is, rpm -qa | grep -i libdb libdb-4_5-4.5.20-67.1 libdb-4_5-32bit-4.5.20-67.1 libdb-4_5-devel-4.5.20-67.1 ls -1d /usr/include/db* /usr/include/db_185.h /usr/include/db4/ /usr/include/db.h ls -al /usr/include/db4/ -r--r--r-- 1 root root 6025 2008-06-06 13:35 db_185.h -r--r--r-- 1 root root 101993 2008-06-06 13:35 db.h cat /usr/include/db.h #include <db4/db.h> the req'd info is not there, causing a config fail. instead it's in the referenced <db4/db.h>, which is *not* searched at all. i.e., head -10 /usr/include/db4/db.h /* * See the file LICENSE for redistribution information. * * Copyright (c) 1996-2006 * Oracle Corporation. All rights reserved. * * $Id: db.in,v 12.108 2006/09/13 14:53:37 mjc Exp $ * * db.h include file layout: * General. grep DB_VERSION_MAJOR /usr/include/db4/db.h | awk '{print $3}' 4 etc. a quick & dirty hack, vi db.m4.patch --- db.m4.ORIG 2008-08-25 11:55:16.000000000 -0700 +++ db.m4 2008-08-25 12:08:46.000000000 -0700 @@ -55,19 +55,19 @@ dnl default path for the db tools (see [210947] for more details) dnl - check in system locations -if test -z "$db_inc"; then +dnl if test -z "$db_inc"; then AC_MSG_CHECKING(for db.h) - if test -f "/usr/include/db.h"; then - AC_MSG_RESULT([using /usr/include/db.h]) - db_incdir="/usr/include" - db_inc="-I/usr/include" + if test -f "/usr/include/db4/db.h"; then + AC_MSG_RESULT([using /usr/include/db4/db.h]) + db_incdir="/usr/include/db4" + db_inc="-I/usr/include/db4" db_lib='-L$(libdir)' db_libdir='$(libdir)' else AC_MSG_RESULT(no) AC_MSG_ERROR([db not found, specify with --with-db.]) fi -fi +dnl fi dnl figure out which version of db we're using from the header file db_ver_maj=`grep DB_VERSION_MAJOR $db_incdir/db.h | awk '{print $3}'` db_ver_min=`grep DB_VERSION_MINOR $db_incdir/db.h | awk '{print $3}'` cd ldapserver/m4 patch -p0 < db.m4.patch circumvents -- rahter than fixes -- the problem.