RPM Community Forums

Mailing List Message of <rpm-devel>

Re: How do I get the rpm build to see the external db and dbsql files ?

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 09 Jun 2011 - 21:07:51 CEST
Message-id: <771A93CC-D027-450E-A446-8900776BD741@mac.com>

On Jun 9, 2011, at 2:59 PM, Sriram Narayanan wrote:

> I have bdb 5.1.19 installed at /workspace/altopt/ (with sub folders
> being include, bin, lib, etc).

Note that there is a ABI breakage between db-5.1.19 -> db-5.1.25. You
might want to start using db-5.1.25 to avoid later pain.
ABI breakage == you MUST recompile everything linked against
db-5.1.19 in order to move to db-5.1.25 or you WILL segfault.

> /workspace/altopt/include contains db.h and dbsql.h
> Here's a snippet of what I use to autogen and configure the rpm build process:
> /bin/sh ./autogen.sh
> ./configure CPPFLAGS="-I/workspace/altopt/include -I/usr/include"
> LDFLAGS="-L/workspace/altopt/lib -L/usr/gnu/lib -L/lib" \
>  --prefix=/workspace/altopt \
>  --enable-shared \
>  --with-db=external \
>  --with-dbsql=external \
>  --without-db-tools-integrated \
>  --with-zlib \
>  --with-bzip2 \
>  --with-xz \
> And yet I see that ./configure looks for a subfolder db51 and tries to
> use that. This is resulting in the build not finding the DB_SEQUENCE
> data structure, resulting in a build failure.
> What else should I set such that the external DB is picked up ?

Yes. There are two places (iirc) that
	#include <db51/db.h>
are hard wired.

Create a symlink on some include path to where ever you built Berkeley DB
is one easy way to avoid.

The other is to patch rpm (grep "db51" */*.[ch])
to do something else instead.

Yet another is to untar db-5.1.X into the top level directory, do
	mv db-5.1.x db
and build --with-db=internal (there's also --with-dbsql=internal needed).


73 de Jeff

The hard wired path isn't likely to be changed because its hugely
complicated to test all possible ways of installing Berkeley DB.

If anything,
> -- Sriram
> ==================
> Belenix: www.belenix.org
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org

  • application/pkcs7-signature attachment: smime.p7s
Received on Thu Jun 9 21:08:30 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.