Gentoo Archives: gentoo-dev

From: Stefaan <stefaan@g.o>
To: Gentoo Developers <gentoo-dev@l.g.o>
Subject: [gentoo-dev] Berkeley DB, coexistence of different versions
Date: Mon, 12 Sep 2005 22:56:15
1 Hi all!!
3 Here's an issue Seemant and I have been struggling with, and doesn't
4 seem as easy to solve as like touching one ebuild.
6 Berkeley DB comes in many flavors. Judging by the slots in the
7 ebuilds (1, 3, 4, 4.1, 4.2, 4.3) there's many different interface
8 versions. This comes with the added fun of having packages depend on
9 certain versions of DB. Nothing shocking so far.
11 However, looking at the heimdal-package we noticed several problems
12 (which seem to be more widespread than just heimdal):
13 1) The package won't build when both db-4 and db-3 are installed (bug
14 #100723). Underlying reason is that the package only knew about
15 db-4.0, and thus assumed the include for db-4.x to be called
16 <db4/db.h>. Because the installed db-4.2 didn't have this name for
17 its include, and because the package was still trying to link with a
18 4.x library, this gave problems.
19 2) Detecting of available version of db-includes and db-libraries is
20 done separately. So we have a first algorithm looking for the most
21 recent include files (out of a list of possibilities known at the time
22 the package is created), and a second algorithm doing the same for the
23 libraries. This is a reason the error in (1) was possible.
24 3) In an attempt to circumvent the problem, we could start hard coding
25 packages to require a specific db-version. But this would have
26 distinct disadvantages: a) as it seems logical to depend on the latest
27 version available at ebuild-creation time, installing a system with
28 ebuilds of different ages results in a system with many db-versions,
29 even when it's not necessary; b) we undo the effort put in a package
30 to make it compile with different db-versions
31 4) Note that even then, the problem in (1) hasn't disappeared, as the
32 configure-scripts of the package still crawl around the system to find
33 a suitable include-library combo and, not knowing the full truth,
34 select an unsuitable one. There even seems to be a disagreement (on
35 upstream level) on whether* or* is the
36 preferred naming.
38 Looking at other distributions:
39 - Fedora Core seems to try and solve this problem by allowing only
40 db-4 (I guess db-4.x's are compatible to some level then?) It does
41 however package db-1 together with libgnome-1 in a single rpm to
42 account for a dependency problem there. This is not an option for
43 gentoo, as nvi, xemacs, libtool, partysip, nss_ldap, hotkeys, jigdo
44 etc. seem to depend on older versions. And er, what when db-5
45 appears?
46 - Debian has a clean solution: install as many db-versions as you
47 want, but only one development package at a time. The development
48 package contains /usr/include/db.h AND /usr/lib/ Adapting
49 packages if necessary to use those two is an easy task. However, this
50 isn't an option for gentoo either, as we don't split packages into
51 -libs and -devel.
53 So I'm wondering, what would be a clean solution for this problem?
55 Cheers,
56 Stefaan
58 --
59 gentoo-dev@g.o mailing list


Subject Author
Re: [gentoo-dev] Berkeley DB, coexistence of different versions Georgi Georgiev <chutz@×××.net>
Re: [gentoo-dev] Berkeley DB, coexistence of different versions "Robin H. Johnson" <robbat2@g.o>