I'm having a problem getting itcl to build... I have dev-lang/tk-8.3.4-r1 installed and I had the previous version of itcl installed (itcl-3.2) but I removed it in a silly attempt to figure out this build problem. I suppose I could edit the generic/itcl_class.c file and add a line defining CMD_IS_DELETED, but I thought I'd post this problem first to see if there's a logical explanation. Reproducible: Always Steps to Reproduce: 1. emerge itcl Actual Results: The full build output is in an attachment: gcc -DVERSION=\"3.2\" -DUSE_TCL_STUBS=1 -DITCL_LIBRARY=\"/usr/lib/itcl3.2\" -I/usr/lib/tcl8.3/include/generic -I/usr/lib/tcl8.3/include/unix -I"./generic" -I"./unix" -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fPIC -c `echo ./generic/itcl_class.c` -o itcl_class.o generic/itcl_class.c: In function `Itcl_CreateClass': generic/itcl_class.c:216: warning: passing arg 2 of pointer to function from incompatible pointer type generic/itcl_class.c: In function `Itcl_ClassCmdResolver': generic/itcl_class.c:1014: structure has no member named `flags' generic/itcl_class.c:1014: `CMD_IS_DELETED' undeclared (first use in this function) generic/itcl_class.c:1014: (Each undeclared identifier is reported only once generic/itcl_class.c:1014: for each function it appears in.) generic/itcl_class.c:1015: structure has no member named `flags' generic/itcl_class.c: In function `Itcl_GetCommonVar': generic/itcl_class.c:1697: warning: assignment discards qualifiers from pointer target type distcc[9100] ERROR: compile on localhost failed make[1]: *** [itcl_class.o] Error 1 make[1]: *** Waiting for unfinished jobs.... generic/itcl_bicmds.c: In function `Itcl_BiConfigureCmd': generic/itcl_bicmds.c:465: warning: assignment discards qualifiers from pointer target type generic/itcl_bicmds.c: In function `Itcl_BiInfoFunctionCmd': generic/itcl_bicmds.c:1110: warning: passing arg 3 of pointer to function from incompatible pointer type generic/itcl_bicmds.c: In function `Itcl_BiInfoVariableCmd': generic/itcl_bicmds.c:1323: warning: passing arg 3 of pointer to function from incompatible pointer type make[1]: Leaving directory `/var/tmp/portage/itcl-3.2.1/work/itcl3.2.1/itcl' make: *** [all] Error 1 !!! ERROR: dev-tcltk/itcl-3.2.1 failed. !!! Function src_compile, Line 25, Exitcode 2 !!! emake failed Expected Results: itcl should have fully built. innervision itcl # emerge info Portage 2.0.50-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.20-gaming-r8) ================================================================= System uname: 2.4.20-gaming-r8 i686 AMD Athlon(TM) XP 2100+ 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="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" 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/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox userpriv" GENTOO_MIRRORS="http://gentoo.ccccom.com ftp://gentoo.ccccom.com ftp://mirrors.tds.net/gentoo http://mirror.tucdemonic.org/gentoo/ http://gentoo.seren.com/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://advocate/gentoo-portage" USE="X alsa apache2 apm arts avi berkdb bonobo cdr crypt cups encode esd foomaticdb gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile imlib jpeg kde libg++ libwww mad mikmod mod_php motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl php png ppds python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype ufed x86 xml2 xmms xv zlib"
Created attachment 26875 [details] itcl build errors
i've put a prospective bugfix in as itcl-3.2.1-r1, please test it (it's marked ~x86) and report back.
Okay.. I just did an emerge sync, then changed it to x86 and this is what I get: for dir in itcl itk ; do \ if test -d $dir ; then \ echo "$dir: make all" ;\ if (cd $dir; make all) ; then true ; else exit 1 ; fi ; \ else \ exit 1; \ fi \ done; itcl: make all make[1]: Entering directory `/var/tmp/portage/itcl-3.2.1-r1/work/itcl3.2.1/itcl' gcc -DVERSION=\"3.2\" -DUSE_TCL_STUBS=1 -DITCL_LIBRARY=\"/usr/lib/itcl3.2\" -I/usr/lib/tcl8.3/include/generic -I/usr/lib/tcl8.3/include/unix -I"./generic" -I"./unix" -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fPIC -c `echo ./generic/itclStubInit.c` -o itclStubInit.o gcc -DVERSION=\"3.2\" -DUSE_TCL_STUBS=1 -DITCL_LIBRARY=\"/usr/lib/itcl3.2\" -I/usr/lib/tcl8.3/include/generic -I/usr/lib/tcl8.3/include/unix -I"./generic" -I"./unix" -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fPIC -c `echo ./generic/itcl_bicmds.c` -o itcl_bicmds.o gcc -DVERSION=\"3.2\" -DUSE_TCL_STUBS=1 -DITCL_LIBRARY=\"/usr/lib/itcl3.2\" -I/usr/lib/tcl8.3/include/generic -I/usr/lib/tcl8.3/include/unix -I"./generic" -I"./unix" -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fPIC -c `echo ./generic/itcl_class.c` -o itcl_class.o generic/itcl_class.c: In function `Itcl_CreateClass': generic/itcl_class.c:216: warning: passing arg 2 of pointer to function from incompatible pointer type generic/itcl_class.c: In function `Itcl_ClassCmdResolver': generic/itcl_class.c:1014: structure has no member named `flags' generic/itcl_class.c:1015: structure has no member named `flags' generic/itcl_class.c: In function `Itcl_GetCommonVar': generic/itcl_class.c:1697: warning: assignment discards qualifiers from pointer target type distcc[26994] ERROR: compile on localhost failed make[1]: *** [itcl_class.o] Error 1 make[1]: *** Waiting for unfinished jobs.... generic/itcl_bicmds.c: In function `Itcl_BiConfigureCmd': generic/itcl_bicmds.c:465: warning: assignment discards qualifiers from pointer target type generic/itcl_bicmds.c: In function `Itcl_BiInfoFunctionCmd': generic/itcl_bicmds.c:1110: warning: passing arg 3 of pointer to function from incompatible pointer type generic/itcl_bicmds.c: In function `Itcl_BiInfoVariableCmd': generic/itcl_bicmds.c:1323: warning: passing arg 3 of pointer to function from incompatible pointer type make[1]: Leaving directory `/var/tmp/portage/itcl-3.2.1-r1/work/itcl3.2.1/itcl' make: *** [all] Error 1 !!! ERROR: dev-tcltk/itcl-3.2.1-r1 failed. !!! Function src_compile, Line 27, Exitcode 2 !!! emake failed
could you look at your /usr/lib/tcl8.*/include/generic/tclInt.h file? look for 'typedef struct Command' and include it's details (without the comments).
This is what I've got: typedef struct Command { Tcl_HashEntry *hPtr; Namespace *nsPtr; int refCount; int cmdEpoch; CompileProc *compileProc; Tcl_ObjCmdProc *objProc; ClientData objClientData; Tcl_CmdProc *proc; ClientData clientData; Tcl_CmdDeleteProc *deleteProc; ClientData deleteData; int deleted; ImportRef *importRefPtr; } Command;
*scrathes head* that makes absolutely no sense! please run this: cd /var/tmp/portage/itcl-3.2.1-r1/work/itcl3.2.1/itcl gcc -DVERSION=\"3.2\" -DUSE_TCL_STUBS=1 -DITCL_LIBRARY=\"/usr/lib/itcl3.2\" -I/usr/lib/tcl8.3/include/generic -I/usr/lib/tcl8.3/include/unix -I"./generic" -I"./unix" -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fPIC -c `echo ./generic/itcl_class.c` -E >~/dumpfile and include 'dumpfile' as an attachment. For some reason, your system isn't dealing with this expression correctly: #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4) isCmdDeleted = (!cmdPtr || (itclCompatFlags & ITCL_COMPAT_USECMDFLAGS ? (cmdPtr->deleted & CMD_IS_DELETED) : cmdPtr->deleted)); #else isCmdDeleted = (!cmdPtr || (itclCompatFlags & ITCL_COMPAT_USECMDFLAGS ? (cmdPtr->flags & CMD_IS_DELETED) : cmdPtr->flags)); #endif it's picking the second part, while it should be taking the first part.
Created attachment 27097 [details] preprocessed file
I had to change: echo ./generic/itcl_class.c to echo ./itcl/generic/itcl_class.c in your dump command..
What's a good way to detect the wrong include file getting included? In other words, perhaps there's a remenant of a previous tcl install or something.. any ideas?
could you try find out what values TCL_MAJOR_VERSION and TCL_MINOR_VERSION have at that point in the itcl/generic/itcl_class.c file in your system? it may be a lot of tracing to do. Somewhere it's being redefined I think. The offical place is /usr/include/tcl.h and the values there should be 8 and 3 respectively for you.
Created attachment 27138 [details] Usage: ppsearch.pl <gcc -E file> <text> Goes through each file that was preprocessed (from gcc -E output) and searches for <text>.. This is how I figured out that TCL_MAJOR_VERSION wasn't ever getting set but should have been.
So... I found an old (yet newer) installation of tcl8.4.2 in /usr/local/include and such... I blew that away cuz I don't need it anymore and viola! Things are working again... Thank you for leading down the right path!
heh, old things come back to haunt ppl like that.