FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-31-2010, 04:27 PM
Eray Aslan
 
Default sys-libs/db and dll hell

Hi,

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.


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 .


* 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?
* All linuxes I checked work correctly if the code looks at db.h first.
What's the case in *BSD, Solaris, etc? Is Linux a special case in
this regard?


Thanks
--
Eray
 
Old 08-31-2010, 09:05 PM
"Robin H. Johnson"
 
Default sys-libs/db and dll hell

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@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
 
Old 09-06-2010, 05:29 AM
Eray Aslan
 
Default sys-libs/db and dll hell

On 01.09.2010 00:05, Robin H. Johnson wrote:
> Unfortunately there isn't really any graceful fix. The buildsystem needs
> to be patched, ideally to allow explicit passing of the DB include
> directory

Patch for the above accepted by upstream [1]. So, all is good. Nice to
have a responsive upstream.

Thanks for the pointers.
--
Eray

[1]
http://github.com/heimdal/heimdal/commit/a1c14b231996ebd72de69df1de472f08e82c2288
 

Thread Tools




All times are GMT. The time now is 04:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org