This bug is closely related to #124405. The fix from #124405 doesn't help... mit-krb5-setupterm.patch is being applied correctly, but does not seem to fix my problem. I have one machine which fails to build (and has sys-libs/libtermcap-compat-2.0.8-r1 installed). I have another machine which succeeds (and does not have sys-libs/libtermcap-compat installed). On the machine with libtermcap-compat installed, the configure script detects "main" in -ltermcap, and does not go on to try "setupterm" in either -ltermcap, or in -lncurses. Here's the config output: checking for term.h... yes checking for main in -ltermcap... yes checking whether struct sockaddr contains sa_len... (cached) no checking for type struct sockaddr_storage... (cached) yes checking for sys/types.h... (cached) yes checking for sys/socket.h... (cached) yes checking for netinet/in.h... (cached) yes checking for netdb.h... (cached) yes checking for inet_ntop... (cached) yes checking for inet_pton... (cached) yes checking for getnameinfo... (cached) yes checking for getaddrinfo... (cached) yes checking for IPv6 compile-time support... (cached) yes checking for setupterm... no And the same spot on the good machine: checking for term.h... yes checking for main in -ltermcap... no checking for setupterm in -lcurses... yes checking whether struct sockaddr contains sa_len... (cached) no checking for type struct sockaddr_storage... (cached) yes checking for sys/types.h... (cached) yes checking for sys/socket.h... (cached) yes checking for netinet/in.h... (cached) yes checking for netdb.h... (cached) yes checking for inet_ntop... (cached) yes checking for inet_pton... (cached) yes checking for getnameinfo... (cached) yes checking for getaddrinfo... (cached) yes checking for IPv6 compile-time support... (cached) yes checking for setupterm... yes This causes the same results as in #124405. HAVE_SETUPTERM is not defined, and the build fails: i686-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DKRB5_PRIVATE=1 -DKRB5_DEPRECATE D=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP_REALM=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_LIBRESOLV=1 -DHAVE_RES_NINIT=1 -DHAVE_RES_NCLOSE=1 -DHAVE_RES_NSEARCH=1 -DHAVE_DN_SKIPN AME=1 -DHAVE_RES_SEARCH=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_SETE NV=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_SE LECT_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_VFOR K=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_PARSE TOS_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./.. -march=pentium3 -O2 -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
complete build logs are available: http://squawk.glines.org/135288-fail.txt http://squawk.glines.org/135288-pass.txt
Uhm, did you try this without confcache?
(In reply to comment #2) > Uhm, did you try this without confcache? I do not use confcache. Are you suggesting I should? Portage 2.1_rc3-r5 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-ck10 i686) ================================================================= System uname: 2.6.16-ck10 i686 Intel(R) Pentium(R) M processor 1.70GHz Gentoo Base System version 1.12.0 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 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-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks fixpackages metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ccccom.com/ http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" PKGDIR="/usr/portage//packages/x86/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/" PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-overlay/perl-catalyst /usr/local/portage-overlay/nwn-cep /usr/local/portage-overlay/ocfs2 /usr/local/portage-overlay/tipc" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac acpi adns aio akode alsa amr ansi apache2 arts atlas avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cpanplus crypt cups curl dbus dga divx4linux dlloader doc dri dvd dvdread effects encode esd ethereal exscalibar fbcon fbdev ffmpeg fftw firefox flac flash foomaticdb gimp glut gnome gphoto2 gpm gstreamer gtk gtk2 gvim hardened hbci ifp infopipe ipod ipv6 ithreads jack java jpeg jpeg2k kerberos ldap libgda live lzo mad matroska mikmod mjpeg mmx mng modperl mozdevelop mozilla moznoirc mozsvg mp3 mp4 mpeg mplayer mpm-worker musicbrainz ncurses netjack network nfsv4 nptl nptlonly nsplugin ofx ogg oggvorbis opengl pam pcmcia pdf perl pic plugin png pnp ppds python quicktime readline real rsync rtsp ruby scanner sdl speex spell sse sse2 ssl subtitles svg tcltk tcpd test theora threads tiff truetype uim unicode usb userlocales vdr vorbis vorbis-psy win32codecs x264 x86 xine xinerama xml xml2 xmms xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_ati video_cards_radeon" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Meh, so - where does this (cached) stuff come from?
FEATURES=confcache fails to build in the same way. Reopening bug.
(In reply to comment #4) > Meh, so - where does this (cached) stuff come from? > See the complete build log. The output I quoted initially was from a subdirectory configure, in appl/telnet/. Note the relevant lines about termcap and setupterm were not cached...
(In reply to comment #5) > FEATURES=confcache fails to build in the same way. Reopening bug. Uh, I've asked you to _disable_ whatever cache that's bringing the (cached) stuff in there. Oh well, I give up. BTW, attach the logs here, don't refer to third-party links that tends to get broken in a couple of days.
(In reply to comment #7) > Uh, I've asked you to _disable_ whatever cache that's bringing the (cached) > stuff in there. Oh well, I give up. BTW, attach the logs here, don't refer to > third-party links that tends to get broken in a couple of days. I've worked with projects in the past who tend to complain about large attachments. The build logs are about 1 meg each, so I put them on my site out of politeness, and I don't intend to remove them. Does gentoo's bugzilla have an attachment-size restriction? If not, I'm happy to upload such things directly from now on. Incidentally, the cached stuff is there because a higher-level directory's configure already checked it, and all the subdirectories share the same config.cache. I'm sorry for not being explicit about this; I assumed people reading the description would be familiar with the previous bug, #124405, and the patch to apps/telnet/configure.in which supposedly fixed #124405. When I saw your comment "Uhm, did you try this without confcache?", I wasn't sure whether you were implying I had it on and shouldn't have, or the problem was that I didn't have it on. Since the comment was unclear, I tried both, just to be sure. I'm sorry if I annoyed or offended you. Thanks for your help!
Created attachment 88216 [details] log of failed build Attaching logfile, at Jakub's request.
Hi, I've got the same problem, i.e. I have libtermcap-compat installed and building mit-krb5-1.4.3-r1 broke. I ""fixed"" it by patching the telnet.c and adding the missing const. I'm sure the correct way is to fix the autoconf scripts, but I'm not very familiar with them. For whomever this may help, here is the patch and build (I have this build on my system in /usr/local/portage): sinbad mit-krb5 # cat files/mit-krb5-setupterm_const.patch diff -ru krb5-1.4.3.orig/src/appl/telnet/telnet/telnet.c krb5-1.4.3/src/appl/telnet/telnet/telnet.c --- krb5-1.4.3.orig/src/appl/telnet/telnet/telnet.c 2005-03-29 23:24:45.000000000 +0200 +++ krb5-1.4.3/src/appl/telnet/telnet/telnet.c 2006-06-08 03:08:28.000000000 +0300 @@ -777,7 +777,7 @@ /*ARGSUSED*/ static int setupterm(tname, fd, errp) - char *tname; + const char *tname; int fd, *errp; { if (tgetent(termbuf, tname) == 1) { sinbad mit-krb5 # diff mit-krb5-1.4.3-r2.ebuild /usr/portage/app-crypt/mit-krb5/mit-krb5-1.4.3-r1.ebuild 38d37 < epatch ${FILESDIR}/${PN}-setupterm_const.patch
(In reply to comment #10) > I ""fixed"" it by patching the telnet.c and adding the missing const. I'm sure > the correct way is to fix the autoconf scripts, but I'm not very familiar with > them. What's happening here is one bug (autoconf confused by libtermcap-compat) is exposing another bug (prototype is missing a const). In my opinion, both bugs need to be fixed, even if fixing the autoconf bug will hide the prototype bug. Maintainers, if I can find some extra time and come up with a patch to fix autoconf, will you consider applying *both* my patch and Alon's? Mark
Created attachment 88689 [details, diff] patch ebuild to call autoreconf I've done a little more work on this. I now believe this bug is a dup of #124405, and that #124405 wasn't actually fixed. The mit-krb5-setupterm.patch from that bug *is* the right fix, but it wasn't the *whole* fix. It is also necessary to run autoreconf, to pull the changes to appl/telnet/configure.in into appl/telnet/configure. You'll note the ebuilds found in that bug contain a call to util/reconf --force, which does this. And you'll note the current mit-krb5 ebuild in portage does not. If I add the reconf line to the ebuild, it builds successfully. Hoewver, I noticed the reconf script takes a long time. On this box, I was able to just reconf the appl/telnet/ subdirectory, which took considerably less time. The attached patch does this... I'm not sure whether that'll work for all versions of autoconf, but it works great here. With this patch, the relevant portion of configure output looks like this: checking for term.h... yes checking for setupterm in -ltermcap... no checking for setupterm in -lcurses... yes checking whether struct sockaddr contains sa_len... (cached) no checking for type struct sockaddr_storage... (cached) yes checking for sys/types.h... (cached) yes checking for sys/socket.h... (cached) yes checking for netinet/in.h... (cached) yes checking for netdb.h... (cached) yes checking for inet_ntop... (cached) yes checking for inet_pton... (cached) yes checking for getnameinfo... (cached) yes checking for getaddrinfo... (cached) yes checking for IPv6 compile-time support... (cached) yes checking for setupterm... yes Note that it's now checking for setupterm() in -ltermcap, whereas it was checking for main() previously. Full build log at: http://squawk.glines.org/135288-fixed.txt
Thanks Mark. Sorry for the wait. In portage now.
*** Bug 137732 has been marked as a duplicate of this bug. ***
*** Bug 137840 has been marked as a duplicate of this bug. ***