在Mac 10.9.2上安装WordNet

时间:2014-05-14 15:02:16

标签: macos tcl osx-mavericks tk wordnet

我试图在Mac上安装WordNet(OS 10.9.2)。我试过以下

  1. ./ configure
  2. 使
  3. 但在make期间,我遇到了一些错误。然后我安装了XQuartz-2.7.5。在make期间我仍然遇到了一些错误。接下来,我已经安装了Xcode,但仍然没有解决问题。这个question建议安装Tcl / TK,我试过但在make期间我仍然遇到以下错误

    /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
    Making all in doc
    Making all in html
    make[3]: Nothing to be done for `all'.
    Making all in man
    make[3]: Nothing to be done for `all'.
    Making all in pdf
    make[3]: Nothing to be done for `all'.
    Making all in ps
    make[3]: Nothing to be done for `all'.
    make[3]: Nothing to be done for `all-am'.
    Making all in dict
    make[2]: Nothing to be done for `all'.
    Making all in include
    Making all in tk
    make[3]: Nothing to be done for `all'.
    make[3]: Nothing to be done for `all-am'.
    Making all in lib
    Making all in wnres
    make[3]: Nothing to be done for `all'.
    make[3]: Nothing to be done for `all-am'.
    Making all in src
    if /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -I/usr/local/include -I/usr/X11/include -I/usr/local/include -I.. -I../include -I/usr/local/include -I/usr/X11/include -I/usr/local/include    -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -fpermissive -MT wishwn-stubs.o -MD -MP -MF ".deps/wishwn-stubs.Tpo" -c -o wishwn-stubs.o `test -f 'stubs.c' || echo './'`stubs.c; \
    then mv -f ".deps/wishwn-stubs.Tpo" ".deps/wishwn-stubs.Po"; else rm -f ".deps/wishwn-stubs.Tpo"; exit 1; fi
    clang: warning: -lX11: 'linker' input unused
    clang: warning: argument unused during compilation: '-L/usr/X11R6/lib'
    stubs.c:43:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = 
          ~~~~~~    ^
    stubs.c:55:14: error: no member named 'result' in 'struct Tcl_Interp'
       interp -> result = bitfieldstr;
       ~~~~~~    ^
    stubs.c:72:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: bit bitnum";
          ~~~~~~    ^
    stubs.c:78:14: error: no member named 'result' in 'struct Tcl_Interp'
       interp -> result = bitfieldstr;
       ~~~~~~    ^
    stubs.c:92:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = 
          ~~~~~~    ^
    stubs.c:105:14: error: no member named 'result' in 'struct Tcl_Interp'
       interp -> result = resultbuf;
       ~~~~~~    ^
    stubs.c:117:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: glosses [1 | 0]";
          ~~~~~~    ^
    stubs.c:132:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: fileinfo [1 | 0]";
          ~~~~~~    ^
    stubs.c:147:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: byteoffset [1 | 0]";
          ~~~~~~    ^
    stubs.c:162:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: senseflag [1 | 0]";
          ~~~~~~    ^
    stubs.c:178:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: contextualhelp partofspeechnum searchtypenum";
          ~~~~~~    ^
    stubs.c:183:14: error: no member named 'result' in 'struct Tcl_Interp'
       interp -> result = helptext[pos][searchtype];
       ~~~~~~    ^
    stubs.c:193:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: reopendb";
          ~~~~~~    ^
    stubs.c:207:17: error: no member named 'result' in 'struct Tcl_Interp'
          interp -> result = "usage: abortsearch";
          ~~~~~~    ^
    14 errors generated.
    make[2]: *** [wishwn-stubs.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    

    请告诉我如何解决这个问题。如果Tcl / TK存在问题,请解释正确的安装方式。感谢

1 个答案:

答案 0 :(得分:9)

直接访问interp->result!哦,那是very deprecated nowadays

解决方法

您最好的选择是使用Tcl 8.5或8.4构建(不建议使用此类编码模式),但您可以通过将-DUSE_INTERP_RESULT标志传递给编译器来使8.6工作。如果你这样做,收到警告,但这比硬错误要好,是吗?

正确修理

每个地方都应该改为使用Tcl_SetResult,即来自:

interp->result = "usage: glosses [1 | 0]";

Tcl_SetResult(interp, "usage: glosses [1 | 0]", TCL_DYNAMIC);

(好吧,TCL_DYNAMIC在这种情况下可能是TCL_STATIC,但我们也可以采取防御措施;开销实际上是零。)

请注意,Tcl已支持Tcl_SetResult API数十年。更改使用它不会阻止使用旧版本构建代码。