SHIHUC

好记性不如烂笔头,还可以分享给别人看看! 专注基础算法,互联网架构,人工智能领域的技术实现和应用。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

安装thrift全过程

Posted on 2016-10-08 14:32  shihuc  阅读(7161)  评论(2编辑  收藏  举报

为了研究基于thrift的RPC框架,其实,是想自己基于thrift写一个微服务的platform。首先就是安装Thrift,便于IDL架构生成java的接口文件。多的不说了,开始install的过程吧。

我的机器,环境信息如下: 联想笔记本,Centos6.8的系统。

 

步骤:

1. 安装平台开发工具

1 yum -y groupinstall "Development Tools"

2. 安装autoconf

1 wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
2 tar xvf autoconf-2.69.tar.gz
3 cd autoconf-2.69
4 ./configure --prefix=/usr/local
5 make
6 make install

3. 安装automake

1 wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
2 tar xvf automake-1.14.tar.gz
3 cd automake-1.14
4 ./configure --prefix=/usr/local
5 make
6 make install

4. 安装bison

1 wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
2 tar xvf bison-2.5.1.tar.gz
3 cd bison-2.5.1
4 ./configure --prefix=/usr/local
5 make
6 make install

5. 安装C++库依赖相关的开发包

1 yum -y install libevent-devel zlib-devel openssl-devel

6. 安装boost

1 wget http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.gz
2 tar xvf boost_1_53_0.tar.gz
3 cd boost_1_53_0
4 ./bootstrap.sh
5 ./b2

注意,按照上面这些步骤操作,是不会成功的,在安装boost过程中的最后一步,会出一大堆的错误,错误信息满屏幕的刷。。。。 好多关于gcc-c++相关的错误,还有就是python相关的错误。一顿帖子的研究,最终发现,是C++库以及依赖的安装有问题,基于上面的基础,再执行一下下面的操作补充安装一下依赖包:

1 [root@CloudGame boost_1_53_0]# yum install gcc gcc-c++ bzip2 bzip2-devel bzip2-libs python-devel -y

再执行./bootstrap.sh以及./b2,就不再出错了,最终得到下面的report,表示boost安装成功:

 1 ..........................
 2 libs/python/src/object/function.cpp:108: warning: dereferencing type-punned pointer will break strict-aliasing rules
 3 libs/python/src/object/function.cpp:110: warning: dereferencing type-punned pointer will break strict-aliasing rules
 4 ./boost/python/refcount.hpp: In function ‘PyObject* boost::python::objects::function_get_class(PyObject*, void*)’:
 5 ./boost/python/refcount.hpp:16: warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
 6 ./boost/python/refcount.hpp:16: warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
 7 libs/python/src/object/function.cpp:671: note: initialized from here
 8 libs/python/src/object/function.cpp: In constructor ‘boost::python::objects::function::function(const boost::python::objects::py_function&, const boost::python::detail::keyword*, unsigned int)’:
 9 libs/python/src/object/function.cpp:108: warning: dereferencing pointer ‘function_type.311’ does break strict-aliasing rules
10 libs/python/src/object/function.cpp:108: note: initialized from here
11 libs/python/src/object/function.cpp:110: warning: dereferencing pointer ‘function_type.311’ does break strict-aliasing rules
12 libs/python/src/object/function.cpp:110: note: initialized from here
13 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object/inheritance.o
14 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object/life_support.o
15 libs/python/src/object/life_support.cpp: In function ‘PyObject* boost::python::objects::make_nurse_and_patient(PyObject*, PyObject*)’:
16 libs/python/src/object/life_support.cpp:94: warning: dereferencing type-punned pointer will break strict-aliasing rules
17 libs/python/src/object/life_support.cpp:96: warning: dereferencing type-punned pointer will break strict-aliasing rules
18 libs/python/src/object/life_support.cpp:94: warning: dereferencing pointer ‘life_support_type.21’ does break strict-aliasing rules
19 libs/python/src/object/life_support.cpp:94: note: initialized from here
20 libs/python/src/object/life_support.cpp:96: warning: dereferencing pointer ‘life_support_type.21’ does break strict-aliasing rules
21 libs/python/src/object/life_support.cpp:96: note: initialized from here
22 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object/pickle_support.o
23 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/errors.o
24 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/module.o
25 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/converter/builtin_converters.o
26 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/converter/arg_to_python_base.o
27 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object/iterator.o
28 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object/stl_iterator.o
29 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object_protocol.o
30 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object_operators.o
31 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/wrapper.o
32 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/import.o
33 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/exec.o
34 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/object/function_doc_signature.o
35 gcc.archive bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/libboost_python.a
36 common.copy stage/lib/libboost_python.a
37 ...updated 70 targets...
38 
39 
40 The Boost C++ Libraries were successfully built!
41 
42 The following directory should be added to compiler include paths:
43 
44     /home/MyDownload/boost_1_53_0
45 
46 The following directory should be added to linker library paths:
47 
48     /home/MyDownload/boost_1_53_0/stage/lib

7. 安装thirft compiler

按照网上传遍大江南北的做法,我失败了,这个网上千篇一律的版本是这么干的:

1 git clone https://git-wip-us.apache.org/repos/asf/thrift.git
2 cd thrift
3 ./bootstrap.sh
4 ./configure --with-lua=no
5 make
6 make install

我在./configure的时候就失败了,错误信息如下:

  1 [root@CloudGame thrift]# ./configure --with-lua=no
  2 checking for a BSD-compatible install... /usr/bin/install -c
  3 checking whether build environment is sane... yes
  4 checking for a thread-safe mkdir -p... /bin/mkdir -p
  5 checking for gawk... gawk
  6 checking whether make sets $(MAKE)... yes
  7 checking whether make supports nested variables... yes
  8 checking whether UID '0' is supported by ustar format... yes
  9 checking whether GID '0' is supported by ustar format... yes
 10 checking how to create a ustar tar archive... gnutar
 11 ./configure: line 3913: PKG_PROG_PKG_CONFIG: command not found
 12 checking for gcc... gcc
 13 checking whether the C compiler works... yes
 14 checking for C compiler default output file name... a.out
 15 checking for suffix of executables... 
 16 checking whether we are cross compiling... no
 17 checking for suffix of object files... o
 18 checking whether we are using the GNU C compiler... yes
 19 checking whether gcc accepts -g... yes
 20 checking for gcc option to accept ISO C89... none needed
 21 checking whether gcc understands -c and -o together... yes
 22 checking for style of include used by make... GNU
 23 checking dependency style of gcc... gcc3
 24 checking how to run the C preprocessor... gcc -E
 25 checking for g++... g++
 26 checking whether we are using the GNU C++ compiler... yes
 27 checking whether g++ accepts -g... yes
 28 checking dependency style of g++... gcc3
 29 checking build system type... x86_64-unknown-linux-gnu
 30 checking host system type... x86_64-unknown-linux-gnu
 31 checking for a sed that does not truncate output... /bin/sed
 32 checking for grep that handles long lines and -e... /bin/grep
 33 checking for egrep... /bin/grep -E
 34 checking for fgrep... /bin/grep -F
 35 checking for ld used by gcc... /usr/bin/ld
 36 checking if the linker (/usr/bin/ld) is GNU ld... yes
 37 checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
 38 checking the name lister (/usr/bin/nm -B) interface... BSD nm
 39 checking whether ln -s works... yes
 40 checking the maximum length of command line arguments... 1966080
 41 checking whether the shell understands some XSI constructs... yes
 42 checking whether the shell understands "+="... yes
 43 checking for /usr/bin/ld option to reload object files... -r
 44 checking for objdump... objdump
 45 checking how to recognize dependent libraries... pass_all
 46 checking for ar... ar
 47 checking for strip... strip
 48 checking for ranlib... ranlib
 49 checking command to parse /usr/bin/nm -B output from gcc object... ok
 50 checking for ANSI C header files... yes
 51 checking for sys/types.h... yes
 52 checking for sys/stat.h... yes
 53 checking for stdlib.h... yes
 54 checking for string.h... yes
 55 checking for memory.h... yes
 56 checking for strings.h... yes
 57 checking for inttypes.h... yes
 58 checking for stdint.h... yes
 59 checking for unistd.h... yes
 60 checking for dlfcn.h... yes
 61 checking whether we are using the GNU C++ compiler... (cached) yes
 62 checking whether g++ accepts -g... (cached) yes
 63 checking dependency style of g++... (cached) gcc3
 64 checking how to run the C++ preprocessor... g++ -E
 65 checking for objdir... .libs
 66 checking if gcc supports -fno-rtti -fno-exceptions... no
 67 checking for gcc option to produce PIC... -fPIC -DPIC
 68 checking if gcc PIC flag -fPIC -DPIC works... yes
 69 checking if gcc static flag -static works... no
 70 checking if gcc supports -c -o file.o... yes
 71 checking if gcc supports -c -o file.o... (cached) yes
 72 checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 73 checking whether -lc should be explicitly linked in... no
 74 checking dynamic linker characteristics... GNU/Linux ld.so
 75 checking how to hardcode library paths into programs... immediate
 76 checking whether stripping libraries is possible... yes
 77 checking if libtool supports shared libraries... yes
 78 checking whether to build shared libraries... yes
 79 checking whether to build static libraries... yes
 80 checking for ld used by g++... /usr/bin/ld -m elf_x86_64
 81 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
 82 checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 83 checking for g++ option to produce PIC... -fPIC -DPIC
 84 checking if g++ PIC flag -fPIC -DPIC works... yes
 85 checking if g++ static flag -static works... no
 86 checking if g++ supports -c -o file.o... yes
 87 checking if g++ supports -c -o file.o... (cached) yes
 88 checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 89 checking dynamic linker characteristics... GNU/Linux ld.so
 90 checking how to hardcode library paths into programs... immediate
 91 checking whether make sets $(MAKE)... (cached) yes
 92 checking for bison... yes
 93 checking for bison version >= 2.5... yes
 94 checking for bison... bison -y
 95 checking for flex... flex
 96 checking lex output file root... lex.yy
 97 checking lex library... none needed
 98 checking whether yytext is a pointer... no
 99 checking whether ln -s works... yes
100 checking for gawk... (cached) gawk
101 checking for ranlib... (cached) ranlib
102 checking whether g++ supports C++11 features by default... no
103 checking whether g++ supports C++11 features with -std=c++11... no
104 checking whether g++ supports C++11 features with -std=c++0x... no
105 configure: No compiler with C++11 support was found
106 ./configure: line 17120: syntax error near unexpected token `QT,'
107 ./configure: line 17120: `    PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 4.3, have_qt=yes, have_qt=no)'

研究了下那个configure文件,太长了,没有深入调研,转而去http://thrift.apache.org/tutorial/ 网站找技术支持,发现哪儿有点信息,于是我重新搞了一边。

先下载thrift 0.9.3版本:

1 wget http://apache.fayea.com/thrift/0.9.3/thrift-0.9.3.tar.gz

然后,解压并执行./configure --with-lua=no,得到下面的信息:

  1 [root@CloudGame thrift-0.9.3]# ./configure --with-lua=no
  2 checking for a BSD-compatible install... /usr/bin/install -c
  3 checking whether build environment is sane... yes
  4 checking for a thread-safe mkdir -p... /bin/mkdir -p
  5 checking for gawk... gawk
  6 checking whether make sets $(MAKE)... yes
  7 checking whether make supports nested variables... yes
  8 checking whether UID '0' is supported by ustar format... yes
  9 checking whether GID '0' is supported by ustar format... yes
 10 checking how to create a ustar tar archive... gnutar
 11 checking for pkg-config... /usr/bin/pkg-config
 12 checking pkg-config is at least version 0.9.0... yes
 13 checking for gcc... gcc
 14 checking whether the C compiler works... yes
 15 checking for C compiler default output file name... a.out
 16 checking for suffix of executables... 
 17 checking whether we are cross compiling... no
 18 checking for suffix of object files... o
 19 checking whether we are using the GNU C compiler... yes
 20 checking whether gcc accepts -g... yes
 21 checking for gcc option to accept ISO C89... none needed
 22 checking whether gcc understands -c and -o together... yes
 23 checking for style of include used by make... GNU
 24 checking dependency style of gcc... gcc3
 25 checking how to run the C preprocessor... gcc -E
 26 checking for g++... g++
 27 checking whether we are using the GNU C++ compiler... yes
 28 checking whether g++ accepts -g... yes
 29 checking dependency style of g++... gcc3
 30 checking build system type... x86_64-unknown-linux-gnu
 31 checking host system type... x86_64-unknown-linux-gnu
 32 checking how to print strings... printf
 33 checking for a sed that does not truncate output... /bin/sed
 34 checking for grep that handles long lines and -e... /bin/grep
 35 checking for egrep... /bin/grep -E
 36 checking for fgrep... /bin/grep -F
 37 checking for ld used by gcc... /usr/bin/ld
 38 checking if the linker (/usr/bin/ld) is GNU ld... yes
 39 checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
 40 checking the name lister (/usr/bin/nm -B) interface... BSD nm
 41 checking whether ln -s works... yes
 42 checking the maximum length of command line arguments... 1966080
 43 checking whether the shell understands some XSI constructs... yes
 44 checking whether the shell understands "+="... yes
 45 checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
 46 checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
 47 checking for /usr/bin/ld option to reload object files... -r
 48 checking for objdump... objdump
 49 checking how to recognize dependent libraries... pass_all
 50 checking for dlltool... no
 51 checking how to associate runtime and link libraries... printf %s\n
 52 checking for ar... ar
 53 checking for archiver @FILE support... @
 54 checking for strip... strip
 55 checking for ranlib... ranlib
 56 checking command to parse /usr/bin/nm -B output from gcc object... ok
 57 checking for sysroot... no
 58 checking for mt... no
 59 checking if : is a manifest tool... no
 60 checking for ANSI C header files... yes
 61 checking for sys/types.h... yes
 62 checking for sys/stat.h... yes
 63 checking for stdlib.h... yes
 64 checking for string.h... yes
 65 checking for memory.h... yes
 66 checking for strings.h... yes
 67 checking for inttypes.h... yes
 68 checking for stdint.h... yes
 69 checking for unistd.h... yes
 70 checking for dlfcn.h... yes
 71 checking for objdir... .libs
 72 checking if gcc supports -fno-rtti -fno-exceptions... no
 73 checking for gcc option to produce PIC... -fPIC -DPIC
 74 checking if gcc PIC flag -fPIC -DPIC works... yes
 75 checking if gcc static flag -static works... no
 76 checking if gcc supports -c -o file.o... yes
 77 checking if gcc supports -c -o file.o... (cached) yes
 78 checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 79 checking whether -lc should be explicitly linked in... no
 80 checking dynamic linker characteristics... GNU/Linux ld.so
 81 checking how to hardcode library paths into programs... immediate
 82 checking whether stripping libraries is possible... yes
 83 checking if libtool supports shared libraries... yes
 84 checking whether to build shared libraries... yes
 85 checking whether to build static libraries... yes
 86 checking how to run the C++ preprocessor... g++ -E
 87 checking for ld used by g++... /usr/bin/ld -m elf_x86_64
 88 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
 89 checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 90 checking for g++ option to produce PIC... -fPIC -DPIC
 91 checking if g++ PIC flag -fPIC -DPIC works... yes
 92 checking if g++ static flag -static works... no
 93 checking if g++ supports -c -o file.o... yes
 94 checking if g++ supports -c -o file.o... (cached) yes
 95 checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 96 checking dynamic linker characteristics... (cached) GNU/Linux ld.so
 97 checking how to hardcode library paths into programs... immediate
 98 checking whether make sets $(MAKE)... (cached) yes
 99 checking for bison... yes
100 checking for bison version >= 2.5... yes
101 checking for bison... bison -y
102 checking for flex... flex
103 checking lex output file root... lex.yy
104 checking lex library... none needed
105 checking whether yytext is a pointer... no
106 checking whether ln -s works... yes
107 checking for gawk... (cached) gawk
108 checking for ranlib... (cached) ranlib
109 checking whether g++ supports C++11 features by default... no
110 checking whether g++ supports C++11 features with -std=c++11... no
111 checking whether g++ supports C++11 features with -std=c++0x... no
112 configure: No compiler with C++11 support was found
113 checking for boostlib >= 1.53.0... yes
114 checking for pkg-config... /usr/bin/pkg-config
115 checking whether compiling and linking against OpenSSL works... yes
116 checking for libevent >= 1.0... yes
117 checking for zlib >= 1.2.3... yes
118 checking for QT... yes
119 checking for moc-qt4... /usr/bin/moc-qt4
120 checking for QT5... no
121 checking for GLIB... yes
122 checking for GOBJECT... yes
123 checking for MONO... no
124 checking for MONO... no
125 checking for MONO... no
126 checking for javac and java... yes
127 checking for ant... no
128 checking for ant version > 1.7... expr: syntax error
129 no
130 checking for erl... no
131 checking for erlc... no
132 checking for nodejs... no
133 checking for node... no
134 checking for npm... no
135 checking for trial... no
136 checking for a Python interpreter with version >= 2.4... python
137 checking for python... /usr/bin/python
138 checking for python version... 2.6
139 checking for python platform... linux2
140 checking for python script directory... ${prefix}/lib/python2.6/site-packages
141 checking for python extension module directory... ${exec_prefix}/lib64/python2.6/site-packages
142 checking for perl... /usr/bin/perl
143 checking for perl module Bit::Vector... no
144 checking for perl module Class::Accessor... no
145 checking for php... no
146 checking for phpunit... no
147 checking for ruby... no
148 checking for bundle... no
149 checking for cabal... no
150 checking for runhaskell... no
151 checking for go... no
152 checking for haxe... no
153 checking for DMD... no
154 checking for library containing strerror... none required
155 checking for an ANSI C-conforming const... yes
156 checking for inline... inline
157 checking for working volatile... yes
158 checking for stdbool.h that conforms to C99... yes
159 checking for _Bool... no
160 checking for ANSI C header files... (cached) yes
161 checking whether time.h and sys/time.h may both be included... yes
162 checking for sys/wait.h that is POSIX.1 compatible... yes
163 checking return type of signal handlers... void
164 checking arpa/inet.h usability... yes
165 checking arpa/inet.h presence... yes
166 checking for arpa/inet.h... yes
167 checking sys/param.h usability... yes
168 checking sys/param.h presence... yes
169 checking for sys/param.h... yes
170 checking fcntl.h usability... yes
171 checking fcntl.h presence... yes
172 checking for fcntl.h... yes
173 checking for inttypes.h... (cached) yes
174 checking limits.h usability... yes
175 checking limits.h presence... yes
176 checking for limits.h... yes
177 checking netdb.h usability... yes
178 checking netdb.h presence... yes
179 checking for netdb.h... yes
180 checking netinet/in.h usability... yes
181 checking netinet/in.h presence... yes
182 checking for netinet/in.h... yes
183 checking pthread.h usability... yes
184 checking pthread.h presence... yes
185 checking for pthread.h... yes
186 checking stddef.h usability... yes
187 checking stddef.h presence... yes
188 checking for stddef.h... yes
189 checking for stdlib.h... (cached) yes
190 checking sys/socket.h usability... yes
191 checking sys/socket.h presence... yes
192 checking for sys/socket.h... yes
193 checking sys/time.h usability... yes
194 checking sys/time.h presence... yes
195 checking for sys/time.h... yes
196 checking sys/un.h usability... yes
197 checking sys/un.h presence... yes
198 checking for sys/un.h... yes
199 checking sys/poll.h usability... yes
200 checking sys/poll.h presence... yes
201 checking for sys/poll.h... yes
202 checking sys/resource.h usability... yes
203 checking sys/resource.h presence... yes
204 checking for sys/resource.h... yes
205 checking for unistd.h... (cached) yes
206 checking libintl.h usability... yes
207 checking libintl.h presence... yes
208 checking for libintl.h... yes
209 checking malloc.h usability... yes
210 checking malloc.h presence... yes
211 checking for malloc.h... yes
212 checking openssl/ssl.h usability... yes
213 checking openssl/ssl.h presence... yes
214 checking for openssl/ssl.h... yes
215 checking openssl/rand.h usability... yes
216 checking openssl/rand.h presence... yes
217 checking for openssl/rand.h... yes
218 checking openssl/x509v3.h usability... yes
219 checking openssl/x509v3.h presence... yes
220 checking for openssl/x509v3.h... yes
221 checking sched.h usability... yes
222 checking sched.h presence... yes
223 checking for sched.h... yes
224 checking wchar.h usability... yes
225 checking wchar.h presence... yes
226 checking for wchar.h... yes
227 checking for pthread_create in -lpthread... yes
228 checking for clock_gettime in -lrt... yes
229 checking for setsockopt in -lsocket... no
230 checking for BN_init in -lcrypto... yes
231 checking for SSL_ctrl in -lssl... yes
232 checking for int16_t... yes
233 checking for int32_t... yes
234 checking for int64_t... yes
235 checking for int8_t... yes
236 checking for mode_t... yes
237 checking for off_t... yes
238 checking for size_t... yes
239 checking for ssize_t... yes
240 checking for uint16_t... yes
241 checking for uint32_t... yes
242 checking for uint64_t... yes
243 checking for uint8_t... yes
244 checking for ptrdiff_t... yes
245 checking whether struct tm is in sys/time.h or time.h... time.h
246 checking whether AI_ADDRCONFIG is declared... yes
247 checking for working alloca.h... yes
248 checking for alloca... yes
249 checking for pid_t... yes
250 checking vfork.h usability... no
251 checking vfork.h presence... no
252 checking for vfork.h... no
253 checking for fork... yes
254 checking for vfork... yes
255 checking for working fork... yes
256 checking for working vfork... (cached) yes
257 checking for stdlib.h... (cached) yes
258 checking for GNU libc compatible malloc... yes
259 checking for working memcmp... yes
260 checking for stdlib.h... (cached) yes
261 checking for GNU libc compatible realloc... yes
262 checking sys/select.h usability... yes
263 checking sys/select.h presence... yes
264 checking for sys/select.h... yes
265 checking for sys/socket.h... (cached) yes
266 checking types of arguments for select... int,fd_set *,struct timeval *
267 checking whether lstat correctly handles trailing slash... yes
268 checking whether stat accepts an empty string... no
269 checking whether strerror_r is declared... yes
270 checking for strerror_r... yes
271 checking whether strerror_r returns char *... yes
272 checking for strftime... yes
273 checking for vprintf... yes
274 checking for _doprnt... no
275 checking for strtoul... yes
276 checking for bzero... yes
277 checking for ftruncate... yes
278 checking for gethostbyname... yes
279 checking for gethostbyname_r... yes
280 checking for gettimeofday... yes
281 checking for memmove... yes
282 checking for memset... yes
283 checking for mkdir... yes
284 checking for realpath... yes
285 checking for select... yes
286 checking for setlocale... yes
287 checking for socket... yes
288 checking for strchr... yes
289 checking for strdup... yes
290 checking for strerror... yes
291 checking for strstr... yes
292 checking for strtol... yes
293 checking for sqrt... yes
294 checking for alarm... yes
295 checking for clock_gettime... yes
296 checking for sched_get_priority_min... yes
297 checking for sched_get_priority_max... yes
298 checking for inet_ntoa... yes
299 checking for pow... yes
300 checking the behavior of a signed right shift... arithmetic
301 checking that generated files are newer than configure... done
302 configure: creating ./config.status
303 config.status: creating Makefile
304 config.status: creating compiler/cpp/Makefile
305 config.status: creating compiler/cpp/version.h
306 config.status: creating compiler/cpp/src/windows/version.h
307 config.status: creating lib/Makefile
308 config.status: creating lib/cpp/Makefile
309 config.status: creating lib/cpp/test/Makefile
310 config.status: creating lib/cpp/thrift-nb.pc
311 config.status: creating lib/cpp/thrift-z.pc
312 config.status: creating lib/cpp/thrift-qt.pc
313 config.status: creating lib/cpp/thrift-qt5.pc
314 config.status: creating lib/cpp/thrift.pc
315 config.status: creating lib/c_glib/Makefile
316 config.status: creating lib/c_glib/thrift_c_glib.pc
317 config.status: creating lib/c_glib/test/Makefile
318 config.status: creating lib/csharp/Makefile
319 config.status: creating lib/csharp/test/ThriftTest/Makefile
320 config.status: creating lib/d/Makefile
321 config.status: creating lib/d/test/Makefile
322 config.status: creating lib/erl/Makefile
323 config.status: creating lib/go/Makefile
324 config.status: creating lib/go/test/Makefile
325 config.status: creating lib/haxe/test/Makefile
326 config.status: creating lib/hs/Makefile
327 config.status: creating lib/java/Makefile
328 config.status: creating lib/js/test/Makefile
329 config.status: creating lib/nodejs/Makefile
330 config.status: creating lib/perl/Makefile
331 config.status: creating lib/perl/test/Makefile
332 config.status: creating lib/php/Makefile
333 config.status: creating lib/php/test/Makefile
334 config.status: creating lib/py/Makefile
335 config.status: creating lib/rb/Makefile
336 config.status: creating lib/lua/Makefile
337 config.status: creating test/Makefile
338 config.status: creating test/c_glib/Makefile
339 config.status: creating test/cpp/Makefile
340 config.status: creating test/erl/Makefile
341 config.status: creating test/go/Makefile
342 config.status: creating test/haxe/Makefile
343 config.status: creating test/hs/Makefile
344 config.status: creating test/php/Makefile
345 config.status: creating test/perl/Makefile
346 config.status: creating test/py/Makefile
347 config.status: creating test/py.twisted/Makefile
348 config.status: creating test/py.tornado/Makefile
349 config.status: creating test/rb/Makefile
350 config.status: creating tutorial/Makefile
351 config.status: creating tutorial/c_glib/Makefile
352 config.status: creating tutorial/cpp/Makefile
353 config.status: creating tutorial/go/Makefile
354 config.status: creating tutorial/haxe/Makefile
355 config.status: creating tutorial/hs/Makefile
356 config.status: creating tutorial/java/Makefile
357 config.status: creating tutorial/js/Makefile
358 config.status: creating tutorial/nodejs/Makefile
359 config.status: creating tutorial/py/Makefile
360 config.status: creating tutorial/py.twisted/Makefile
361 config.status: creating tutorial/py.tornado/Makefile
362 config.status: creating tutorial/rb/Makefile
363 config.status: creating config.h
364 config.status: creating lib/cpp/src/thrift/config.h
365 config.status: executing depfiles commands
366 config.status: executing libtool commands
367 
368 thrift 0.9.3
369 
370 Building C++ Library ......... : yes
371 Building C (GLib) Library .... : yes
372 Building Java Library ........ : no
373 Building C# Library .......... : no
374 Building Python Library ...... : no
375 Building Ruby Library ........ : no
376 Building Haxe Library ........ : no
377 Building Haskell Library ..... : no
378 Building Perl Library ........ : no
379 Building PHP Library ......... : no
380 Building Erlang Library ...... : no
381 Building Go Library .......... : no
382 Building D Library ........... : no
383 Building NodeJS Library ...... : no
384 Building Lua Library ......... : no
385 
386 C++ Library:
387    Build TZlibTransport ...... : yes
388    Build TNonblockingServer .. : yes
389    Build TQTcpServer (Qt4) .... : yes
390    Build TQTcpServer (Qt5) .... : no
391 
392 If something is missing that you think should be present,
393 please skim the output of configure to find the missing
394 component.  Details are present in config.log.

这个看上去,是不是很nice。。。废话不多说,继续往下走。。。 执行make

 1 ./src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
 2 ./src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
 3 ./src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
 4 ./src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
 5 ./src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
 6 In file included from ./src/thrift/server/TNonblockingServer.h:28,
 7                  from src/thrift/server/TNonblockingServer.cpp:24:
 8 ./src/thrift/concurrency/ThreadManager.h:150:38: warning: use of C99 long long integer constant
 9 ./src/thrift/concurrency/ThreadManager.h:151:41: warning: use of C99 long long integer constant
10 In file included from src/thrift/server/TNonblockingServer.cpp:24:
11 ./src/thrift/server/TNonblockingServer.h:41:33: error: event2/event_compat.h: No such file or directory
12 ./src/thrift/server/TNonblockingServer.h:42:33: error: event2/event_struct.h: No such file or directory
13 ./src/thrift/server/TNonblockingServer.h:432:31: warning: use of C99 long long integer constant
14 make[4]: *** [src/thrift/server/libthriftnb_la-TNonblockingServer.lo] Error 1
15 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
16 make[3]: *** [all-recursive] Error 1
17 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
18 make[2]: *** [all-recursive] Error 1
19 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib'
20 make[1]: *** [all-recursive] Error 1
21 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3'
22 make: *** [all] Error 2

还是报错,找不到event2的头文件,这个看上去像是没有libevent相关的东西,继续去官网找找找。。。看http://libevent.org/ 我下载了https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz这个版本,最新的稳定版。

解压,然后:

1 ./configure --prefix=/usr/local
2 make
3 make install

再继续执行thrift的make。。。耐心点,会花点时间哟

 1 ...............
 2 ../../lib/cpp/src/thrift/TLogging.h:61:32: warning: anonymous variadic macros were introduced in C99
 3 ../../lib/cpp/src/thrift/TLogging.h:87:34: warning: anonymous variadic macros were introduced in C99
 4 ../../lib/cpp/src/thrift/TLogging.h:97:41: warning: anonymous variadic macros were introduced in C99
 5 ../../lib/cpp/src/thrift/TLogging.h:107:32: warning: anonymous variadic macros were introduced in C99
 6 ../../lib/cpp/src/thrift/TLogging.h:128:38: warning: anonymous variadic macros were introduced in C99
 7 ../../lib/cpp/src/thrift/TLogging.h:150:35: warning: anonymous variadic macros were introduced in C99
 8 In file included from ../../lib/cpp/src/thrift/protocol/TBinaryProtocol.h:23,
 9                  from CppClient.cpp:22:
10 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
11 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
12 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
13 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
14 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
15 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
16 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
17 ../../lib/cpp/src/thrift/protocol/TProtocol.h:613:65: warning: use of C99 long long integer constant
18 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
19 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
20 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
21 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
22 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
23 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
24 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
25 ../../lib/cpp/src/thrift/protocol/TProtocol.h:616:65: warning: use of C99 long long integer constant
26 In file included from ../../lib/cpp/src/thrift/transport/TFileTransport.h:34,
27                  from ../../lib/cpp/src/thrift/transport/TTransportUtils.h:30,
28                  from CppClient.cpp:24:
29 ../../lib/cpp/src/thrift/concurrency/Monitor.h:103:34: warning: use of C99 long long integer constant
30 /bin/sh ../../libtool  --tag=CXX   --mode=link g++ -Wall -Wextra -pedantic -g -O2 -L/usr/local/lib   -o TutorialClient CppClient.o libtutorialgencpp.la ../../lib/cpp/libthrift.la -lssl -lcrypto -lrt -lpthread 
31 libtool: link: g++ -Wall -Wextra -pedantic -g -O2 -o .libs/TutorialClient CppClient.o  -L/usr/local/lib ./.libs/libtutorialgencpp.a /home/MyDownload/thrift-0.9.3/lib/cpp/.libs/libthrift.so ../../lib/cpp/.libs/libthrift.so -lssl -lcrypto -lrt -lpthread -Wl,-rpath -Wl,/usr/local/lib
32 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
33 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
34 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial'
35 ../compiler/cpp/thrift --gen html -r ../tutorial/tutorial.thrift
36 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial'
37 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial'
38 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3'
39 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3'
40 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3'

这次,看到了make成功的信息了,最后安装一下。

  1 [root@CloudGame thrift-0.9.3]# make install
  2 Making install in compiler/cpp
  3 make[1]: Entering directory `/home/MyDownload/thrift-0.9.3/compiler/cpp'
  4 make  install-am
  5 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/compiler/cpp'
  6 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/compiler/cpp'
  7  /bin/mkdir -p '/usr/local/bin'
  8   /bin/sh ../../libtool   --mode=install /usr/bin/install -c thrift '/usr/local/bin'
  9 libtool: install: /usr/bin/install -c thrift /usr/local/bin/thrift
 10 make[3]: Nothing to be done for `install-data-am'.
 11 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/compiler/cpp'
 12 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/compiler/cpp'
 13 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3/compiler/cpp'
 14 Making install in lib
 15 make[1]: Entering directory `/home/MyDownload/thrift-0.9.3/lib'
 16 Making install in cpp
 17 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
 18 Making install in .
 19 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
 20 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
 21  /bin/mkdir -p '/usr/local/lib'
 22  /bin/sh ../../libtool   --mode=install /usr/bin/install -c   libthrift.la libthriftnb.la libthriftz.la libthriftqt.la '/usr/local/lib'
 23 libtool: install: /usr/bin/install -c .libs/libthrift-0.9.3.so /usr/local/lib/libthrift-0.9.3.so
 24 libtool: install: (cd /usr/local/lib && { ln -s -f libthrift-0.9.3.so libthrift.so || { rm -f libthrift.so && ln -s libthrift-0.9.3.so libthrift.so; }; })
 25 libtool: install: /usr/bin/install -c .libs/libthrift.lai /usr/local/lib/libthrift.la
 26 libtool: install: /usr/bin/install -c .libs/libthriftnb-0.9.3.so /usr/local/lib/libthriftnb-0.9.3.so
 27 libtool: install: (cd /usr/local/lib && { ln -s -f libthriftnb-0.9.3.so libthriftnb.so || { rm -f libthriftnb.so && ln -s libthriftnb-0.9.3.so libthriftnb.so; }; })
 28 libtool: install: /usr/bin/install -c .libs/libthriftnb.lai /usr/local/lib/libthriftnb.la
 29 libtool: install: /usr/bin/install -c .libs/libthriftz-0.9.3.so /usr/local/lib/libthriftz-0.9.3.so
 30 libtool: install: (cd /usr/local/lib && { ln -s -f libthriftz-0.9.3.so libthriftz.so || { rm -f libthriftz.so && ln -s libthriftz-0.9.3.so libthriftz.so; }; })
 31 libtool: install: /usr/bin/install -c .libs/libthriftz.lai /usr/local/lib/libthriftz.la
 32 libtool: install: /usr/bin/install -c .libs/libthriftqt-0.9.3.so /usr/local/lib/libthriftqt-0.9.3.so
 33 libtool: install: (cd /usr/local/lib && { ln -s -f libthriftqt-0.9.3.so libthriftqt.so || { rm -f libthriftqt.so && ln -s libthriftqt-0.9.3.so libthriftqt.so; }; })
 34 libtool: install: /usr/bin/install -c .libs/libthriftqt.lai /usr/local/lib/libthriftqt.la
 35 libtool: install: /usr/bin/install -c .libs/libthrift.a /usr/local/lib/libthrift.a
 36 libtool: install: chmod 644 /usr/local/lib/libthrift.a
 37 libtool: install: ranlib /usr/local/lib/libthrift.a
 38 libtool: install: /usr/bin/install -c .libs/libthriftnb.a /usr/local/lib/libthriftnb.a
 39 libtool: install: chmod 644 /usr/local/lib/libthriftnb.a
 40 libtool: install: ranlib /usr/local/lib/libthriftnb.a
 41 libtool: install: /usr/bin/install -c .libs/libthriftz.a /usr/local/lib/libthriftz.a
 42 libtool: install: chmod 644 /usr/local/lib/libthriftz.a
 43 libtool: install: ranlib /usr/local/lib/libthriftz.a
 44 libtool: install: /usr/bin/install -c .libs/libthriftqt.a /usr/local/lib/libthriftqt.a
 45 libtool: install: chmod 644 /usr/local/lib/libthriftqt.a
 46 libtool: install: ranlib /usr/local/lib/libthriftqt.a
 47 libtool: finish: PATH="/usr/java/jdk1.7.0_79/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/apache-maven-3.3.9/bin:/home/water/bin:/sbin" ldconfig -n /usr/local/lib
 48 ----------------------------------------------------------------------
 49 Libraries have been installed in:
 50    /usr/local/lib
 51 
 52 If you ever happen to want to link against installed libraries
 53 in a given directory, LIBDIR, you must either use libtool, and
 54 specify the full pathname of the library, or use the `-LLIBDIR'
 55 flag during linking and do at least one of the following:
 56    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
 57      during execution
 58    - add LIBDIR to the `LD_RUN_PATH' environment variable
 59      during linking
 60    - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
 61    - have your system administrator add LIBDIR to `/etc/ld.so.conf'
 62 
 63 See any operating system documentation about shared libraries for
 64 more information, such as the ld(1) and ld.so(8) manual pages.
 65 ----------------------------------------------------------------------
 66  /bin/mkdir -p '/usr/local/include/thrift/async'
 67  /usr/bin/install -c -m 644 src/thrift/async/TAsyncChannel.h src/thrift/async/TAsyncDispatchProcessor.h src/thrift/async/TAsyncProcessor.h src/thrift/async/TAsyncBufferProcessor.h src/thrift/async/TAsyncProtocolProcessor.h src/thrift/async/TConcurrentClientSyncInfo.h src/thrift/async/TEvhttpClientChannel.h src/thrift/async/TEvhttpServer.h '/usr/local/include/thrift/async'
 68  /bin/mkdir -p '/usr/local/include/thrift/concurrency'
 69  /usr/bin/install -c -m 644 src/thrift/concurrency/BoostThreadFactory.h src/thrift/concurrency/Exception.h src/thrift/concurrency/Mutex.h src/thrift/concurrency/Monitor.h src/thrift/concurrency/PlatformThreadFactory.h src/thrift/concurrency/PosixThreadFactory.h src/thrift/concurrency/StdMonitor.cpp src/thrift/concurrency/StdMutex.cpp src/thrift/concurrency/StdThreadFactory.cpp src/thrift/concurrency/StdThreadFactory.h src/thrift/concurrency/Thread.h src/thrift/concurrency/ThreadManager.h src/thrift/concurrency/TimerManager.h src/thrift/concurrency/FunctionRunner.h src/thrift/concurrency/Util.h '/usr/local/include/thrift/concurrency'
 70  /bin/mkdir -p '/usr/local/include/thrift/processor'
 71  /usr/bin/install -c -m 644 src/thrift/processor/PeekProcessor.h src/thrift/processor/StatsProcessor.h src/thrift/processor/TMultiplexedProcessor.h '/usr/local/include/thrift/processor'
 72  /bin/mkdir -p '/usr/local/include/thrift/protocol'
 73  /usr/bin/install -c -m 644 src/thrift/protocol/TBinaryProtocol.h src/thrift/protocol/TBinaryProtocol.tcc src/thrift/protocol/TCompactProtocol.h src/thrift/protocol/TCompactProtocol.tcc src/thrift/protocol/TDebugProtocol.h src/thrift/protocol/TBase64Utils.h src/thrift/protocol/TJSONProtocol.h src/thrift/protocol/TMultiplexedProtocol.h src/thrift/protocol/TProtocolDecorator.h src/thrift/protocol/TProtocolTap.h src/thrift/protocol/TProtocolException.h src/thrift/protocol/TVirtualProtocol.h src/thrift/protocol/TProtocol.h '/usr/local/include/thrift/protocol'
 74  /bin/mkdir -p '/usr/local/include/thrift/qt'
 75  /usr/bin/install -c -m 644 src/thrift/qt/TQIODeviceTransport.h src/thrift/qt/TQTcpServer.h '/usr/local/include/thrift/qt'
 76  /bin/mkdir -p '/usr/local/include/thrift/server'
 77  /usr/bin/install -c -m 644 src/thrift/server/TConnectedClient.h src/thrift/server/TServer.h src/thrift/server/TServerFramework.h src/thrift/server/TSimpleServer.h src/thrift/server/TThreadPoolServer.h src/thrift/server/TThreadedServer.h src/thrift/server/TNonblockingServer.h '/usr/local/include/thrift/server'
 78  /bin/mkdir -p '/usr/local/include/thrift'
 79  /usr/bin/install -c -m 644 ../../config.h src/thrift/thrift-config.h src/thrift/TDispatchProcessor.h src/thrift/Thrift.h src/thrift/TOutput.h src/thrift/TProcessor.h src/thrift/TApplicationException.h src/thrift/TLogging.h src/thrift/cxxfunctional.h src/thrift/TToString.h '/usr/local/include/thrift'
 80  /bin/mkdir -p '/usr/local/include/thrift/transport'
 81  /usr/bin/install -c -m 644 src/thrift/transport/PlatformSocket.h src/thrift/transport/TFDTransport.h src/thrift/transport/TFileTransport.h src/thrift/transport/TSimpleFileTransport.h src/thrift/transport/TServerSocket.h src/thrift/transport/TSSLServerSocket.h src/thrift/transport/TServerTransport.h src/thrift/transport/THttpTransport.h src/thrift/transport/THttpClient.h src/thrift/transport/THttpServer.h src/thrift/transport/TSocket.h src/thrift/transport/TPipe.h src/thrift/transport/TPipeServer.h src/thrift/transport/TSSLSocket.h src/thrift/transport/TSocketPool.h src/thrift/transport/TVirtualTransport.h src/thrift/transport/TTransport.h src/thrift/transport/TTransportException.h src/thrift/transport/TTransportUtils.h src/thrift/transport/TBufferTransports.h src/thrift/transport/TShortReadTransport.h src/thrift/transport/TZlibTransport.h '/usr/local/include/thrift/transport'
 82  /bin/mkdir -p '/usr/local/lib/pkgconfig'
 83  /usr/bin/install -c -m 644 thrift.pc thrift-nb.pc thrift-z.pc thrift-qt.pc '/usr/local/lib/pkgconfig'
 84 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
 85 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
 86 Making install in test
 87 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/cpp/test'
 88 make  install-am
 89 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/cpp/test'
 90 make[5]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/cpp/test'
 91 make[5]: Nothing to be done for `install-exec-am'.
 92 make[5]: Nothing to be done for `install-data-am'.
 93 make[5]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp/test'
 94 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp/test'
 95 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp/test'
 96 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/cpp'
 97 Making install in c_glib
 98 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib'
 99 Making install in .
100 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib'
101 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib'
102  /bin/mkdir -p '/usr/local/lib'
103  /bin/sh ../../libtool   --mode=install /usr/bin/install -c   libthrift_c_glib.la '/usr/local/lib'
104 libtool: install: /usr/bin/install -c .libs/libthrift_c_glib.so.0.0.0 /usr/local/lib/libthrift_c_glib.so.0.0.0
105 libtool: install: (cd /usr/local/lib && { ln -s -f libthrift_c_glib.so.0.0.0 libthrift_c_glib.so.0 || { rm -f libthrift_c_glib.so.0 && ln -s libthrift_c_glib.so.0.0.0 libthrift_c_glib.so.0; }; })
106 libtool: install: (cd /usr/local/lib && { ln -s -f libthrift_c_glib.so.0.0.0 libthrift_c_glib.so || { rm -f libthrift_c_glib.so && ln -s libthrift_c_glib.so.0.0.0 libthrift_c_glib.so; }; })
107 libtool: install: /usr/bin/install -c .libs/libthrift_c_glib.lai /usr/local/lib/libthrift_c_glib.la
108 libtool: install: /usr/bin/install -c .libs/libthrift_c_glib.a /usr/local/lib/libthrift_c_glib.a
109 libtool: install: chmod 644 /usr/local/lib/libthrift_c_glib.a
110 libtool: install: ranlib /usr/local/lib/libthrift_c_glib.a
111 libtool: finish: PATH="/usr/java/jdk1.7.0_79/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/apache-maven-3.3.9/bin:/home/water/bin:/sbin" ldconfig -n /usr/local/lib
112 ----------------------------------------------------------------------
113 Libraries have been installed in:
114    /usr/local/lib
115 
116 If you ever happen to want to link against installed libraries
117 in a given directory, LIBDIR, you must either use libtool, and
118 specify the full pathname of the library, or use the `-LLIBDIR'
119 flag during linking and do at least one of the following:
120    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
121      during execution
122    - add LIBDIR to the `LD_RUN_PATH' environment variable
123      during linking
124    - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
125    - have your system administrator add LIBDIR to `/etc/ld.so.conf'
126 
127 See any operating system documentation about shared libraries for
128 more information, such as the ld(1) and ld.so(8) manual pages.
129 ----------------------------------------------------------------------
130  /bin/mkdir -p '/usr/local/include/thrift/c_glib/processor'
131  /usr/bin/install -c -m 644 src/thrift/c_glib/processor/thrift_processor.h src/thrift/c_glib/processor/thrift_dispatch_processor.h '/usr/local/include/thrift/c_glib/processor'
132  /bin/mkdir -p '/usr/local/include/thrift/c_glib/protocol'
133  /usr/bin/install -c -m 644 src/thrift/c_glib/protocol/thrift_protocol.h src/thrift/c_glib/protocol/thrift_protocol_factory.h src/thrift/c_glib/protocol/thrift_binary_protocol.h src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h '/usr/local/include/thrift/c_glib/protocol'
134  /bin/mkdir -p '/usr/local/include/thrift/c_glib/server'
135  /usr/bin/install -c -m 644 src/thrift/c_glib/server/thrift_server.h src/thrift/c_glib/server/thrift_simple_server.h '/usr/local/include/thrift/c_glib/server'
136  /bin/mkdir -p '/usr/local/include/thrift/c_glib'
137  /usr/bin/install -c -m 644 ../../config.h src/thrift/c_glib/thrift.h src/thrift/c_glib/thrift_application_exception.h src/thrift/c_glib/thrift_struct.h '/usr/local/include/thrift/c_glib'
138  /bin/mkdir -p '/usr/local/include/thrift/c_glib/transport'
139  /usr/bin/install -c -m 644 src/thrift/c_glib/transport/thrift_buffered_transport.h src/thrift/c_glib/transport/thrift_framed_transport.h src/thrift/c_glib/transport/thrift_memory_buffer.h src/thrift/c_glib/transport/thrift_server_socket.h src/thrift/c_glib/transport/thrift_server_transport.h src/thrift/c_glib/transport/thrift_socket.h src/thrift/c_glib/transport/thrift_transport.h src/thrift/c_glib/transport/thrift_transport_factory.h src/thrift/c_glib/transport/thrift_buffered_transport_factory.h src/thrift/c_glib/transport/thrift_framed_transport_factory.h '/usr/local/include/thrift/c_glib/transport'
140  /bin/mkdir -p '/usr/local/lib/pkgconfig'
141  /usr/bin/install -c -m 644 thrift_c_glib.pc '/usr/local/lib/pkgconfig'
142 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib'
143 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib'
144 Making install in test
145 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
146 make  install-recursive
147 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
148 make[5]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
149 make[6]: Entering directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
150 make[6]: Nothing to be done for `install-exec-am'.
151 make[6]: Nothing to be done for `install-data-am'.
152 make[6]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
153 make[5]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
154 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
155 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib/test'
156 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib/c_glib'
157 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/lib'
158 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/lib'
159 make[3]: Nothing to be done for `install-exec-am'.
160 make[3]: Nothing to be done for `install-data-am'.
161 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib'
162 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib'
163 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3/lib'
164 Making install in test
165 make[1]: Entering directory `/home/MyDownload/thrift-0.9.3/test'
166 Making install in c_glib
167 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/test/c_glib'
168 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/test/c_glib'
169 make[3]: Nothing to be done for `install-exec-am'.
170 make[3]: Nothing to be done for `install-data-am'.
171 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/test/c_glib'
172 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/test/c_glib'
173 Making install in cpp
174 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/test/cpp'
175 make  install-am
176 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/test/cpp'
177 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/test/cpp'
178 make[4]: Nothing to be done for `install-exec-am'.
179 make[4]: Nothing to be done for `install-data-am'.
180 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/test/cpp'
181 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/test/cpp'
182 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/test/cpp'
183 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/test'
184 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/test'
185 make[3]: Nothing to be done for `install-exec-am'.
186 make[3]: Nothing to be done for `install-data-am'.
187 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/test'
188 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/test'
189 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3/test'
190 Making install in tutorial
191 make[1]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial'
192 Making install in c_glib
193 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial/c_glib'
194 make  install-am
195 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial/c_glib'
196 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial/c_glib'
197 make[4]: Nothing to be done for `install-exec-am'.
198 make[4]: Nothing to be done for `install-data-am'.
199 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/c_glib'
200 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/c_glib'
201 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/c_glib'
202 Making install in cpp
203 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
204 make  install-am
205 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
206 make[4]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
207 make[4]: Nothing to be done for `install-exec-am'.
208 make[4]: Nothing to be done for `install-data-am'.
209 make[4]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
210 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
211 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial/cpp'
212 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial'
213 ../compiler/cpp/thrift --gen html -r ../tutorial/tutorial.thrift
214 make[3]: Entering directory `/home/MyDownload/thrift-0.9.3/tutorial'
215 make[3]: Nothing to be done for `install-exec-am'.
216 make[3]: Nothing to be done for `install-data-am'.
217 make[3]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial'
218 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial'
219 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3/tutorial'
220 make[1]: Entering directory `/home/MyDownload/thrift-0.9.3'
221 make[2]: Entering directory `/home/MyDownload/thrift-0.9.3'
222 make[2]: Nothing to be done for `install-exec-am'.
223 make[2]: Nothing to be done for `install-data-am'.
224 make[2]: Leaving directory `/home/MyDownload/thrift-0.9.3'
225 make[1]: Leaving directory `/home/MyDownload/thrift-0.9.3'

官网上说,下载了thrift的包后,解压然后configure & make,没有提make install,结合我上面的make install来看,貌似最后的make install与make的差别不大,是不是真的make install就不必要了,呵呵,需要研究makefile,才可以知道细节,暂且不研究了。。。

检查下,是否安装成功了嘛:

1 [root@CloudGame MyDownload]# thrift --version
2 Thrift version 0.9.3

到此,thrift的安装已经全部完成。 若有需要的,请转走,不谢!转载说明出处!

 

参考网址: http://thrift.apache.org/docs/install/centos, http://libevent.org/