dev-lang/tk-8.4.11 fails to configure as shown below. I assume the problem is "too few arguments to function readdir_r", but it may be a similar bash-3.1 problem as encountered with tcl-8.4.11 (bug #117744.) >>> emerge (1 of 1) dev-lang/tk-8.4.11 to / >>> checksums files ;-) tk-8.4.11.ebuild >>> checksums files ;-) tk-8.4.6-r1.ebuild >>> checksums files ;-) tk-8.4.6.ebuild >>> checksums files ;-) tk-8.3.4-r1.ebuild >>> checksums files ;-) tk-8.4.9.ebuild >>> checksums files ;-) files/digest-tk-8.4.9 >>> checksums files ;-) files/digest-tk-8.4.11 >>> checksums files ;-) files/remove-control-v-8.4.9.diff >>> checksums files ;-) files/tk-8.4.9-man.patch >>> checksums files ;-) files/tk-8.4.11-multilib.patch >>> checksums files ;-) files/digest-tk-8.4.6 >>> checksums files ;-) files/digest-tk-8.4.6-r1 >>> checksums files ;-) files/tk-wm-maxsize.patch >>> checksums files ;-) files/remove-control-v-8.4.diff >>> checksums files ;-) files/digest-tk-8.3.4-r1 >>> checksums files ;-) files/remove-control-v.diff >>> checksums src_uri ;-) tk8.4.11-src.tar.gz * * PLEASE NOTE: You are compiling tk-8.4.11 with * threading enabled. * Threading is not supported by all applications * that compile against tcl. You use threading at * your own discretion. * >>> Unpacking source... >>> Unpacking tk8.4.11-src.tar.gz to /var/tmp/portage/tk-8.4.11/work * Applying remove-control-v-8.4.9.diff ... [ ok ] * Applying tk-8.4.9-man.patch ... [ ok ] * Applying tk-8.4.11-multilib.patch ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/tk-8.4.11/work/tk8.4.11 ... ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-tcl=/usr/lib64 --enable-threads --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu creating cache ./config.cache checking for Tcl configuration... found /usr/lib64/tclConfig.sh checking for existence of /usr/lib64/tclConfig.sh... loading checking whether to use symlinks for manpages... no checking whether to compress the manpages... no checking whether to add a package name suffix for the manpages... no checking for gcc... x86_64-pc-linux-gnu-gcc checking whether the C compiler (x86_64-pc-linux-gnu-gcc -march=athlon64 -O3 -ftracer -pipe ) works... yes checking whether the C compiler (x86_64-pc-linux-gnu-gcc -march=athlon64 -O3 -ftracer -pipe ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E checking for unistd.h... yes checking for limits.h... yes checking if the compiler understands -pipe... yes checking for building with threads... yes (threaded core) checking for pthread_mutex_init in -lpthread... yes checking for pthread_attr_setstacksize... yes checking for pthread_atfork... yes checking for readdir_r... yes checking how many args readdir_r takes... 3 checking how to build libraries... shared checking for ranlib... ranlib checking if 64bit support is requested... no checking if 64bit Sparc VIS support is requested... no checking system version (for dynamic loading)... ./configure: line 5963: syntax error near unexpected token `(' ./configure: line 5963: ` case `(ac_space=' '; set | grep ac_space) 2>&1` in' !!! Please attach the following file when filing a report to bugs.gentoo.org: !!! /var/tmp/portage/tk-8.4.11/work/tk8.4.11/unix/config.log !!! ERROR: dev-lang/tk-8.4.11 failed. !!! Function econf, Line 489, Exitcode 0 !!! econf failed !!! If you need support, post the topmost build error, NOT this status message. Contents of /var/tmp/portage/tk-8.4.11/work/tk8.4.11/unix/config.log: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. configure:586: checking for Tcl configuration configure:667: checking for existence of /usr/lib64/tclConfig.sh configure:742: checking whether to use symlinks for manpages configure:754: checking whether to compress the manpages configure:777: checking whether to add a package name suffix for the manpages configure:805: checking for gcc configure:918: checking whether the C compiler (x86_64-pc-linux-gnu-gcc -march=athlon64 -O3 -ftracer -pipe ) works configure:934: x86_64-pc-linux-gnu-gcc -o conftest -march=athlon64 -O3 -ftracer -pipe conftest.c 1>&5 configure:960: checking whether the C compiler (x86_64-pc-linux-gnu-gcc -march=athlon64 -O3 -ftracer -pipe ) is a cross-compiler configure:965: checking whether we are using GNU C configure:974: x86_64-pc-linux-gnu-gcc -E conftest.c configure:993: checking whether x86_64-pc-linux-gnu-gcc accepts -g configure:1026: checking how to run the C preprocessor configure:1047: x86_64-pc-linux-gnu-gcc -E conftest.c >/dev/null 2>conftest.out configure:1109: checking for unistd.h configure:1119: x86_64-pc-linux-gnu-gcc -E conftest.c >/dev/null 2>conftest.out configure:1109: checking for limits.h configure:1119: x86_64-pc-linux-gnu-gcc -E conftest.c >/dev/null 2>conftest.out configure:1154: checking if the compiler understands -pipe configure:1165: x86_64-pc-linux-gnu-gcc -pipe -c -march=athlon64 -O3 -ftracer -pipe conftest.c 1>&5 configure:1185: checking for building with threads configure:1227: checking for pthread_mutex_init in -lpthread configure:1246: x86_64-pc-linux-gnu-gcc -pipe -o conftest -march=athlon64 -O3 -ftracer -pipe conftest.c -lpthread 1>&5 configure:1467: checking for pthread_attr_setstacksize configure:1495: x86_64-pc-linux-gnu-gcc -pipe -o conftest -march=athlon64 -O3 -ftracer -pipe conftest.c -lpthread 1>&5 configure:1522: checking for pthread_atfork configure:1550: x86_64-pc-linux-gnu-gcc -pipe -o conftest -march=athlon64 -O3 -ftracer -pipe conftest.c -lpthread 1>&5 configure:1578: checking for readdir_r configure:1606: x86_64-pc-linux-gnu-gcc -pipe -o conftest -march=athlon64 -O3 -ftracer -pipe conftest.c 1>&5 configure:1632: checking how many args readdir_r takes configure:1654: x86_64-pc-linux-gnu-gcc -pipe -c -march=athlon64 -O3 -ftracer -pipe conftest.c 1>&5 configure: In function `main': configure:1650: error: too few arguments to function `readdir_r' configure: failed program was: #line 1639 "configure" #include "confdefs.h" #include <stdlib.h> #include <sys/types.h> #ifdef NO_DIRENT_H # include <sys/dir.h> /* logic from tcl/compat/dirent.h * # define dirent direct * */ #else # include <dirent.h> #endif int main() { readdir_r(NULL, NULL); ; return 0; } configure:1685: x86_64-pc-linux-gnu-gcc -pipe -c -march=athlon64 -O3 -ftracer -pipe conftest.c 1>&5 configure:1725: checking how to build libraries configure:1764: checking for ranlib configure:1796: checking if 64bit support is requested configure:1816: checking if 64bit Sparc VIS support is requested configure:1840: checking system version (for dynamic loading) Output from "emerge info": Portage 2.1_pre3-r1 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15-gentoo x86_64) ================================================================= System uname: 2.6.15-gentoo x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.12.0_pre13 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 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="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O3 -ftracer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -O3 -ftracer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks nostrip sfperms strict" GENTOO_MIRRORS="http://bower/gentoo ftp://ftp.iinet.com.au/pub/Gentoo ftp://ftp.swin.edu.au/gentoo http://distfiles.gentoo.org/" LANG="en_AU" LC_ALL="en_AU" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://bower/gentoo-portage" USE="amd64 X a52 aac alsa arts audiofile bash-completion berkdb bitmap-fonts bzip2 bzlib cdparanoia cdr chroot crypt cups curl dpms dts dv dvb dvd dvdr dvdread eds emboss encode exif expat fam fame fbcon ffmpeg flac foomaticdb fortran gd gdbm gif gimpprint glut gmp gnome gphoto2 gpm gps gstreamer gtk gtk2 hal idn ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k junit kde lcms lirc lm_sensors lzo lzw lzw-tiff mad mhash mmap mng motif mp3 mpeg mpeg4 musepack musicbrainz ncurses nls nptl nptlonly nvidia ogg oggvorbis openal opengl pam pcre pda pdflib perl pic png ppds python qt quicktime readline real recode sdk sdl slang sndfile snmp speex spell sqlite ssl svg tcpd test theora threads tiff truetype truetype-fonts type1-fonts udev usb userlocales vcd vorbis wmf xine xml xml2 xpm xprint xscreensaver xv xvid xvmc yv12 zlib elibc_glibc kernel_linux userland_GNU video_cards_nvidia" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
*** Bug 118076 has been marked as a duplicate of this bug. ***
It seems to be related to bash-3.1 as I solved this problem today by going back to bash-3.0-r14.
Placing the following in tk-8.4.11.ebuild at line 47 fixes without having to downgrade bash. # bug 117982 sed -i -e "s/relid'/relid/" "${S}"/unix/configure Sorry don't know how to write a diff yet.
Created attachment 76461 [details, diff] Proposed patch for tk-8.4.11.ebuild
Thanks Steve; that worked for me. The corresponding patch for the ebuild is attached.
tk-8.4.11-r1 in cvs.