[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Loads of problems building RPM



On Tue, Jul 23, 2002 at 09:33:59PM -0400, Jim Ribar wrote:
> Hi.
> 
> I've spent the last few days scouring the internet trying to get rpm to 
> build on darwin/bsd.  I've tried at least 4 different rpm releases and 
> nothing worked.
> 
> The closest I've come so far is with rpm-4.0.2.
> 
> I've installed db-3.1.4, zlb is installed, gettext-0.11.2, 
> autoconf-2.13, and automake-1.4-p5.  Configure actually completes 
> properly. I've symbolically linked /usr/local/BerkeleyDB.3.1.17/include  
> to /usr/include/db3.  When it tries to build the db3.c, I get the 
> following:
> 
> /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. 
> -I../build -I../rpmio   -I../popt -I../misc -I../intl  
> -I/usr/local/include    -g -O2 -D_GNU_SOURCE -Wall -Wpointer-arith 
> -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c db3.c
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../build -I../rpmio -I../popt 
> -I../misc -I../intl -I/usr/local/include -g -O2 -D_GNU_SOURCE -Wall 
> -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
> -Wno-char-subscripts -c db3.c -o db3.o
> db3.c: In function `db_fini':
> db3.c:141: too many arguments to function
> db3.c: In function `db_init':
> db3.c:219: structure has no member named `set_func_fsync'
> db3.c:237: too many arguments to function
> db3.c: In function `db3open':
> db3.c:693: warning: passing arg 2 of pointer to function from 
> incompatible pointer type
> db3.c:705: warning: passing arg 2 of pointer to function from 
> incompatible pointer type
> db3.c: At top level:
> db3.c:299: warning: `db3c_dup' defined but not used
> *** Error code 1
> 

OK, you're mixing and matching versions of db (and rpm) and have
discovered incompatibilities.

I'd suggest rpm-4.1 (mostly cooked, release in like a month),
or rpm-4.0.4 (current "production" sources), each of which has an
internal (and identical) copy of Berkeley db-4.0.14.

I'd suggest *using* the internal copy of db-4.0.14, as there's at
least one critical (for rpm) bug fix in the rpm internal copy of
db-4.0.14.

> Stop in /var/root/rpm-4.0.2/lib.
> *** Error code 1
> 
>   I've also tried db-3.1.17, which has the same problem.  Am I using the 
> wrong version for rpm-4.0.2?
> 
> But both rpm-4.0.4 and the version in cvs complain about there being no 
> sources in the db3 folder:
> 
> configuring in db3
> ~/rpm-4.0.4/db3
> running /bin/sh ./configure  --cache-file=.././config.cache --srcdir=.
> configure: error: cannot find sources in .
> mv: rename Makefile to Makefile.orig: No such file or directory
> cat: Makefile.orig: No such file or directory
> mv: rename db.h to db.h.orig: No such file or directory
> cat: db.h.orig: No such file or directory
> make: don't know how to make listobjs. Stop
> configure: error: ./configure failed for db3
> 

The very first thing to do is to get the internal copy of db-4.0.14 to
build standalone on darwin/bsd, and to run the db-4.0.14 internal tests
to insure that the build "works".

The db sub-directory within rpm sources is exactly a db-4.0.14 top
level directory, build within the rpm/db/build_unix sub-directory
according to instuctions (wonderful BTW) at www.sleepycat.com:
	cd rpm-4.1/db/build_unix
	../dist/configure \
		--enable-shared --enable-static --enable-debug --enable-rpc
	make

The next step is to build in the rpm/db3 sub-directory with the configure
flags that rpm is trying to use. This shouldn't be too much more difficult
than doing
	cd rpm-4.1/db3
	../db/dist/configure \
		--enable-shared --enable-static --enable-debug --enable-rpc \
       		--with-uniquename=_rpmdb --srcdir=$db_dist
	make

Finally, you'll need to jigger the rpm/db3/configure (this is *NOT* an autoconf
generated script, but rather a teensy wrapper to a db-4.0.14 build) script to
"work" (i.e. perform the same build that you just performed in the previous
step) on darwin/bsd. Once that is done, you'll be able to see what else
needs porting to darwin/bsd in rpm.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []