the package dev-tcltk can't be compiled in a Gentoo linux, at least, running a 2.6 kernel and a current glibc. I say that because it seems to be related to how functions from those packages are being called, maybe they were different in an older version. Reproducible: Always Steps to Reproduce: 1. emerge expect Actual Results: It ends up with this error: gcc -pipe -c -I. -I. -I/usr/lib/tcl8.3/include/generic -I/usr/X11R6/include -DEXP_VERSION=\"5.37.1\" -DSCRIPTDIR=\"/usr/lib/expect5.37\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.37\" -DTCL_DEBUGGER -DUSE_NON_CONST -O2 -march=athlon-xp -fomit-frame-pointer -pipe -DDFLT_STTY="\"sane\"" expect.c exp_command.c: In function `expSetpgrp': exp_command.c:519: error: too many arguments to function `setpgrp' exp_command.c: In function `Exp_SpawnCmd': exp_command.c:1218: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c: In function `Exp_WaitCmd': exp_command.c:2566: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c:2600: warning: passing arg 2 of `waitpid' from incompatible pointer type make: *** [exp_command.o] Error 1 make: *** Waiting for unfinished jobs.... if [ "xlibexpect5.37.a" != "xlibexpect5.37.so" ] ; then \ if [ ! -d shared ] ; then \ mkdir shared ; \ else true; fi ; \ gcc -pipe -c -I. -I. -I/usr/lib/tcl8.3/include/generic -I/usr/X11R6/include -DEXP_VERSION=\"5.37.1\" -DSCRIPTDIR=\"/usr/lib/expect5.37\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.37\" -DTCL_DEBUGGER -DUSE_NON_CONST -O2 -march=athlon-xp -fomit-frame-pointer -pipe -fPIC -DDFLT_STTY="\"sane\"" expect.c -o shared/expect.o ; \ fi make: *** Waiting for unfinished jobs.... !!! ERROR: dev-tcltk/expect-5.37.1-r2 failed. !!! Function src_compile, Line 89, Exitcode 2 !!! (no error message) The problematica line exp_command.c:519 (and a little arround it) contains: #ifdef SETPGRP_VOID
the package dev-tcltk can't be compiled in a Gentoo linux, at least, running a 2.6 kernel and a current glibc. I say that because it seems to be related to how functions from those packages are being called, maybe they were different in an older version. Reproducible: Always Steps to Reproduce: 1. emerge expect Actual Results: It ends up with this error: gcc -pipe -c -I. -I. -I/usr/lib/tcl8.3/include/generic -I/usr/X11R6/include -DEXP_VERSION=\"5.37.1\" -DSCRIPTDIR=\"/usr/lib/expect5.37\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.37\" -DTCL_DEBUGGER -DUSE_NON_CONST -O2 -march=athlon-xp -fomit-frame-pointer -pipe -DDFLT_STTY="\"sane\"" expect.c exp_command.c: In function `expSetpgrp': exp_command.c:519: error: too many arguments to function `setpgrp' exp_command.c: In function `Exp_SpawnCmd': exp_command.c:1218: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c: In function `Exp_WaitCmd': exp_command.c:2566: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c:2600: warning: passing arg 2 of `waitpid' from incompatible pointer type make: *** [exp_command.o] Error 1 make: *** Waiting for unfinished jobs.... if [ "xlibexpect5.37.a" != "xlibexpect5.37.so" ] ; then \ if [ ! -d shared ] ; then \ mkdir shared ; \ else true; fi ; \ gcc -pipe -c -I. -I. -I/usr/lib/tcl8.3/include/generic -I/usr/X11R6/include -DEXP_VERSION=\"5.37.1\" -DSCRIPTDIR=\"/usr/lib/expect5.37\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.37\" -DTCL_DEBUGGER -DUSE_NON_CONST -O2 -march=athlon-xp -fomit-frame-pointer -pipe -fPIC -DDFLT_STTY="\"sane\"" expect.c -o shared/expect.o ; \ fi make: *** Waiting for unfinished jobs.... !!! ERROR: dev-tcltk/expect-5.37.1-r2 failed. !!! Function src_compile, Line 89, Exitcode 2 !!! (no error message) The problematica line exp_command.c:519 (and a little arround it) contains: #ifdef SETPGRP_VOID (void) setpgrp(); #else (void) setpgrp(0,0); #endif Doing a simple grep: # grep SETPGRP_VOID * config.log:#define SETPGRP_VOID 1 config.status:${ac_dA}SETPGRP_VOID${ac_dB}SETPGRP_VOID${ac_dC}1${ac_dD} config.status:${ac_uA}SETPGRP_VOID${ac_uB}SETPGRP_VOID${ac_uC}1${ac_uD} configure:# following test sets SETPGRP_VOID if setpgrp takes 0 args, else takes 2 configure:#define SETPGRP_VOID 1 configure.in:# following test sets SETPGRP_VOID if setpgrp takes 0 args, else takes 2 exp_clib.c:#ifdef SETPGRP_VOID exp_command.c:#ifdef SETPGRP_VOID expect_cf.h:/* #undef SETPGRP_VOID */ /* if setpgrp takes 0 args */ expect_cf.h.in:#undef SETPGRP_VOID /* if setpgrp takes 0 args */ we can find that SETPGRP_VOID is not really being set anywhere (it is just not being unset, but that's not enough if it is not set). I added #define SETPGRP_VOID 1 to expect_cf.h and it compiled, but throwing the following warnings (which leads me to think that the same functionality is somehwere else, where it doesn't lead to an erro, but to a warning, which for the nature of the warning, might lead to inestability, segmentation faults, etc): exp_command.c: In function `Exp_SpawnCmd': exp_command.c:1218: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c: In function `Exp_WaitCmd': exp_command.c:2566: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c:2600: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c: In function `Exp_SpawnCmd': exp_command.c:1218: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c: In function `Exp_WaitCmd': exp_command.c:2566: warning: passing arg 2 of `waitpid' from incompatible pointer type exp_command.c:2600: warning: passing arg 2 of `waitpid' from incompatible pointer type Expected Results: Compile and install # emerge info Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-gentoo-r9) ================================================================= System uname: 2.6.7-gentoo-r9 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.4.16 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://128.213.5.34/gentoo/ ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X aalib acl acpi alsa apache2 apm arts audiofile avi berkdb cdr crypt cscope cups curl dvb dvd dvdr encode fam fftw flac foomaticdb gd gdbm gif ginac gmp gtk2 imagemagick imap imlib innodb ipv6 jabber jpeg kde ladcca lcms ldap libg++ libwww mad maildir mbox mcal mikmod mmx motif mozilla mpeg mysql ncurses nls odbc oggvorbis opengl oss pam pda pdflib perl plotutils png ppds python qt quicktime readline sasl scanner sdl slang slp speex spell ssl svga tcltk tcpd tetex theora tiff truetype unicode usb vhosts videos x86 xinerama xml xml2 xosd xv zeo zlib"
dev-tcltk/expect-5.37.1-r2 emerges fine here (gentoo-2.6.7-r12 with linux26-headers-2.6.7-r4, gcc-3.4.1, glibc-2.3.4.20040619-r1)
Sorry this bug has been sitting here looking idle... but I can't duplicate it on any of my machines. Now that we've moved to tcl 8.4 being stable... give it another try and let me know.
I can't reproduce, either.
Pupeno, Please retest and get back to us. Please post your results back to this bug and reopen it if necessary.
I'm seeing exactly the same error. Its starting to get important as In trying to fix this I unmerged the old expect, now packages that need it are starting to bank up. It works on two other systems I have , but not this one! Tried different autoconfs, cflags (CFLAGS=""), 5.40, turning off ccacahe and distcc, manually building after unpack, ... : all the usual culprits! Would like to reopen bug as invited below as no actual fix has been demonstrated BillK emerge info: Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1,2.2.5-r4, 2.6.7-gentoo-r13) ================================================================= System uname: 2.6.7-gentoo-r13 i586 AMD-K6(tm) 3D processor Gentoo Base System version 1.4.16 distcc 2.13 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer" CHOST="i586-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer" DISTDIR="/home/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="rsync://rattus.localdomain/portage" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/portage-tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowex X apache2 apm atlas berkdb blas bonobo bzlib crypt cscope cups curl dga directfb dnd encode esd ethereal evo fam fastcgi foomaticdb gd gdbm gif glut gnome gnomedb gphoto2 gpm gtk gtk2 gtkhtml guile imap imlib java jpeg libg++ libgda libwww linguas_en_AU maildir mdb mikmod mmx motif mozctl mozilla mozinterfaceinfo moznoirc moznomail moznoxft mozp3p mozsvg mozxmlterm mpeg mpeg4 mplayer mysql ncurses nptl odbc oggvorbis opengl openssh oss pam pdflib perl php pic plotutils png pnp ppds python readline samba sdl sis slang slp spell ssl svga tcltk tcpd tetex tiff transparent-proxy truetype trusted type1 usb uudeview wavelan wmf x86 xface xml xml2 xmms xrandr xv zlib"
added #define SETPGRP_VOID 1 as suggested below and it now compiles BillK
Created attachment 39480 [details, diff] expect-5.32.2-setpgrp.patch This is a patch used in Fedora's SRPM, we can also try it.
So what exact version is this affecting? I see that 5.37 is an issue.. is 5.40 an issue as well? It looks like that patch you dug up Zhao Ming is the trick but we need to find what versions are affected.
I can't compile both expect-5.37.1-r2(x86) and expect-5.40.0-r2(~x86). % emerge info Portage 2.0.50-r11 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.4.22-gentoo-r11) ================================================================= System uname: 2.4.22-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/shutdown:/usr/kde/3.2/share/config:/usr/share/texmf/tex/generic/config/ /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref:/usr/X11R6/lib/X11/xkb:/usr/kde/3.3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/:/usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/gconf:/etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apache2 apm arts audiofile avi berkdb bitmap-fonts canna cdparanoia cdr cjk crypt cups doc dvd emacs encode esd foomaticdb freewnn gdbm gif gnome gpm gstreamer gtk gtk2 imap imlib imlib2 jack jpeg kde ldap libg++ libwww linguas_ja mad mikmod mmap mmx motif mozilla mpeg mule mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby samba sdl slang spell sse ssl svga tcltk tcpd threads truetype wnn7 x86 xface xine xml2 xmms xprint xv zlib"
duplicate #66851 comes... I test the following test program manually: #include <unistd.h> /* * If this system has a BSD-style setpgrp, which takes arguments, exit * successfully. */ main() { if (setpgrp(1,1) == -1) exit(0); else exit(1); } And I used the following command to compile(tune it according your CFLAGS), and got the following compile error, which was expected(otherwise SETPGRP_VOID won't be set properly, and you will encounter error when compiling exp_command.c) eurythemics expect-5.40 # gcc -pipe -o conftest -O2 -march=pentium4 -fomit-frame-pointer -fforce-addr -fomit-frame-pointer -pipe test.c -lm -lutil test.c: In function `main': test.c:9: error: too many arguments to function `setpgrp' If you can't get the above error, then I suggest using the expect-5.32.2-setpgrp.patch as a trick. If you can, then let's continue: take a search in expect_cf.h(located at /var/tmp/portage/expect-5.40.0-r2/work/expect-5.40, maybe be different due to per-machine setting), to determine whether this file provides "#define HAVE_UNISTD_H 1". Please paste the search result here. If you get other compile error when compiling the test program, please also paste the result here, which can be helpful to diagnose.
*** Bug 66851 has been marked as a duplicate of this bug. ***
Created attachment 42002 [details, diff] examle patch to compile Maybe this is configure problem. configure found setprp takes no argument. > checking whether setpgrp takes no argument... yes But in 'expect_cf.h', SETPGREP_VOID doesn't set. >/* #undef SETPGRP_VOID */ /* if setpgrp takes 0 args */ After I apply patch attached, I could compile. Maybe configure script is bad.
expect-5.42.1 still fail for you ? it's our stable ebuild now ...
upgraded from 5.37.1-r2 to 5.42.1 On all three systems available to me at the moment (inc the on with the original problem) it compiles and installs fine For me at least, this is "fixed" BillK
sounds good, thanks :)