RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpmio not compiling

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 09 Aug 2011 - 01:36:43 CEST
Message-id: <9EBE8025-4DDF-455C-8B65-A29DCCD9EEB1@mac.com>

On Aug 8, 2011, at 7:03 PM, Jeff Johnson wrote:

> 
> On Aug 9, 2011, at 12:54 AM, Belal Salem wrote:
> 
>> Thanks for the detailed explanation.
>> So, here after I satisfied all the prerequisites, when compiling the RPM source, I encounter the following compilation errors:
>> 
>> In file included from dbconfig.c:14:
>> ./rpmdb.h:433: error: expected specifier-qualifier-list before 'DB_SEQUENCE'
>> ./rpmdb.h:490: error: expected specifier-qualifier-list before 'DB_LOGC'
>> ./rpmdb.h: In function 'dbiCopen':
>> ./rpmdb.h:589: error: 'struct _dbiIndex' has no member named 'dbi_vec'
>> ./rpmdb.h: In function 'dbiCclose':
>> .....
>> .....
>> 
>> what do you think that is?!
>> 
> 
> This is the same problem that is being reported multiple times.
> 
> In order to do a release -- using --with-db=external as everyone wishes --
> rpm has
> 	#include <db51/db.h>
> hardwired in the code.
> 
> What everyone wishes is that rpm Just Works with whatever Berkeley DB
> happens to be installed *for all possible distros and versions*.
> 
> The simplest fix is to build/install db-5.1.25 externally. The "portable"
> (in the sense you will have to edit to taste, the basic build is fine)
> that I used is available here
> 
> 	cvs -d :pserver:anonymous@rpm5.org:/v/rpm/cvs get distro/db51
> 
> Add the "official" release of db-5.1.25 from Oracle, and the ancient db.1.85 tar ball,
> and build/install the db51 packages.
> 

Before we get too much further:

The RPM version you are building *requires* a change in the /var/lib/rpm
databsed to add transactional logs and ACID behavior for increased reliability
(and performance).

If your goal is to stick with a RHEL5 based system, building/installing
rpm-5.3.x is a one-way trip:
	No compatibility with other versions of rpm is promised in rpm-5.3.x whatsoever.
Instead, there's a conversion, and tools to help with the conversion,
to use transactions and ACID properties in Berkeley DB.

The conversion isn't hard (32bit unsigned integers are being swapped
so that rpmdb's are *always* in network order for "portability" and
so that B-tree access is optimal on all platforms) and is invertible
by running a 5-7 step process.

But you might want to think carefully about what your goals are.

In addition to having fewer side-effects from interrupted behavior like kill -9,
the other major benefit in rpm-5.3.x is increased performance in many accesses,
in spite of that fact that transactional logging forces all I/O to be done
twice.

You may want to look at rpm-5.2 instead: that is the last release that
is "compatible" as in doing same old, same old.

Note that I've measured 80x faster installation with rpm-5.3.x compared
to rpm-4.6.1, installing ~1000 identical packages using 5.3.x and 4.6.1.

While -- like all benchmarks -- that 80x faster number is illusory when one digs into
the techniques used to achieve the "win", it is indeed a significant performance
improvement, and rpm-5.3.x is bot faster and more reliable because of transactions
and ACID behavior and other improvements too numerous to mention.

Again:
	No compatibility with other versions of rpm is promised in rpm-5.3.x whatsoever.
	
hth

73 de Jeff
Received on Tue Aug 9 01:37:08 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.