Help! Can't compile Tcl 7.5...

Help! Can't compile Tcl 7.5...

Post by Nick Zitzma » Sun, 28 Jul 1996 04:00:00



I got the source for Tcl 7.5 unpacked (I also have the source for Tk 4.1
but haven't unpacked it yet), ran configure, began compiling, etc. and the
compile went along fine up until cc choked on tclPosixStr.c. I also tried
using gcc (by telling configure to use gcc instead of cc) - no different.

Here's what happens when I try running make:

bash# make
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/panic.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/regexp.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclAsync.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclBasic.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclCkalloc.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclClock.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclCmdAH.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclCmdIL.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclCmdMZ.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclDate.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclEnv.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclEvent.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclExpr.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclFHandle.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclFileName.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclGet.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclHash.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclHistory.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclInterp.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclIO.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclIOCmd.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclIOSock.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclIOUtil.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclLink.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclLoad.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclMain.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclNotify.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclParse.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclPkg.c
cc -c -O  -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclPosixStr.c
./../generic/tclPosixStr.c: In function `Tcl_ErrnoId':
./../generic/tclPosixStr.c:121: duplicate case value
./../generic/tclPosixStr.c:118: this is the first entry for that value
./../generic/tclPosixStr.c: In function `Tcl_ErrnoMsg':
./../generic/tclPosixStr.c:567: duplicate case value
./../generic/tclPosixStr.c:564: this is the first entry for that value
make: *** [tclPosixStr.o] Error 1

Any ideas? I'm using Linux kernel 2.0.8, libc 5.2.18, and GCC 2.7.0 on a
90MHz Pentium...

Please followup in E-Mail. Thanks...

Nick Zitzmann                             http://orion.edmonds.wednet.edu/
(Resident Macintosh Tweaker)


                                            - Peter Stoller

 
 
 

1. tcl 7.5 compile problems with linux 2.0.1+

Well, in the patch to 2.0.1, Linux changed things so that the
value of EDEADLK and EDEADLOCK are the same.

I found this patch in comp.lang.tcl a few weeks ago -- it worked for
me:

apply this patch in your tcl7.5/generic directory -- it modifies
tclPosixStr.c.  Save this to a file and apply with a command like:
"patch <  patchfile"         (w/o quotes obviously)

--------------------

--- tclPosixStr.c       Sun Feb 11 18:56:21 1996

 #ifdef ECONNRESET
        case ECONNRESET: return "ECONNRESET";
 #endif
-#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK !=
EWOULDBLOCK))
+#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK !=
EWOULDBLOCK)) && (!defined(EDEADLOCK) || (EDEADLK != EDEADLOCK))
        case EDEADLK: return "EDEADLK";
 #endif

 #ifdef ECONNRESET
        case ECONNRESET: return "connection reset by peer";
 #endif
-#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK !=
EWOULDBLOCK))
+#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK !=
EWOULDBLOCK)) && (!defined(EDEADLOCK) || (EDEADLK != EDEADLOCK))
        case EDEADLK: return "resource deadlock avoided";
 #endif
 #ifdef EDEADLOCK

-------

Mark Orr

2. Internet connection

3. rpm package tcl 7.5

4. PC-based router software

5. Tcl 7.5 w/ Dynamic Loading & Shared Libs On Linux With Gcc 2.6.3?

6. kdm doesn't display background after upgrade

7. linux 2.0.7, tcl 7.5 BUG: EDEADLK and EDEADLOCK are the same

8. Cracker

9. tcl/tk 7.5 and 4.1 shared libraries

10. Tcl 7.5 and FreeBSD 2.2.1

11. TCL 7.5 & lib ldl

12. 'make' help on Tcl compiling

13. Help: printing w/ AUIS 7.5