thrift静态编译
openssl1.1.1s
下载:
下载地址: https://github.com/openssl/openssl/releases/tag/OpenSSL_1_1_1s
下载文件:Source code(tar.gz)
编译过程:
mkdir /root/BBin/openssl1.1.1./config --prefix=/root/BBin/openssl1.1.1make && make install
注意:编译结果在”/root/BBin/openssl1.1.1“
libevent编译
下载地址:https://libevent.org/
下载版本:libevent-2.0.22-stable
mkdir /root/BBin/libevent./configure --disable-openssl --prefix=/root/BBin/libeventmakemake install
注意:编译结果在”/root/BBin/libevent“
boost编译
下载地址:https://www.boost.org/users/history/
下载版本:boost 1.72.0
mkdir /root/BBin/boost./bootstrap.sh --without-libraries=container,context,exception,stacktrace,type_erasure,filesystem,locale,chrono,contract,fiber,graph,graph_parallel,iostreams,log,math,mpi,python,program_options,random,test,wave --without-icu --prefix=/root/BBin/boost./b2 --with-system --with-serialization link=static threading=multi toolset=gcc address-model=64./b2 install
注意:编译结果在”/root/BBin/boost“
thrift编译
下载地址:https://github.com/apache/thrift/releases
下载版本:thrift 0.12.0
mkdir /root/BBin/thrift./bootstrap.sh#前边LD指定openssl的路径,因为thrift在编译时会尝试运行一个test程序,运行时候由于我们openssl并不在系统目录,所以会导致其无法运行。所以这里用LD_LIBRARY_PATH指定下运行环境下的ld加载路径。
LD_LIBRARY_PATH=/root/BBin/openssl1.1.1/lib/ ./configure --disable-tests --disable-shared --disable-tutorial --with-cpp --with-qt5=no --with-qt4=no --without-python --without-java --without-lua --without-csharp --without-erlang --without-php --without-php_extension --without-haskell --without-perl --without-go --without-c_glib --enable-static --with-boost=/root/BBin/boost/include --with-libevent=/root/BBin/libevent --prefix=/root/BBin/thrift CPPFLAGS="-I/root/BBin/openssl1.1.1/include -I/root/BBin/boost/include -fPIC" LDFLAGS="-L/root/BBin/openssl1.1.1/lib -lssl -lcrypto -fPIC"makemake install