Red Hat Bugzilla – Bug 11349
Building rpm-3.0.4 with Berkeley db-3.0.55 from sleepycat.com
Last modified: 2008-05-01 11:37:55 EDT
I foolishly thought that I could compile Berkeley db-3.0.55 from
sleepycat.com with db-185 compatibility under Solaris 2.7 for use with
rpm-3.0.4. In order to do this, I had to patch configure.in to look for a
new function name and patch lib/dbindex.h to define a macro to enable the
db-185 feature for db-3.0.55.
With the following patch, rpm-3.0.4 builds and links against db-3.0.55
using gcc-2.95.2. Unforutnately, a bug in db-3.0.55 (which I did not care
to track down) prevented me from using it, so I switched back to db-2.7.7.
I hope this patch will be useful.
diff -u rpm-3.0.4/configure.in.orig rpm-3.0.4/configure.in
--- rpm-3.0.4/configure.in.orig Wed Mar 15 06:29:09 2000
+++ rpm-3.0.4/configure.in Thu Apr 13 11:40:55 2000
@@ -311,7 +311,8 @@
AC_CHECK_LIB(db1, dbopen, [LIBS="$LIBS -ldb1"],
AC_CHECK_LIB(db, dbopen, [LIBS="$LIBS -ldb"],
- AC_MSG_ERROR([sorry rpm requires a db-1.85 API])))
+ AC_CHECK_LIB(db, __db185_open, [LIBS="$LIBS -ldb"],
+ AC_MSG_ERROR([sorry rpm requires a db-1.85 API]))))
AC_CHECK_FUNC(fork, , [echo "using vfork() instead of fork()";
diff -u rpm-3.0.4/lib/dbindex.h.orig rpm-3.0.4/lib/dbindex.h
--- rpm-3.0.4/lib/dbindex.h.orig Wed Oct 20 16:40:10 1999
+++ rpm-3.0.4/lib/dbindex.h Thu Apr 13 15:25:26 2000
@@ -5,6 +5,7 @@
There's an alignment patch from sleepycat that you will need as well.
That patch is also in the db3-3.0.55-xx package, available from Raw Hide,
but you will almost certainly have to dink with paths etc, as we (Red Hat)
are currently betwixt and between db2 and db3 (and glibc-2.1.x glibc-2.2,
There's also a portability problem with solaris bsearch that you will need to
apply to rpm-3.0.4 sources. The patch is in lib/depends.c
alFileSatisfiesDepend(struct availableList * al,
const char * keyType, const char * fileName)
const char * dirName;
const char * baseName;
struct dirInfo dirNeedle;
struct dirInfo * dirMatch;
if (al->numDirs == 0) /* Solaris 2.6 bsearch sucks down on this. */
Hope this helps. Send mail to <firstname.lastname@example.org> if you have questions.