pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/41865: Problem building pkg_install on Linux box
>Number: 41865
>Category: pkg
>Synopsis: Problem building pkg_install on Linux box
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 10 09:50:01 +0000 2009
>Originator: David Sainty
>Release: Linux
>Organization:
>Environment:
Linux 2.6.16-gentoo-r7 #6 SMP PREEMPT Wed May 7 20:30:01 NZST 2008 i686
Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
>Description:
pkgtools/pkg_install/files/lib/pkgdb.c wants to use dbopen().
pkgtools/pkg_install/files/configure.ac looks for a solution. Snippets follow.
checking for __db185_open in -ldb... no
checking for library containing dbopen... none required
checking db1/db.h usability... yes
checking db1/db.h presence... yes
checking for db1/db.h... yes
checking db_185.h usability... yes
checking db_185.h presence... yes
checking for db_185.h... yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
The "checking for library containing dbopen" decides no linking is required,
because libnbcompat is providing dbopen, and is linked automatically.
However, there are system installed db*.h files, including
/usr/include/db_185.h.
Ultimately, pkgdb.c pulls in db_185.h because HAVE_DB_185_H is installed. But
it doesn't link any system installed libdb.
% fgrep dbopen /usr/include/db_185.h
/* Re-define the user's dbopen calls. */
#define dbopen __db185_open_4002
And it all goes wrong:
gcc -L/home/dave/pkgsrc3/pkgtools/pkg_install/work/bzip2
-L/home/dave/pkgsrc3/pkgtools/pkg_install/work/zlib
-L/home/dave/pkgsrc3/pkgtools/pkg_install/work/libarchive/.libs
-L/home/dave/pkgsrc3/pkgtools/pkg_install/work/libfetch -L/home/da
ve/pkgsrc3/pkgtools/pkg_install/work/libnbcompat -Wl,-R/home/dave/pkgroot3/lib
-L../lib -o pkg_add main.o perform.o -linstall -lfetch -larchive -lbz2 -lz
-lnbcompat
../lib/libinstall.a(pkgdb.o): In function `pkgdb_open':
pkgdb.c:(.text+0x83): undefined reference to `__db185_open_4002'
collect2: ld returned 1 exit status
*** Error code 1
Stop.
bmake: stopped in
/home/dave/pkgsrc3/pkgtools/pkg_install/work/pkg_install-20090806/add
*** Error code 1
Stop.
bmake: stopped in
/home/dave/pkgsrc3/pkgtools/pkg_install/work/pkg_install-20090806
*** Error code 1
>How-To-Repeat:
Build any package on this box, which starts with:
===> Trying to handle out-dated pkg_install...
===> Cleaning for pkg_install-20090806
===> Installing dependencies for pkg_install-20090806
>Fix:
There's an air of mystery around the nbcompat features stuff. However, the
pkg_install/Makefile suggests that nbcompat db support is unconditionally
built, therefore it seems appropriate that the nbcompat db.h is unconditionally
included. This does fix the build.
If this is the correct fix, then configure.ac should probably also stop looking
for the non-libnbcompat db*.h files.
--- pkgdb.c 2 Aug 2009 17:56:45 -0000 1.34
+++ pkgdb.c 10 Aug 2009 09:40:58 -0000
@@ -38,15 +38,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#if HAVE_DB_185_H
-#include <db_185.h>
-#elif HAVE_DB1_DB_H
-#include <db1/db.h>
-#elif HAVE_DB_H
-#include <db.h>
-#else
#include <nbcompat/db.h>
-#endif
#if HAVE_ERR_H
#include <err.h>
#endif
Home |
Main Index |
Thread Index |
Old Index