Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43770 - itcl build failed
Summary: itcl build failed
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-04 20:56 UTC by Carter Smithhart
Modified: 2004-03-10 03:40 UTC (History)
0 users

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


Attachments
itcl build errors (itcl_build_errors.txt,6.32 KB, text/plain)
2004-03-04 20:58 UTC, Carter Smithhart
Details
preprocessed file (dumpfile,272.01 KB, text/plain)
2004-03-09 07:53 UTC, Carter Smithhart
Details
Usage: ppsearch.pl <gcc -E file> <text> (ppsearch.pl,730 bytes, text/plain)
2004-03-10 00:20 UTC, Carter Smithhart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carter Smithhart 2004-03-04 20:56:44 UTC
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"
Comment 1 Carter Smithhart 2004-03-04 20:58:16 UTC
Created attachment 26875 [details]
itcl build errors
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-03-07 20:17:55 UTC
i've put a prospective bugfix in as itcl-3.2.1-r1, please test it (it's marked ~x86) and report back.
Comment 3 Carter Smithhart 2004-03-08 21:32:53 UTC
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
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-03-08 21:56:42 UTC
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).
Comment 5 Carter Smithhart 2004-03-08 22:20:04 UTC
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;
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-03-08 22:47:43 UTC
*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.
Comment 7 Carter Smithhart 2004-03-09 07:53:43 UTC
Created attachment 27097 [details]
preprocessed file
Comment 8 Carter Smithhart 2004-03-09 07:54:29 UTC
I had to change:
echo ./generic/itcl_class.c
to
echo ./itcl/generic/itcl_class.c

in your dump command..
Comment 9 Carter Smithhart 2004-03-09 22:29:16 UTC
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?
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-03-09 23:37:08 UTC
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.
Comment 11 Carter Smithhart 2004-03-10 00:20:36 UTC
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.
Comment 12 Carter Smithhart 2004-03-10 00:47:26 UTC
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!
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-03-10 03:40:14 UTC
heh, old things come back to haunt ppl like that.