public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Berkeley DB, coexistence of different versions
@ 2005-09-12 22:50 Stefaan
  2005-09-13  1:34 ` Georgi Georgiev
  2005-09-13  2:23 ` Robin H. Johnson
  0 siblings, 2 replies; 7+ messages in thread
From: Stefaan @ 2005-09-12 22:50 UTC (permalink / raw
  To: Gentoo Developers

Hi all!!

Here's an issue Seemant and I have been struggling with, and doesn't
seem as easy to solve as like touching one ebuild.

Berkeley DB comes in many flavors.  Judging by the slots in the
ebuilds (1, 3, 4, 4.1, 4.2, 4.3) there's many different interface
versions.  This comes with the added fun of having packages depend on
certain versions of DB.  Nothing shocking so far.

However, looking at the heimdal-package we noticed several problems
(which seem to be more widespread than just heimdal):
1) The package won't build when both db-4 and db-3 are installed (bug
#100723).  Underlying reason is that the package only knew about
db-4.0, and thus assumed the include for db-4.x to be called
<db4/db.h>.  Because the installed db-4.2 didn't have this name for
its include, and because the package was still trying to link with a
4.x library, this gave problems.
2) Detecting of available version of db-includes and db-libraries is
done separately.  So we have a first algorithm looking for the most
recent include files (out of a list of possibilities known at the time
the package is created), and a second algorithm doing the same for the
libraries.  This is a reason the error in (1) was possible.
3) In an attempt to circumvent the problem, we could start hard coding
packages to require a specific db-version. But this would have
distinct disadvantages: a) as it seems logical to depend on the latest
version available at ebuild-creation time, installing a system with
ebuilds of different ages results in a system with many db-versions,
even when it's not necessary; b) we undo the effort put in a package
to make it compile with different db-versions
4) Note that even then, the problem in (1) hasn't disappeared, as the
configure-scripts of the package still crawl around the system to find
a suitable include-library combo and, not knowing the full truth,
select an unsuitable one.  There even seems to be a disagreement (on
upstream level) on whether libdb3.so.* or libdb-3.so.* is the
preferred naming.

Looking at other distributions:
- Fedora Core seems to try and solve this problem by allowing only
db-4 (I guess db-4.x's are compatible to some level then?)  It does
however package db-1 together with libgnome-1 in a single rpm to
account for a dependency problem there.  This is not an option for
gentoo, as nvi, xemacs, libtool, partysip, nss_ldap, hotkeys, jigdo
etc. seem to depend on older versions.  And er, what when db-5
appears?
- Debian has a clean solution: install as many db-versions as you
want, but only one development package at a time.  The development
package contains /usr/include/db.h AND /usr/lib/libdb.so.  Adapting
packages if necessary to use those two is an easy task.  However, this
isn't an option for gentoo either, as we don't split packages into
-libs and -devel.

So I'm wondering, what would be a clean solution for this problem?

Cheers,
Stefaan

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-09-14 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-12 22:50 [gentoo-dev] Berkeley DB, coexistence of different versions Stefaan
2005-09-13  1:34 ` Georgi Georgiev
2005-09-13  2:23 ` Robin H. Johnson
2005-09-14 14:28   ` Paul de Vrieze
2005-09-14 14:47     ` Diego 'Flameeyes' Pettenò
2005-09-14 15:01       ` Paul de Vrieze
2005-09-14 16:01         ` Diego 'Flameeyes' Pettenò

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox