为什么Apache Thrift安装在make命令失败?

时间:2015-05-18 12:31:37

标签: thrift

我正在尝试通过Cygwin在Windows 7上安装Apache Thrift。我尝试使用exe installer但是没有用(只打开并关闭了一个命令提示符)。然后我尝试通过Cygwin进行安装,但遇到了这个错误。

 $ make
make  all-recursive
make[1]: Entering directory '/cygdrive/f/Thrift Practice/thrift-0.9.2'
Making all in compiler/cpp
make[2]: Entering directory '/cygdrive/f/Thrift Practice/thrift-0.9.2/compiler/cpp'
make  all-am
make[3]: Entering directory '/cygdrive/f/Thrift Practice/thrift-0.9.2/compiler/cpp'
source='thriftl.cc' object='libparse_a-thriftl.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift  -I./src  -Wall -Wno-sign-compare -Wno-unused -g -O2 -std=c++11 -c -o libparse_a-thriftl.o `test -f 'thriftl.cc' || echo './'`thriftl.cc
thriftl.cc: In function ‘void yy_init_buffer(YY_BUFFER_STATE, FILE*)’:
thriftl.cc:3399:60: error: ‘fileno’ was not declared in this scope
         b->yy_is_interactive =  file ? (isatty( fileno(file) ) > 0) : 0;
                                                            ^
Makefile:751: recipe for target 'libparse_a-thriftl.o' failed
make[3]: *** [libparse_a-thriftl.o] Error 1
make[3]: Leaving directory '/cygdrive/f/Thrift Practice/thrift-0.9.2/compiler/cpp'
Makefile:539: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/cygdrive/f/Thrift Practice/thrift-0.9.2/compiler/cpp'
Makefile:531: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/f/Thrift Practice/thrift-0.9.2'
Makefile:452: recipe for target 'all' failed
make: *** [all] Error 2

我尝试更改变量:

b->yy_is_interactive = 0 ;

但是这导致了一些其他错误('realpath'未在此范围内声明)。我已经查看了其他相关问题Apache thrift can not make,但我满足了所有要求以运行Thrift

1 个答案:

答案 0 :(得分:0)

如果在Windows中使用EXE安装程序,则不需要Cygwin。 EXE安装程序安装Thrift.EXE。

运行时库可以在repository branch之外使用,还有Visual Studio的构建项目。

除此之外,还有VS build project for the Thrift compiler itself。那不是很好吗?

PS:https://thrift.apache.org/docs/install/windows略显过时。谢谢您的提醒。