Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116784 - mit-krb5 1.4.1-r2 won't compile
Summary: mit-krb5 1.4.1-r2 won't compile
Status: RESOLVED DUPLICATE of bug 124405
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords:
: 115402 123069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-26 07:31 UTC by Michael Baer
Modified: 2006-05-21 13:59 UTC (History)
6 users (show)

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


Attachments
Fix for Compile Issue from Fedora (krb5-1.4-ncurses.patch,472 bytes, patch)
2006-02-07 07:51 UTC, Dominic Battre
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Baer 2005-12-26 07:31:56 UTC
emerge of mit-krb5-1.4.1-r2 will always fail with the following message:

gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DKRB5_PRIVATE=1 -DKRB5_DEPRECATED=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 -DDESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1 -DHAVE_PTHREAD=1 -DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB=1 -DHAVE_STRCASECMP=1 -DHAVE_STRDUP=1 -DHAVE_SETSID=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_GETOPT=1 -DHAVE_HERROR=1 -DHAVE_SETENV=1 -DHAVE_UNSETENV=1 -DHAVE_GETENV=1 -DHAVE_VSNPRINTF=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_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ARPA_NAMESER_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_CURSES_H=1 -DHAVE_UTMP_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DHAVE_STDARG_H=1 -DHAVE_TERM_H=1 -DTERMCAP=1 -DHAVE_STRUCT_SOCKADDR_STORAGE=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_NETDB_H=1 -DHAVE_INET_NTOP=1 -DHAVE_INET_PTON=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GETADDRINFO=1 -DKRB5_USE_INET6=1 -DUSE_TERMIO=1 -DNEED_PARSETOS_PROTO=1 -DPOSIX_SIGNALS=1 -DHAVE_REGCOMP=1 -DTERMCAP=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LIBUTIL=1  -DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON -I../../../include -I./../../../include -I../../../include/krb5 -I./../../../include/krb5 -I.. -I./..  -O2 -mtune=athlon-xp -pipe -pthread -c telnet.c telnet.c:780: warning: static declaration of 'setupterm' follows non-static declaration
/usr/include/term.h:758: warning: previous declaration of 'setupterm' was here
telnet.c: In function `setupterm':
telnet.c:782: error: argument "tname" doesn't match prototype
/usr/include/term.h:758: error: prototype declaration
make[3]: *** [telnet.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/mit-krb5-1.4.1-r2/work/krb5-1.4.1/src/appl/telnet/telnet'
make[2]: *** [all-recurse] Error 1
make[2]: Leaving directory `/var/tmp/portage/mit-krb5-1.4.1-r2/work/krb5-1.4.1/src/appl/telnet'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/var/tmp/portage/mit-krb5-1.4.1-r2/work/krb5-1.4.1/src/appl'
make: *** [all-recurse] Error 1

!!! ERROR: app-crypt/mit-krb5-1.4.1-r2 failed.
!!! Function src_compile, Line 60, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


Problem (as far as I can see):

The prototype in /usr/include/term.h (from package ncurses 5.5-r1) looks like this:
extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *);

but it's called like this way:
static int setupterm(char *tname, int fd, int *errp);


I've changed (file work/krb5-1.4.1/src/appl/telnet/telnet/telnet.c , around line 782 )
#ifndef HAVE_SETUPTERM
char termbuf[1024];

        /*ARGSUSED*/
static int
setupterm(tname, fd, errp)
        char *tname;
        int fd, *errp;
{

to:

#ifndef HAVE_SETUPTERM
char termbuf[1024];

        /*ARGSUSED*/
static int
setupterm(tname, fd, errp)
        NCURSES_CONST char *tname;
        int fd, *errp;
{

but I've absolutely no idea, if this change causes any problems (I don't need ktelnet, so it's not a real problem for me - at least I hope so ;-) ).

--------------------------
# emerge --info
Portage 2.1_pre2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14.2 i686)
=================================================================
System uname: 2.6.14.2 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.12.0_pre12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.2.3-r6, 2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control /var/spool/fax/etc /var/www/localhost/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -mtune=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks keepwork loadpolicy sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ndlug.nd.edu/pub/gentoo/"
LANG="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/my-ebuilds /usr/local/overlays/java-experimental"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X a52 aalib acl acpi alsa apache2 apm arts audiofile avi bcmath berkdb bitmap-fonts bonobo bzip2 calendar caps cdr cgi cli crypt cups curl dba directfb doc dvd eds emboss encode esd ethereal exif expat fam ffmpeg flac flatfile foomaticdb fortran freetype gd gdbm geoip gif glitz glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml guile hal iconv idn imagemagick imap imlib ipv6 java jpeg junit kde kerberos lcms ldap libcaca libg++ libwww lirc mad maildir mhash mikmod ming mmx mng motif mozilla mp3 mpeg mysql ncurses nls objc offensive ogg oggvorbis opengl oss pam pcre pdflib perl php png postgres python qt quicktime readline recode ruby samba scanner sdl session slang soap sockets spell sqlite sse ssl svg svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vhosts vorbis win32codecs wmf xine xml xml2 xmms xsl xv xvid zlib elibc_glibc kernel_linux linguas_de userland_GNU"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 1 Axel Dyks 2006-01-30 11:09:35 UTC
NCURSES_CONST seems to be an empty macro in "term.h" of
"sys-libs/ncurses-5.4-r6" (x86 stable)

For you have emerged "-5.5-r1" (~x86) this might be related
to http://bugs.gentoo.org/show_bug.cgi?id=111961

Axel

Comment 2 Axel Dyks 2006-01-30 17:25:55 UTC
Addition:
    The question is:
      Why did "configure" find out that you have "TERM_H",
      but not "SETUPTERM"?

    This produces the following pathological case:
      * "<term.h>" includes the prototype declaration
        of the libncurses "setupterm" function
        /* --enable-const ==> #define NCURSES_CONST const */
      * "telnet.c" provides it's own (static == private)
        version of the same function, but with a different
        prototype.

    Although I think that "--enable-const" shouldn't be forced
    in the new "ncurses" ebuild (==> != POSIX prototypes)
    the actual problem is configure's wrong/inconsistent
    guess of your system/ncurses capabilities.  

Axel
Comment 3 Horst Schirmeier 2006-01-30 17:37:42 UTC
Regarding comment #2:

> Although I think that "--enable-const" shouldn't be forced
> in the new "ncurses" ebuild (==> != POSIX prototypes)

What do the ncurses headers have to do with the POSIX standard?

> the actual problem is configure's wrong/inconsistent
> guess of your system/ncurses capabilities.

Agreed. This is something to be fixed with mit-krb5.
Comment 4 Axel Dyks 2006-01-30 18:30:13 UTC
> What do the ncurses headers have to do with the POSIX standard?

More precisely: X/Open curses

* http://dickey.his.com/ncurses/ncurses.faq.html

* http://www.opengroup.org/onlinepubs/7990989775/xcurses/setupterm.html

:-) Axel
Comment 5 Horst Schirmeier 2006-01-31 10:10:46 UTC
Okay, then the X/Open Curses interface definition sucks, and there should be a discussion (elsewhere) whether interface sanity outweighs adhering buggy standards or maybe not.

Anyways, mit-krb5 must not use its own interface definition if there's one in the ncurses headers, at least in this point we are on the same side, I guess. ;)
Comment 6 Dominic Battre 2006-02-07 07:51:35 UTC
Created attachment 79123 [details, diff]
Fix for Compile Issue from Fedora

The attached patch from the RPM file
http://ftp.belnet.be/linux/fedora/linux/development/ppc/SRPMS/krb5-1.4.3-3.src.rpm fixes the compile issue.  And of course: If it compiles, it is correct. ;-)
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2006-02-14 09:04:34 UTC
*** Bug 115402 has been marked as a duplicate of this bug. ***
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-02-16 12:42:42 UTC
*** Bug 123069 has been marked as a duplicate of this bug. ***
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2006-05-21 13:59:35 UTC
*** This bug has been marked as a duplicate of 124405 ***