Skip to content

Instantly share code, notes, and snippets.

@ochinchina
Last active December 29, 2015 18:21
Show Gist options
  • Save ochinchina/b36895850fbb7efeecb9 to your computer and use it in GitHub Desktop.
Save ochinchina/b36895850fbb7efeecb9 to your computer and use it in GitHub Desktop.
compile thrift-0.8.0 in arch linux for raspberry pi2

###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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment