2016-11-22 101 views
0

我编译BLT在OS X 10.10.5,我make./configure后一段时间,会出现一些错误的位置: TK/Tcl扩展:错误而编译BLT

[email protected]:~/Downloads/blt2.4z$ sudo make -I/opt/X11/include 
Password: 
(cd src; /Applications/Xcode.app/Contents/Developer/usr/bin/make all) 
gcc -c -Wall -O6 -I. -I. bltAlloc.c 
warning: optimization level '-O6' is not supported; using '-O3' instead 
In file included from bltAlloc.c:1: 
In file included from ./bltInt.h:80: 
./bltNsUtil.h:50:20: error: conflicting types for 'Tcl_FindCommand' 
EXTERN Tcl_Command Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp *interp, 
       ^
/usr/local/include/tclDecls.h:1486:20: note: previous declaration is here 
EXTERN Tcl_Command  Tcl_FindCommand(Tcl_Interp *interp, const char *name, 
         ^
In file included from bltAlloc.c:1: 
In file included from ./bltInt.h:80: 
./bltNsUtil.h:67:23: error: conflicting types for 'Tcl_CreateNamespace' 
EXTERN Tcl_Namespace *Tcl_CreateNamespace _ANSI_ARGS_((Tcl_Interp *interp, 
        ^
/usr/local/include/tclDecls.h:1460:24: note: previous declaration is here 
EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp, 
         ^
In file included from bltAlloc.c:1: 
In file included from ./bltInt.h:80: 
./bltNsUtil.h:72:23: error: conflicting types for 'Tcl_FindNamespace' 
EXTERN Tcl_Namespace *Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp *interp, 
        ^
/usr/local/include/tclDecls.h:1482:24: note: previous declaration is here 
EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, 
         ^
In file included from bltAlloc.c:1: 
In file included from ./bltInt.h:80: 
./bltNsUtil.h:75:12: error: conflicting types for 'Tcl_Export' 
EXTERN int Tcl_Export _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Namespace *nsPtr, 
     ^
/usr/local/include/tclDecls.h:1469:13: note: previous declaration is here 
EXTERN int    Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, 
         ^
1 warning and 4 errors generated. 
make[1]: *** [bltAlloc.o] Error 1 
make: *** [all] Error 2 

我应该怎么做才能避免这种情况?

回答

0

你正在与一个老年人的代码库,所以需要一些手术。唉。

中的四个违规声明需要删除,因为Tcl现在正确声明它们; Tcl_FindCommand,Tcl_CreateNamespace,Tcl_FindNamespaceTcl_Export是Tcl的公共API的一部分,并且已经有多年了。 (这个问题的声明上线50,67,72,75,再加上可能的一种或在各情况下两行进一步。)

此外,你建议不要使用sudo,而这样做的构建本身,而是之后再进行安装。仅编译代码就不需要提升权限。