执行 configure 生成 Makefile,排除掉不需要的语言支持和测试等:
./configure --prefix=/usr/local/thrift-0.18.1 --with-boost=/usr/local/boost --with-libevent=/usr/local/libevent --with-openssl=/usr/local/openssl --with-cpp=yes --with-go=no --with-java=no --with-python=no --with-lua=no --with-qt5=no --with-c_glib=no --with-kotlin=no --with-erlang=no --with-nodejs=no --with-nodets=no --with-py3=no --with-perl=no --with-php=no --with-php_extension=no --with-dart=no --with-ruby=no --with-swift=no --with-rs=no --with-cl=no --with-haxe=no --with-netstd=no --with-d=no --enable-tests=no --enable-tutorial=no --enable-coverage=no
执行成功后,可见:
config.status: creating config.h
config.status: creating lib/cpp/src/thrift/config.h
config.status: creating lib/c_glib/src/thrift/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
thrift 0.18.1
Building C (GLib) Library .... : no
Building C++ Library ......... : yes
Building Common Lisp Library.. : no
Building D Library ........... : no
Building Dart Library ........ : no
Building .NET Standard Library : no
Building Erlang Library ...... : no
Building Go Library .......... : no
Building Haxe Library ........ : no
Building Java Library ........ : no
Building Kotlin Library ...... : no
Building Lua Library ......... : no
Building NodeJS Library ...... : no
Building Perl Library ........ : no
Building PHP Library ......... : no
Building Python Library ...... : no
Building Py3 Library ......... : no
Building Ruby Library ........ : no
Building Rust Library ........ : no
Building Swift Library ....... : no
C++ Library:
C++ compiler .............. : g++ -std=c++11
Build TZlibTransport ...... : yes
Build TNonblockingServer .. : no
Build TQTcpServer (Qt5) ... : no
C++ compiler version ...... : g++ (GCC) 13.1.0
If something is missing that you think should be present,
please skim the output of configure to find the missing
component. Details are present in config.log.
接下来执行 make 编译 和 make install 安装即可。
注意如果不指定 --with-libevent,则不会构建 TNonblockingServer,--with-boost 也需要指定。
附1:openssl的编译安装:
./config --prefix=/usr/local/openssl-3.1.1 shared threads
make&&make install
附2:boost的编译安装:
./bootstrap.sh --without-icu --without-libraries=python,graph,graph_parallel,mpi,wave
./b2 install threading=multi --prefix=/usr/local/boost_1_82_0 --without-python --without-graph --without-graph_parallel --without-mpi --without-wave
标签:Building,gcc,no,--,Library,without,config,0.18,thrift
From: https://www.cnblogs.com/aquester/p/17580487.html