1 |
On Tue, Aug 31, 2010 at 07:27:57PM +0300, Eray Aslan wrote: |
2 |
> app-crypt/heimdal looks for db header files in db4/db.h db3/db.h db.h |
3 |
> db_185.h - in that order - and links with ldb. In Gentoo, we do not |
4 |
> have a db4 directory but rather db3 db4.7 db4.8 db5.0 etc. |
5 |
And the reason we don't have it, nor a symlink for it, is that if you |
6 |
build against db4.7 and then upgrade the backing library to db4.8, some |
7 |
bad things have happened in the past. |
8 |
|
9 |
> Consequently, when both sys-libs/db-3 and sys-libs/db-4 are present, |
10 |
> heimdal links against libdb, which is a symlink against libdb-4.x, but |
11 |
> uses headers from db-3. Result is a segfault in heimdal - serves it |
12 |
> right for mixing it up :) . |
13 |
Same problem can happen within db4 version per above. |
14 |
|
15 |
> * I am guessing this is not the first time. Any pointers on how to |
16 |
> solve this gracefully? inheriting db-use in ebuild and sedding works but |
17 |
> - is ugly |
18 |
> - there is a bunch of #ifdef db4/db.h's in the source so sedding the |
19 |
> configure script is not enough |
20 |
> - this is a security related package so I try to refrain from patching |
21 |
> * I can submit upstream a proper patch that will make the code look at |
22 |
> db.h first and db4/db.h db3/db.h later. Is there a (unwritten?) rule |
23 |
> that says look at db.h first? Any links? |
24 |
It should iterate supported versions of DB, from highest to lowest. |
25 |
db.h should come at the end because it may be part of db-1.85. |
26 |
|
27 |
Unfortunately there isn't really any graceful fix. The buildsystem needs |
28 |
to be patched, ideally to allow explicit passing of the DB include |
29 |
directory and file to link. DB_VERSION_MAJOR/DB_VERSION_MINOR are the |
30 |
best defines to check, they will work from db3 onwards. |
31 |
|
32 |
db-use was intended to help packages where can specify the include dir |
33 |
and library directly. heimdel will need patching becase of those ifdefs, |
34 |
but that's the price for supporting |
35 |
|
36 |
-- |
37 |
Robin Hugh Johnson |
38 |
Gentoo Linux: Developer, Trustee & Infrastructure Lead |
39 |
E-Mail : robbat2@g.o |
40 |
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85 |