【问题标题】:Why is Apache Thrift installation failing at make command?为什么 Apache Thrift 安装在 make 命令时失败?
【发布时间】:2015-05-18 12:31:37
【问题描述】:

我正在尝试通过 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 的所有要求

【问题讨论】:

  • 对于典型情况,不再需要 Cygwin 或 MinGW。如果您真的非常非常想在 Cygwin 下构建,请按照通常的步骤操作。 bootstrap.sh && configure && make && sudo make install。但是不能保证,我怀疑 Cygwin 甚至是受支持的目标。
  • 那很好,但正如我之前提到的,exe 无法安装任何东西,它只是打开命令提示符一秒钟然后关闭。这就是我尝试通过 Cygwin 安装它的原因。您能告诉我如何找出导致此故障的原因吗?对此的任何帮助将不胜感激。
  • 为什么?请看下面我的回答。你不需要 Cygwin。顺便说一句,如果您使用了this EXE,那么您已经找到了编译器,即command line tool。输入thrift --help 或在您的情况下输入thrift-0.9.2.exe --help 以获取更多信息。 EXE 安装程序 位于其他地方,但是是的,有一个。
  • 好的,我把编译器误认为是“双击”exe安装程序。用它练习了一些例子,它成功了。感谢您的及时回复。

标签: thrift


【解决方案1】:

如果您在 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 有点过时了。感谢您的提醒。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-08-11
    • 2012-11-05
    • 2019-09-06
    • 2023-01-21
    • 1970-01-01
    • 2012-09-28
    相关资源
    最近更新 更多