###clone the thrift
$ git clone https://github.com/apache/thrift.git
###checkout the thrift-0.8.0
$ cd thrift
$ git checkout thrift-0.8.0
###install the autoconf automake & pkg-config
$ pacman -Sy autoconf
$ pacman -Sy automake
$ pacman -Sy pkg-config
###install flex & bison
$ pacman -Sy flex
$ pacman -Sy bison
###run bootstrap.sh
$ ./bootstrap.sh
$ ./configure
$ make
###fix fatal error: thrifty.h: No such file or directory
when doing the compilation, one fatal error will be met:
src/thriftl.ll:50:21: fatal error: thrifty.h: No such file or directory
need to execute following command to fix this error:
$ mv compiler/cpp/thrifty.hh compiler/cpp/thrifty.h
###fix undefined yylex in libfl.so
When linking, the ld complains: undefined yylex in libfl.so
Change the yylex() definition in compiler/cpp/src/main.h to:
extern "C" int yylex()
Then continue the compilation