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:41:18 CEST
Message-id: <88C415BB-67B5-454C-BC31-4FAA7318A5D3@mac.com>

On Jun 9, 2011, at 3:30 PM, Sriram Narayanan wrote:

> On Fri, Jun 10, 2011 at 12:37 AM, Jeff Johnson <n3npq@mac.com> wrote:
>> 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.
> Ok, I can definitely move to 5.1.25. However, the INSTALL document
> mentions 5.1.19, you may want to correct that.


>>> /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).
> The directory structure that the rpmbuild expects (at least db51/db.h)
> is different from what db-5.1.19 provides.

Yes. If built internally, then the build ends up with ./db3/db.h being included.

You *might* need
	ln -s db3 db51 in the to[p level directory.

> What is your folder structure for bdb ?
> Also, which version are you testing with ?

I use this db51.spec and packaging (or some modest variant thereof).

I test against db-5.1.25 (but can/have used db-5.1.19, I switched
when Mandriva cooker swithced).

falmouth:tmp jbj$ cvs -d :pserver:anonymous@rpm5.org:/v/rpm/cvs get distro/db51
U distro/db51/db-1.85-errno.patch
U distro/db51/db-4.5.20-jni-include-dir.patch
U distro/db51/db-4.6.21-1.85-compat.patch
U distro/db51/db51.spec
U distro/db51/patch.1.1
U distro/db51/patch.1.2
U distro/db51/patch.1.3
U distro/db51/patch.1.4

Add the upstream db-5.1.25 and you should be good to go.

73 de Jeff

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