NetBSD Problem Report #42373

From www@NetBSD.org  Tue Nov 24 20:27:01 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id DEE1C63C37C
	for <gnats-bugs@gnats.netbsd.org>; Tue, 24 Nov 2009 20:27:00 +0000 (UTC)
Message-Id: <20091124202658.9234F63C2E4@www.NetBSD.org>
Date: Tue, 24 Nov 2009 20:26:58 +0000 (UTC)
From: mi+netbsd@aldan.algebra.com
Reply-To: mi+netbsd@aldan.algebra.com
To: gnats-bugs@NetBSD.org
Subject: misc/rpm would not build on Solaris 8: __db185_open
X-Send-Pr-Version: www-1.0

>Number:         42373
>Category:       pkg
>Synopsis:       misc/rpm does not interoperate with native rpm
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linux-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 24 20:30:01 +0000 2009
>Closed-Date:    Sat Dec 27 03:35:42 +0000 2014
>Last-Modified:  Sat Dec 27 03:35:42 +0000 2014
>Originator:     Mikhail T.
>Release:        
>Organization:
Virtual Estates, Inc.
>Environment:
SunOS apdevl.XXX 5.8 Generic_117350-45 sun4u sparc SUNW,Sun-Fire-V240
>Description:
...
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/tmp/misc/rpm/work/rpm-2.5.4/build'
gmake[1]: Entering directory `/tmp/misc/rpm/work/rpm-2.5.4/tools'
cc -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/tmp/misc/rpm/work/rpm-2.5.4/lib -L/tmp/misc/rpm/work/rpm-2.5.4/build -L/tmp/misc/rpm/work/rpm-2.5.4/misc  dumpdb.o ../lib/librpm.a -lintl -liconv -lnsl -lsocket -lz -lmisc   -o dumpdb
Undefined                       first referenced
 symbol                             in file
__db185_open                        ../lib/librpm.a(dbindex.o)
ld: fatal: Symbol referencing errors. No output written to dumpdb
gmake[1]: *** [dumpdb] Error 1
gmake[1]: Leaving directory `/tmp/misc/rpm/work/rpm-2.5.4/tools'
gmake: *** [make-subdirs] Error 1
*** Error code 2

>How-To-Repeat:
Install pkgsrc on Solaris-8. I use SunStudio-11's compiler, but it, probably, does not matter.

cd /usr/pkgsrc/misc/rpm
bmake

Observe the above-quoted error.
>Fix:

>Release-Note:

>Audit-Trail:
From: Aleksey Cheusov <cheusov@tut.by>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Wed, 25 Nov 2009 22:41:07 +0200

 > gmake[1]: Nothing to be done for `all'.
 > gmake[1]: Leaving directory `/tmp/misc/rpm/work/rpm-2.5.4/build'
 > gmake[1]: Entering directory `/tmp/misc/rpm/work/rpm-2.5.4/tools'
 > cc -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/tmp/misc/rpm/work/rpm-2.5.4/lib -L/tmp/misc/rpm/work/rpm-2.5.4/build -L/tmp/misc/rpm/work/rpm-2.5.4/misc  dumpdb.o ../lib/librpm.a -lintl -liconv -lnsl -lsocket -lz -lmisc   -o dumpdb
 > Undefined                       first referenced
 >  symbol                             in file
 > __db185_open                        ../lib/librpm.a(dbindex.o)
 > ld: fatal: Symbol referencing errors. No output written to dumpdb
 > gmake[1]: *** [dumpdb] Error 1
 > gmake[1]: Leaving directory `/tmp/misc/rpm/work/rpm-2.5.4/tools'
 > gmake: *** [make-subdirs] Error 1
 > *** Error code 2

 The issue looks the same as pkg/37293

 Does the following patch work for you?

 Index: Makefile
  ===================================================================
  RCS file: /cvsroot/pkgsrc/misc/rpm/Makefile,v
  retrieving revision 1.68
  diff -u -r1.68 Makefile
  --- Makefile    22 Sep 2009 13:16:00 -0000      1.68
  +++ Makefile    24 Oct 2009 11:07:06 -0000
  @@ -26,6 +26,7 @@


   # The rpm databases are kept under ${RPM_DB_PREFIX}/lib/rpm.
   CONFIGURE_ENV+=                varprefix=${RPM_DB_PREFIX:Q}
  +LIBS+=                 ${BDB_LIBS:Q}


   MAKE_FLAGS+=           MANDIR=${PREFIX}/${PKGMANDIR}/man8
   MAKE_FLAGS+=           ROOT=${DESTDIR}

 -- 
 Best regards, Aleksey Cheusov.

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: asau@NetBSD.org
Responsible-Changed-When: Tue, 01 Dec 2009 13:05:39 +0000
Responsible-Changed-Why:
Solaris problem.
Can any Solaris user test the patch?


From: "Mikhail T." <mi+thun@aldan.algebra.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Tue, 01 Dec 2009 10:38:53 -0500

 Aleksey Cheusov ΞΑΠΙΣΑΧ(ΜΑ):
 >  Does the following patch work for you?

 >    # The rpm databases are kept under ${RPM_DB_PREFIX}/lib/rpm.
 >    CONFIGURE_ENV+=                varprefix=${RPM_DB_PREFIX:Q}
 >   +LIBS+=                 ${BDB_LIBS:Q}

 Yes, this works for me on Solaris-8 -- at least, inasmuch as rpm
 compiles and links. Have not had the chance to test the executable,
 though -- especially its DB-related aspects.

 Thanks. Yours,

 	-mi

From: Aleksey Cheusov <cheusov@tut.by>
To: "Mikhail T." <mi+thun@aldan.algebra.com>
Cc: gnats-bugs@netbsd.org,  pkg-manager@netbsd.org,  gnats-admin@netbsd.org,
	  pkgsrc-bugs@netbsd.org
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Thu, 03 Dec 2009 23:52:18 +0200

 > Aleksey Cheusov ΞΑΠΙΣΑΧ(ΜΑ):
  >>  Does the following patch work for you?

  >>    # The rpm databases are kept under ${RPM_DB_PREFIX}/lib/rpm.
  >>    CONFIGURE_ENV+=                varprefix=${RPM_DB_PREFIX:Q}
  >>   +LIBS+=                 ${BDB_LIBS:Q}

 > Yes, this works for me on Solaris-8 -- at least, inasmuch as rpm
 > compiles and links.

 Good. Now we are waiting for pkgsrc developers to commit that patch and
 close two bug reports. Anybody?

 > Have not had the chance to test the executable, though -- especially
 > its DB-related aspects.
 I guess the following is enough:
 mkdir /tmp/lalala && rpm --initdb --dbpath /tmp/lalala

 -- 
 Best regards, Aleksey Cheusov.

From: "Mikhail T." <mi+thun@aldan.algebra.com>
To: Aleksey Cheusov <cheusov@tut.by>
Cc: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
        pkgsrc-bugs@netbsd.org
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Thu, 03 Dec 2009 17:43:10 -0500

 Aleksey Cheusov ΞΑΠΙΣΑΧ(ΜΑ):
 >
 >> Have not had the chance to test the executable, though -- especially
 >> its DB-related aspects.
 >>     
 > I guess the following is enough:
 > mkdir /tmp/lalala && rpm --initdb --dbpath /tmp/lalala
 >   
 Actually, I'd say, the rpm built for SPARC/Solaris via pkgsrc ought to
 be able to work with the DB-files created by the rpm, that comes with
 i386/Linux... Or is that asking for too much?

     -mi

From: "Mikhail T." <mi+thun@aldan.algebra.com>
To: gnats-bugs@NetBSD.org
Cc: solaris-pkg-people@NetBSD.org, gnats-admin@NetBSD.org,
        pkgsrc-bugs@NetBSD.org, mi+netbsd@aldan.algebra.com
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Thu, 03 Dec 2009 17:55:29 -0500

 Mikhail T. Π½Π°ΠΏΠΈΡÐ°Π²(Π»Π°):
 >  Actually, I'd say, the rpm built for SPARC/Solaris via pkgsrc ought to
 >  be able to work with the DB-files created by the rpm, that comes with
 >  i386/Linux... Or is that asking for too much?

 Trying to verify the interoperability of the two rpm-executables on this
 Linux system:

 	root@ws-testjw:~ (438) /bin/rpm -qf /lib/libc.so.6
 	glibc-2.5-42
 	root@ws-testjw:~ (439) /opt/bin/rpm -q -f /lib/libc.so.6
 	file /lib/libc.so.6 is not owned by any package
 	root@ws-testjw:~ (440) /opt/bin/rpm --dbpath /var/lib/rpm -qf \
  		/lib/libc.so.6
 	failed to open //var/lib/rpm/packages.rpm

 Something is wrong... /var/lib/rpm/packages.rpm exists and is 8-bytes in
 size:

     -rw-r--r-- 1 root root 8 Dec  2 18:05 /var/pkg/lib/rpm/packages.rpm

 Yours,

 	-mi

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Fri, 04 Dec 2009 13:19:23 +0900

 On Fri, 04 Dec 2009 08:00:08 +0900, Mikhail T. <mi+thun@aldan.algebra.com> wrote:

 >  Trying to verify the interoperability of the two rpm-executables on this
 >  Linux system:
 > 	root@ws-testjw:~ (438) /bin/rpm -qf /lib/libc.so.6
 >  	glibc-2.5-42
 >  	root@ws-testjw:~ (439) /opt/bin/rpm -q -f /lib/libc.so.6
 >  	file /lib/libc.so.6 is not owned by any package
 >  	root@ws-testjw:~ (440) /opt/bin/rpm --dbpath /var/lib/rpm -qf \
 >   		/lib/libc.so.6
 >  	failed to open //var/lib/rpm/packages.rpm
 > Something is wrong... /var/lib/rpm/packages.rpm exists and is 8-bytes in
 >  size:
 >     -rw-r--r-- 1 root root 8 Dec  2 18:05 /var/pkg/lib/rpm/packages.rpm

 You can put RPM_DB_PREFIX=/var in mk.conf and rebuild misc/rpm.
 (and BUILD_DEFS+=RPM_DB_PREFIX should be in pkgsrc/misc/rpm/Makefile)

From: "Mikhail T." <mi+thun@aldan.algebra.com>
To: gnats-bugs@NetBSD.org, pkgsrc-bugs@NetBSD.org, gnats-admin@NetBSD.org
Cc: 
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Fri, 04 Dec 2009 04:12:20 -0500

 OBATA Akio ΞΑΠΙΣΑΧ(ΜΑ):
 >  >  Trying to verify the interoperability of the two rpm-executables on this
 >  >  Linux system:
 >  > 	root@ws-testjw:~ (438) /bin/rpm -qf /lib/libc.so.6
 >  >  	glibc-2.5-42
 >  >  	root@ws-testjw:~ (439) /opt/bin/rpm -q -f /lib/libc.so.6
 >  >  	file /lib/libc.so.6 is not owned by any package
 >  >  	root@ws-testjw:~ (440) /opt/bin/rpm --dbpath /var/lib/rpm -qf \
 >  >   		/lib/libc.so.6
 >  >  	failed to open //var/lib/rpm/packages.rpm
 >  > Something is wrong... /var/lib/rpm/packages.rpm exists and is 8-bytes in
 >  >  size:
 >  >     -rw-r--r-- 1 root root 8 Dec  2 18:05 /var/pkg/lib/rpm/packages.rpm
 >  
 >  You can put RPM_DB_PREFIX=/var in mk.conf and rebuild misc/rpm.
 >  (and BUILD_DEFS+=RPM_DB_PREFIX should be in pkgsrc/misc/rpm/Makefile)
 >  
 >   

 But it should be working with an explicitly-specified alternative
 prefix, should it not? And it does not -- unable to deal with the DB
 maintained by "the real" rpm...

     -mi

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Mon, 7 Dec 2009 04:16:42 +0000

 On Thu, Dec 03, 2009 at 10:45:02PM +0000, Mikhail T. wrote:
  >  Actually, I'd say, the rpm built for SPARC/Solaris via pkgsrc ought to
  >  be able to work with the DB-files created by the rpm, that comes with
  >  i386/Linux... Or is that asking for too much?

 Who knows if its data layout is machine-independent? Probably it
 isn't, so don't expect that to work.

 If you want to check interoperability, please build rpm from pkgsrc
 with the same Berkeley DB version that the native rpm is using.
 Otherwise it will probably fail to open the database and you might or
 might not get comprehensible error messages out.

 The original problem of this PR has now been fixed, in any event.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Mikhail T." <mi+thun@aldan.algebra.com>
To: gnats-bugs@NetBSD.org
Cc: solaris-pkg-people@NetBSD.org, gnats-admin@NetBSD.org,
        pkgsrc-bugs@NetBSD.org, mi+netbsd@aldan.algebra.com
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Mon, 07 Dec 2009 10:57:58 -0500

 David Holland wrote:
 >  If you want to check interoperability, please build rpm from pkgsrc
 >  with the same Berkeley DB version that the native rpm is using.
 >  Otherwise it will probably fail to open the database and you might or
 >  might not get comprehensible error messages out.

 I did test that -- and the result was negative... As I reported earlier
 in this PR, the pkgsrc-built rpm couldn't understand the data of the
 native rpm on the same machine running Red Hat Enterprise 5.4 (amd64 aka
 x86_64).

 Yours,

 	-mi

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: solaris-pkg-people@NetBSD.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org, mi+netbsd@aldan.algebra.com
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Tue, 8 Dec 2009 03:40:18 +0000

 On Mon, Dec 07, 2009 at 04:00:07PM +0000, Mikhail T. wrote:
  >>  If you want to check interoperability, please build rpm from pkgsrc
  >>  with the same Berkeley DB version that the native rpm is using.
  >>  Otherwise it will probably fail to open the database and you might or
  >>  might not get comprehensible error messages out.
  >  
  >  I did test that -- and the result was negative... As I reported earlier
  >  in this PR, the pkgsrc-built rpm couldn't understand the data of the
  >  native rpm on the same machine running Red Hat Enterprise 5.4 (amd64 aka
  >  x86_64).

 Which Berkeley DB version(s) were the native and pkgsrc rpm binaries
 built with?

 -- 
 David A. Holland
 dholland@netbsd.org

Responsible-Changed-From-To: solaris-pkg-people->linux-pkg-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Tue, 08 Dec 2009 04:02:30 +0000
Responsible-Changed-Why:
No longer a Solaris problem (which is fixed) but a problem with native
interoperability on Linux. Synopsis: changed accordingly too.


From: "Mikhail T." <mi+thun@aldan.algebra.com>
To: gnats-bugs@NetBSD.org
Cc: solaris-pkg-people@NetBSD.org, gnats-admin@NetBSD.org,
        pkgsrc-bugs@NetBSD.org, mi+netbsd@aldan.algebra.com
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Mon, 07 Dec 2009 23:04:46 -0500

 David Holland wrote:
 >  Which Berkeley DB version(s) were the native and pkgsrc rpm binaries
 >  built with?
 >   
 No idea... The pkgsrc was built from pkgsrc -- without any modifications
 on my part. The native rpm is whatever got installed with Red Hat 5.4
 (should be the same as the free Fedora distribution).

     -mi

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42373: misc/rpm would not build on Solaris 8: __db185_open
Date: Tue, 8 Dec 2009 07:40:55 +0000

 On Tue, Dec 08, 2009 at 04:05:04AM +0000, Mikhail T. wrote:
  >>  Which Berkeley DB version(s) were the native and pkgsrc rpm binaries
  >>  built with?
  >
  >  No idea... The pkgsrc was built from pkgsrc -- without any modifications
  >  on my part. The native rpm is whatever got installed with Red Hat 5.4
  >  (should be the same as the free Fedora distribution).

 Again, if they aren't the same, it probably won't work and probably
 can't be expected to work.

 Try checking with ldd.

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->feedback
State-Changed-By: cheusov@NetBSD.org
State-Changed-When: Tue, 30 Aug 2011 17:14:35 +0000
State-Changed-Why:
I think interoperability with native Linux's rpm database is not
a problem of pkgsrc. Objections?


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42373 (misc/rpm does not interoperate with native rpm)
Date: Wed, 31 Aug 2011 08:29:40 +0000

 On Tue, Aug 30, 2011 at 05:14:36PM +0000, cheusov@NetBSD.org wrote:
  > Synopsis: misc/rpm does not interoperate with native rpm
  > 
  > State-Changed-From-To: open->feedback
  > State-Changed-By: cheusov@NetBSD.org
  > State-Changed-When: Tue, 30 Aug 2011 17:14:35 +0000
  > State-Changed-Why:
  > I think interoperability with native Linux's rpm database is not
  > a problem of pkgsrc. Objections?

 I'm not sure. I guess unless there's some RPM reason for it not to
 work, I'd expect it to, at least for the same (or expected compatible)
 RPM version and same db library. And I guess as long as either both
 are 64-bit binaries or both are 32-bit binaries.

 However, since I asked a question in 2009 the PR should certainly be
 in feedback state. I guess I overlooked that then...

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 03:35:42 +0000
State-Changed-Why:
Feedback timeout.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.