Bug 460174 - FedoraDS install failt to look for / find db.h VERSION info in non-RHEL/Fedora OS' standard location
FedoraDS install failt to look for / find db.h VERSION info in non-RHEL/Fedor...
Status: CLOSED DUPLICATE of bug 519459
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
1.1.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Chandrasekar Kannan
:
Depends On:
Blocks: 389_1.2.6
  Show dependency treegraph
 
Reported: 2008-08-26 12:16 EDT by bwailea+11
Modified: 2015-01-04 18:33 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-01-22 14:33:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description bwailea+11 2008-08-26 12:16:03 EDT
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.
Comment 1 Rich Megginson 2008-08-26 12:23:45 EDT
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.
Comment 2 bwailea+11 2008-08-26 14:53:49 EDT
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
Comment 3 Rich Megginson 2010-01-22 14:33:28 EST

*** This bug has been marked as a duplicate of bug 519459 ***

Note You need to log in before you can comment on or make changes to this bug.