2016-11-22 42 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,而這樣做的構建本身,而是之後再進行安裝。僅編譯代碼就不需要提升權限。