使用 gcc 3.4.5 编译 TCL 7.6.2
我正在使用 gcc 3.4.5 编译 TCL 7.6p2。我使用的是 CentOS 5.5。我在 make 命令期间收到以下错误:
./../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
任何提示将不胜感激。谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在尝试使用多年来一直不受支持的古老版本。因此,最好的方法是破解源代码,从这些
switch
语句中注释掉有问题的情况。 或者切换到有人愿意支持的东西(但这是你的决定)。详细来说: 看起来 EOPNOTSUPP 与 ENOTSUP 的值相同;注释掉与 EOPNOTSUPP 关联的每组三行(或至少带有
case
的行;周围的#ifdef
机制无害),以使问题消失。或者,您可以向后移植所有非上古版本中存在的更改,即将#ifdef
行改进为:不过,不必将其报告为错误。 不支持 Tcl 7.6p2。
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:Don't bother reporting this as a bug though. Tcl 7.6p2 is not supported.