Compiling TCL 7.6.2 using gcc 3.4.5
I am compiling TCL 7.6p2 using gcc 3.4.5. I am using a CentOS 5.5. I get the following error during the make command:
./../generic/tclPosixStr.c: In function `Tcl_ErrnoId':
./../generic/tclPosixStr.c:340: error: duplicate case value
开发者_运维问答./../generic/tclPosixStr.c:328: error: previously used here
./../generic/tclPosixStr.c: In function `Tcl_ErrnoMsg':
./../generic/tclPosixStr.c:787: error: duplicate case value
./../generic/tclPosixStr.c:775: error: previously used here
make: *** [tclPosixStr.o] Error 1
Any hints would be greatly appreciated. Thanks.
You're trying to use an ancient version that's not been supported for many many years. As such, your best approach is to hack the source code to comment out the offending cases from those switch
statements. Or switch to something that someone can be bothered to support (but that's your call).
In detail: It appears that EOPNOTSUPP is the same value as ENOTSUP; comment out each group of three lines (or at least the lines with the case
; the surrounding #ifdef
machinery isn't harmful) associated with EOPNOTSUPP to make the problem go away. Or you can backport the change that's present in all non-antediluvian versions, which is to improve the #ifdef
lines to this:
#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
Don't bother reporting this as a bug though. Tcl 7.6p2 is not supported.
精彩评论