The current mit-krb5 1.4 ebuild will not build when db-4.3 is unmasked. I think this patch resolves the issue. --- mit-krb5-1.4-r1.ebuild.old 2005-06-09 11:10:38.000000000 +0000 +++ mit-krb5-1.4-r1.ebuild 2005-06-09 11:09:47.000000000 +0000 @@ -33,7 +33,7 @@ } src_compile() { - export DB_HEADER="/usr/include/db4.2/db_185.h" + export DB_HEADER="/usr/include/db_185.h" export DB_LIB="/usr/$(get_libdir)/libdb.so" econf \ Reproducible: Always Steps to Reproduce: 1. 2. 3.
(In reply to comment #0) > The current mit-krb5 1.4 ebuild will not build when db-4.3 is unmasked. I don
(In reply to comment #0) > The current mit-krb5 1.4 ebuild will not build when db-4.3 is unmasked. I don´t think so - sys-libs/db is slotted. # emerge -Cav db >>> These are the packages that I would unmerge: sys-libs/db selected: 4.2.52_p2 1.85-r2 4.1.25_p1-r4 protected: none omitted: none
While hardcoding the location this way in the ebuild does not deserve any beauty price, the main problem is the fact that there is no dependency on db at all. When a dependency on db-4.2 is specified things should work properly. Of course all db packages do actually provide that particular header file, and the one in /usr/include could also be used.
The problem results from trying to use a db4.2 db_185.h with the db4.3 libdb.so. It works fine with db4.3, so long as the ebuild is fixed to use the db4.3 header file instead of forcing use of the db4.2 header file. Here's what happens with db4.2 and db4.3 installed, with a db4.3 libdb.so: i686-pc-linux-gnu-gcc -L../../../lib -Wl,-rpath -Wl,/usr/lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -o client-iter-test iter-test.o \ -lkadm5clnt -lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5sup port -lresolv i686-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSI ON=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DKRB5_PRIVATE=1 -DKRB5_D EPRECATED=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP_REALM=1 -DKRB5_DNS_LOOKUP= 1 -DHAVE_LIBRESOLV=1 -DHAVE_RES_NSEARCH=1 -DHAVE_RES_SEARCH=1 -DHAVE_DN_SKIPNAME =1 -DHAVE_PRAGMA_WEAK_REF=1 -DDELAY_INITIALIZER=1 -DCONSTRUCTOR_ATTR_WORKS=1 -DD ESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1 -DHAVE_PTHREAD=1 -DHAVE_PTHREAD_RWLOCK _INIT_IN_THREAD_LIB=1 -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 - DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYSLO G_H=1 -DHAVE_MEMORY_H=1 -DHAVE_OPENLOG=1 -DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 -DHAV E_STRFTIME=1 -DHAVE_VSPRINTF=1 -DHAVE_REGCOMP=1 -DHAVE_RE_COMP=1 -DHAVE_RE_EXEC= 1 -DHAVE_REGEXEC=1 -DHAVE_SRAND48=1 -DHAVE_SRAND=1 -DHAVE_SRANDOM=1 -DUSE_KADM5 _API_VERSION=1 -I../../../include -I./../../../include -I../../../include/krb5 - I./../../../include/krb5 -O2 -march=pentium3 -pipe -fomit-frame-pointer -pthre ad -c randkey-test.c i686-pc-linux-gnu-gcc -L../../../lib -Wl,-rpath -Wl,/usr/lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -o randkey-test randkey-test.o \ -lkadm5srv -lkdb5 /usr/lib/libdb.so -lgssrpc -lgssapi_krb5 -lkrb5 -lk5c rypto -lcom_err -lkrb5support -lresolv ../../../lib/libkadm5srv.so: undefined reference to `__db185_open_4002' collect2: ld returned 1 exit status And here's why: (diff from db4.2/db_185.h to db4.3/db_185.h) @@ -164,23 +164,11 @@ } RECNOINFO; /* Re-define the user's dbopen calls. */ -#define dbopen __db185_open_4002 +#define dbopen __db185_open
Created attachment 60901 [details] MIT Kerberos 1.4.1 ebuild Attached is a mit-krb5-1.4.1 ebuild, which includes the above patch. The only other difference from 1.4-r1 is the removal of the telnet overflow epatch, since it is already applied in 1.4.1.
Either your patch should be used, or the DB_LIBS line should be changed to export DB_LIB="/usr/$(get_libdir)/libdb-4.2.so" or perhaps export DB_LIB="-ldb-4.2"
This package still does not have a dependency on sys-libs/db. This dependency should be added.
Created attachment 60918 [details] mit-krb5 1.4.1 with >=sys-libs/db-4 dep This ebuild requires >=sys-libs/db-4.0 Without that dependency, will it compile as-is on a system with db-3.x only, or even db-1.85 only?
part of the problem here is that when you upgrade db, /usr/include/db-185.h gets overwritten every time. So if you compiled this against db-4.1, and then upgraded to db-4.3, I don't think krb5's reaction to that change would be exceptionally good. We need to find a smoother way (or some sort of generic db4 header and link or something). for now, 1.4.1 in portage will be as you have outlined above, with just /usr/include/db-185.h, but I do not like it.
Perhaps we should remove all berkeley headers from /usr/include and only keep them in the subdirs. That would force packages to think about which headers they use. It would induce breakage though as many packages do not look in the proper places.