RPM Community Forums

Mailing List Message of <rpm-devel>

Re: empty struct in rpmdb/db_emu.h

From: David Halik <dhalik@jla.rutgers.edu>
Date: Sun 25 Nov 2007 - 19:54:23 CET
Message-ID: <4749C4DF.2000601@jla.rutgers.edu>

> 
> So you're compiling without Berkeley DB?
> 
>  From rpmdb/rpmdb.h:
> 
> #if defined(WITH_DB)
> #include "db.h"
> #else
> #include "db_emu.h"
> #endif
> 
> If you build with BDB, then db_txn will not be an empty structure.
> 
> Note: The "optional" in the INSTALL document is what the Berkeley DB 
> haters wish
> to see; "mandatory" is far closer to reality because rpm -BDB has hardly 
> ever been used,
> particularly on non-linux with non-gcc compilers.
> 
>  From INSTALL
> Berkeley-DB [1] optional  4.5     4.6.21  
> http://www.oracle.com/database/berkeley-db.html
> ...
> [1] db/sqlite: Modified Berkeley-DB copy bundled with RPM.
>                Building RPM against stock external Berkeley-DB not 
> officially supported.
>                Building RPM against SQLite-only not officially supported.
>                Building RPM against at least one of Berkeley-DB or 
> SQLite required.
>                Use modified bundled Berkeley-DB copy, please!
> 

That's the thing... it is compiling with BDB, the internal one at that:

checking whether to build with Berkeley-DB library... yes (internal: 
sub-directory db3)

So let's check out the Makefile in rpm-5.0a3/perl:

rpm-5.0a3/perl$ grep -n WITH_DB Makefile
Makefile:165:WITH_DB = yes

It looks like it's completely ignoring the ifdef for some reason. I 
threw a quick patch together that just explicitly defines db.h and it 
moved past it.

Of course now I'm having other problems in the perl directory:

cc -c  -I../. -I../build -I../lib -I../popt -I../rpmdb -I../rpmio 
-I../rpmconstant -I/usr/local/include -I/usr/local/include/python2.4 
-I/usr/local/include/beecrypt -I/usr/local/ssl/include 
-DRPM_OS_SOLARIS=020900 -I/usr/local/include/neon   -g -xs -D_GNU_SOURCE 
-D_REENTRANT -D_LARGEFILE64_SOURCE -DNE_LFS   -g   -DVERSION=\"5.0a3\" 
-DXS_VERSION=\"5.0a3\" -KPIC 
"-I/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE"   RPM_Dependencies.c
"../rpmdb/rpmtag.h", line 104: warning: enumerator value overflows 
INT_MAX (2147483647)
"../lib/rpmcli.h", line 157: warning: integer overflow detected: op "<<"
"RPM_Spec.xs", line 69: warning: implicit function declaration: _newspec
"RPM_Spec.xs", line 182: warning: implicit function declaration: _specbuild
"../config.h", line 706: warning: macro redefined: _FILE_OFFSET_BITS
"/usr/local/include/beecrypt/gnu.h", line 39: warning: no explicit type 
given
"/usr/local/include/beecrypt/gnu.h", line 39: syntax error before or at: 
bc_thread_t
"/usr/local/include/beecrypt/gnu.h", line 39: warning: old-style 
declaration or incorrect type for: bc_thread_t
"/usr/local/include/beecrypt/api.h", line 59: warning: macro redefined: 
assert
"../rpmio/rpmio_internal.h", line 288: syntax error before or at: :
"../rpmio/rpmio_internal.h", line 291: cannot recover from previous errors
cc: acomp failed for RPM_Files.c

*sigh* I can't see how beecrypt is failing since I've been using 4.1.2 
to build since 4.4.9 without a problem. Talk about a frustrating 
directory, I'm wondering if I should just build it without perl bindings. ;)

-- 
================================
David Halik
Student Programmer
OSS/NBCS - OIT Rutgers
dhalik@jla.rutgers.edu
================================
Received on Sun Nov 25 19:54:25 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.