0

I am trying to install Apache Thrift on Windows 7 via Cygwin. I tried using the exe installer but that didn't work (only a command prompt was opened and closed). Then I tried installing through making a build through Cygwin but ran into this error.

 $ 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

I tried changing the variable :

b->yy_is_interactive = 0 ;

but that resulted in some other error ( ‘realpath’ was not declared in this scope). I have checked through other related question Apache thrift can not make but I have all the requirements meet to run Thrift

Community
  • 1
  • 1
Hrishikesh
  • 25
  • 6
  • For typical cases there is no need for Cygwin or MinGW anymore. If you really, really absolutely want to build under Cygwin, follow the usual steps. `bootstrap.sh && configure && make && sudo make install`. No guarantees however, and I doubt that Cygwin is even a supported target. – JensG May 18 '15 at 12:40
  • That would be great but as I mentioned earlier the exe is failing to install anything, it just open a command prompt for a second and then closes. That was the reason I tried installing it via Cygwin. Can you tell me how I can figure out what is causing this malfunction ? Any help on this would be appreciated. – Hrishikesh May 18 '15 at 12:46
  • Why? See my answer below. You don't need Cygwin. BTW, if you used [this EXE](http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.2/thrift-0.9.2.exe) then you already found the compiler, which is a [command line tool](http://en.wikipedia.org/wiki/Command-line_interface). Enter `thrift --help` or in your case `thrift-0.9.2.exe --help` to get more info. The EXE *installer* is located somwehere else, but yes, there is one. – JensG May 18 '15 at 12:48
  • 1
    Okay it worked, I mistook the compiler as a "double click" exe installer. Practiced some examples with it and it succeeded. Thanks for the prompt reply. – Hrishikesh May 19 '15 at 10:50

1 Answers1

0

If you use the EXE installer in Windows, there is no need for Cygwin. The EXE installer installs Thrift.EXE.

The runtime library can be used out of the repository branch, there are build projects for Visual Studio.

And on top of it there's even a VS build project for the Thrift compiler itself. Isn't that great?


PS: https://thrift.apache.org/docs/install/windows is slightly outdated. Thanks for the heads up.

JensG
  • 13,148
  • 4
  • 45
  • 55