Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: "Robin H. Johnson" <robbat2@g.o>
Subject: Re: sys-libs/db and dll hell
Date: Tue, 31 Aug 2010 21:05:05 +0000
On Tue, Aug 31, 2010 at 07:27:57PM +0300, Eray Aslan wrote:
> app-crypt/heimdal looks for db header files in db4/db.h db3/db.h db.h 
> db_185.h - in that order - and links with ldb.  In Gentoo, we do not 
> have a db4 directory but rather db3 db4.7 db4.8 db5.0 etc.
And the reason we don't have it, nor a symlink for it, is that if you
build against db4.7 and then upgrade the backing library to db4.8, some
bad things have happened in the past.

> Consequently, when both sys-libs/db-3 and sys-libs/db-4 are present, 
> heimdal links against libdb, which is a symlink against libdb-4.x, but 
> uses headers from db-3.  Result is a segfault in heimdal - serves it 
> right for mixing it up :) .
Same problem can happen within db4 version per above.

> * I am guessing this is not the first time.  Any pointers on how to 
> solve this gracefully?  inheriting db-use in ebuild and sedding works but
> 	- is ugly
> 	- there is a bunch of #ifdef db4/db.h's in the source so sedding the 
> configure script is not enough
> 	- this is a security related package so I try to refrain from patching
> * I can submit upstream a proper patch that will make the code look at 
> db.h first and db4/db.h db3/db.h later.  Is there a (unwritten?) rule 
> that says look at db.h first? Any links?
It should iterate supported versions of DB, from highest to lowest.
db.h should come at the end because it may be part of db-1.85.

Unfortunately there isn't really any graceful fix. The buildsystem needs
to be patched, ideally to allow explicit passing of the DB include
directory and file to link. DB_VERSION_MAJOR/DB_VERSION_MINOR are the
best defines to check, they will work from db3 onwards.

db-use was intended to help packages where can specify the include dir
and library directly. heimdel will need patching becase of those ifdefs,
but that's the price for supporting

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@g.o
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Attachment:
pgpnIG14IVSuj.pgp (PGP signature)
Replies:
Re: sys-libs/db and dll hell
-- Eray Aslan
References:
sys-libs/db and dll hell
-- Eray Aslan
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
sys-libs/db and dll hell
Next by thread:
Re: sys-libs/db and dll hell
Previous by date:
Re: Improve devaway system
Next by date:
Last rites: x11-themes/smooth-themes and x11-themes/smoothgnome


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.