Pregunta

I'm trying to install WordNet on Mac (OS 10.9.2). I have tried the following

  1. ./configure
  2. make

But during make I got some errors. Then I have installed XQuartz-2.7.5. Still I got some error during make. Next, I have installed Xcode but still this dose not fix the problem. This question suggest to install Tcl/TK, which I tried but still I got the following error during 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

Please advice me how to solve this problem. If the problem with Tcl/TK, could you please explain the right way to install it. Thanks

¿Fue útil?

Solución

Direct access to interp->result! Oh, that's very deprecated nowadays.

Workaround

Your best bet is to build with Tcl 8.5 or 8.4 (where it's just NOT RECOMMENDED to use such coding patterns), but you can make things work in 8.6 by passing the -DUSE_INTERP_RESULT flag to the compiler. You will get warnings if you do this, but that's better than hard errors, yes?

Fixing it properly

Each of those places really ought to be changed to use Tcl_SetResult, i.e. from:

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

to

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

(OK, the TCL_DYNAMIC could be TCL_STATIC in this case, but we might as well code defensively; the overhead is effectively zero.)

Note that the Tcl_SetResult API has been supported in Tcl for decades. Changing to use it will not prevent code from building with older versions.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top