Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43874 - openssh does not compile with kerberos (heimdal error)
Summary: openssh does not compile with kerberos (heimdal error)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
: 44300 44723 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-06 06:27 UTC by Florian Effenberger
Modified: 2004-03-30 06:35 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
requested output and emerge info (heimdal.tar.bz2,38.74 KB, application/octet-stream)
2004-03-26 23:56 UTC, Justin Findlay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Effenberger 2004-03-06 06:27:34 UTC
Unfortunately, the system I'm testing on has currently no access via SSH so I cannot paste all details, but:

The snapshot from March 6th has a bug: if you have kerberos and krb4 in the USE flags and emerge openssh, you receive an error within the heimdal package. It cannot be compiled.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Georg Müller 2004-03-09 13:16:44 UTC
Try to emerge app-crypt/mit-krb5

This ebuild also provides virtual/krb5
Comment 2 Florian Effenberger 2004-03-10 03:17:38 UTC
Thanks for that information!
I guess its a bug in the package then and not on my side, right?
Comment 3 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-10 05:30:09 UTC
I need emerge info, configure output and compile error to move forward with this bug, please attach.
Comment 4 Florian Effenberger 2004-03-10 07:03:58 UTC
Sorry, I don't have it anymore. My fault.
My test system has been compiled now by removing the problematic USE-flags, so I cannot send any information. :-(
Comment 5 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-12 06:59:30 UTC
okay, please re-open this bug if you encounter the same error.
Comment 6 Tom Dickson 2004-03-14 21:34:05 UTC
I can get it to happen!

Here's the output as I tried to "emerge system" during an install from 2004.0:

gcc  -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../lib/roken -I../../lib/roken -I../asn1 -I./../asn1 -I/usr/include    -Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -O3 -march=athlon -pipe -fomit-frame-pointer -c `test -f 'convert_db.c' || echo './'`convert_db.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../lib/roken -I../../lib/roken -I../asn1 -I./../asn1 -I/usr/include -Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -O3 -march=athlon -pipe -fomit-frame-pointer -c hdb_err.c -o hdb_err.o
echo timestamp > hdb_err.lo
 cp ./hdb.h ../../include/hdb.h
 cp ./hdb_err.h ../../include/hdb_err.h
 cp ./hdb_asn1.h ../../include/hdb_asn1.h
 cp ./hdb-protos.h ../../include/hdb-protos.h
 cp ./hdb-private.h ../../include/hdb-private.h
db3.c: In function `DB_seq':
db3.c:90: warning: unused variable `d'
db3.c: In function `DB_open':
db3.c:265: warning: passing arg 2 of pointer to function from incompatible pointer type
db3.c:265: warning: passing arg 4 of pointer to function makes pointer from integer without a cast
db3.c:265: error: too few arguments to function
db3.c:268: warning: passing arg 2 of pointer to function from incompatible pointer type
db3.c:268: warning: passing arg 4 of pointer to function makes pointer from integer without a cast
db3.c:268: error: too few arguments to function
distcc[17340] ERROR: compile on laptop failed
make[3]: *** [db3.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../lib/roken -I../../lib/roken -I../asn1 -I./../asn1 -I/usr/include -Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -O3 -march=athlon -pipe -fomit-frame-pointer -c asn1_GENERATION.c -o asn1_GENERATION.o
echo timestamp > asn1_GENERATION.lo
echo timestamp > asn1_hdb_entry.lo
make[3]: Leaving directory `/var/tmp/portage/heimdal-0.6/work/heimdal-0.6/lib/hdb'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/heimdal-0.6/work/heimdal-0.6/lib/hdb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/heimdal-0.6/work/heimdal-0.6/lib'
make: *** [all-recursive] Error 1
 
!!! ERROR: app-crypt/heimdal-0.6 failed.
!!! Function src_compile, Line 65, Exitcode 2
!!! (no error message)
 
Here's what emerge wanted to bring into the world:

livecd usr # emerge -p system
 
These are the packages that I would merge, in order:
 
Calculating system dependencies ...done!
[ebuild  N    ] app-crypt/heimdal-0.6
[ebuild  N    ] net-misc/openssh-3.7.1_p2-r2
[ebuild  N    ] sys-fs/devfsd-1.3.25-r3

And here's the emerge info:

livecd usr # emerge info
Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.1-gentoo-r2)
=================================================================
System uname: 2.6.1-gentoo-r2 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.13
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=athlon -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc sandbox"
GENTOO_MIRRORS="ftp://gentoo.ccccom.com http://mirror.tucdemonic.org/gentoo/ http://gentoo.mirrors.pair.com/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl apm arts avi berkdb crypt cups dvd encode foomaticdb gdbm gif gpm imlib ipv6 jpeg kde kerberos ldap libg++ libwww mad mikmod mmx mpeg ncurses nls ntpl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell sse ssl svga tcpd truetype unicode x86 xml2 xmms xv zlib"

PLEASE NOTE THAT I'M USING DISTCC! Perhaps this could explain the issue.

Note that this also happened on another machine, but I emerged mit-krb5 and continued, which is what I'll do now. (I need my ssh!)

Hope this helps.
Comment 7 Tom Dickson 2004-03-14 21:40:58 UTC
http://bugs.gentoo.org/show_bug.cgi?id=44723 is the same bug, with more juicy details!
Comment 8 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-18 02:14:08 UTC
.
Comment 9 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-18 02:56:52 UTC
*** Bug 44300 has been marked as a duplicate of this bug. ***
Comment 10 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-18 02:57:06 UTC
*** Bug 44723 has been marked as a duplicate of this bug. ***
Comment 11 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-18 03:01:15 UTC
I need the following:

* output from configure
* config.log
* output from ls -l /usr/include/db*
* output from head -n 3 /var/db/pkg/sys-libs/db*/*.ebuild

Thanks!
Comment 12 Joe Khoobyar 2004-03-21 12:31:17 UTC
Let me note that I had this problem as well.  All that I needed to do was to emerge db-3.x and then heimdal merged succesfully.  So the real problem is in fact that heimdal's dependencies are broken.
Comment 13 Justin Findlay 2004-03-26 23:56:25 UTC
Created attachment 28136 [details]
requested output and emerge info

* output from configure
* config.log
* output from 'ls -l /usr/include/db*'
* output from 'head -n 3 /var/db/pkg/sys-libs/db*/*.ebuild'
* output from 'emerge info'
Comment 14 Dustin Parr 2004-03-27 22:57:06 UTC
I believe the problem is that heimdal 0.6 doesn't support the API change for db-4.1.  I found two patches (inline below) which are now in the current cvs snapshot of heimdal which fixed the problem for me.  Hope this helps.



Index: db3.c
===================================================================
RCS file: /home/project/cvs/heimdal/lib/hdb/db3.c,v
retrieving revision 1.1.1.1
retrieving revision 1.8
diff -u -r1.1.1.1 -r1.8
--- db3.c	2002/08/11 23:53:56	1.1.1.1
+++ db3.c	2003/08/23 08:42:38	1.8
@@ -87,7 +87,6 @@
 DB_seq(krb5_context context, HDB *db,
        unsigned flags, hdb_entry *entry, int flag)
 {
-    DB *d = (DB*)db->db;
     DBT key, value;
     DBC *dbcp = db->dbc;
     krb5_data key_data, data;
@@ -262,10 +261,18 @@
     }
     db_create(&d, NULL, 0);
     db->db = d;
+#if (DB_VERSION_MAJOR > 3) && (DB_VERSION_MINOR > 0)
+    if ((ret = d->open(db->db, NULL, fn, NULL, DB_BTREE, myflags, mode))) {
+#else
     if ((ret = d->open(db->db, fn, NULL, DB_BTREE, myflags, mode))) {
+#endif
       if(ret == ENOENT)
 	/* try to open without .db extension */
+#if (DB_VERSION_MAJOR > 3) && (DB_VERSION_MINOR > 0)
+	if (d->open(db->db, NULL, db->name, NULL, DB_BTREE, myflags, mode)) {
+#else
 	if (d->open(db->db, db->name, NULL, DB_BTREE, myflags, mode)) {
+#endif
 	  free(fn);
 	  krb5_set_error_string(context, "opening %s: %s",
 				db->name, strerror(ret));



Index: ndbm_wrap.c
===================================================================
RCS file: /home/project/cvs/heimdal/lib/roken/ndbm_wrap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- ndbm_wrap.c	2002/08/12 01:08:42	1.1.1.1
+++ ndbm_wrap.c	2003/08/23 08:42:39	1.3
@@ -165,7 +165,12 @@
 	free(fn);
 	return NULL;
     }
+
+#if (DB_VERSION_MAJOR > 3) && (DB_VERSION_MINOR > 0)
+    if(db->open(db, NULL, fn, NULL, DB_BTREE, myflags, mode) != 0) {
+#else
     if(db->open(db, fn, NULL, DB_BTREE, myflags, mode) != 0) {
+#endif
 	free(fn);
 	db->close(db, 0);
 	return NULL;
Comment 15 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-30 01:13:45 UTC
I've commited a patch that extends the search for the db.h include file (now also checks 4.1 and 4.2 subdirs). Please test.
Comment 16 Dustin Parr 2004-03-30 06:35:58 UTC
Rebuilt both heimdal and openssh on top of it.  Both worked great.  Thanks.