For the future of cross-language communication pre-research, chose the thrift to try. Results in the Mac OS installed on the difficulties encountered, do not know whether I choose a method error or what, anyway, it is finally compiled.
First, we refer to the installation steps of the official website: https://thrift.apache.org/docs/install/os_x
OS X Setup
The following command install all the required tools and libraries to build and install the Apache Thrift compiler on a OS X based system.
Install Boost
Download the Boost library from boost.org Untar compile with
./Bootstrap. SH./Threading=Address-modelVariant=Install
Install libevent
Download libevent, Untar and compile with
./--prefix=/usr/makeinstall
Building Apache Thrift
Download the latest version of Apache Thrift, Untar and compile with
./--prefix=/usr/local--with-boost=/usr/ --with-libevent=/usr/local
Additional Reading
For more information on the requirements See:apache Thrift requirements
For more information on building and installing Thrift see:building from source
This snippet is generated by Apache Thrift ' s source tree docs: doc/install/os_x.md
----------------------------------------------------------------------------------
Then, you may experience the following problem:
MAKE[4]: * * * [Src/thrift/transport/tsslsocket.lo] Error 1
The OpenSSL version is too old and can be upgraded under Mac:
brew update
brew install openssl
brew link --force openssl
openssl version -a
PROCESSOR/PROCESSORTEST.CPP:26:10: fatal error: ' tr1/functional ' File not found
The problem is, that libc++ have been written after C++11 was "released".
You could try this:
#if __cplusplus >= 201103L
#include <functional>
#else
#include <tr1/functional>
#endif
and compile with cxxflags= "-std=c++11".
[Thrift Dir]/lib/cpp/test/processor/processortest.cpp
---------------------------------------------------------------------
Library not found FOR-L:LIBBOOST_UNIT_TEST_FRAMEWORK.A thrift
Why can't we find the Lib directory?
Fuck, modify:
VIM [Thrift dir]/lib/cpp/test/makefile.am
Temporarily with absolute path:/USR/LOCAL/LIB/IBBOOST_UNIT_TEST_FRAMEWORK.A Replace
Finally passed, cross-platform why do so rotten ~
How do I get thrift0.9.2 to compile on MacOS?