为什么 Apache Thrift 安装在 make 命令中失败?
Why is Apache Thrift installation failing at make command?
我正在尝试通过 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
如果您使用 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 有点过时了。谢谢提醒。
我正在尝试通过 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
如果您使用 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 有点过时了。谢谢提醒。