Ubuntu Thrift 0.9.3 Compilation Installation

Source: Internet
Author: User
Tags git clone

Table of Contents
    • 1. Download Thrift Source Code
    • 2. Compiling and installing
    • 3. Run the test program
    • 4. Installation
1 Download Thrift source Code
git clone https://git-wip-us.apache.org/repos/asf/thrift.git thriftgit checkout 0.9.3
2 Compiling and installing

Installation dependencies

Apt-get Install automakeapt-get Install libssl-devapt-get install byaccapt-get install bisonapt-get install flexapt-get I Nstall Libevent-dev

Generate a compiled file

CD thrift./bootstrap.shconfigure.ac:84:installing './compile ' configure.ac:88:installing './config.guess ' Configure.ac:88:installing './config.sub ' configure.ac:27:installing './install-sh ' configure.ac:27:installing '. Missing ' compiler/cpp/makefile.am:installing './depcomp ' configure.ac:installing './ylwrap '

Pre-compilation configuration, disable Java and Python, install directory set to/usr/lib instead of default/usr/local/lib

./configure--libdir=/usr/lib--without-java-- Without-python...thrift 0.9.3Building C + + library ...: yesbuilding C (GLIB) Library ....: nobuilding Java Library Ding Haxe Library ...: nobuilding Haskell Library .....: nobuilding Perl Library ...: nobuilding PHP Library, ..... ...: nobuilding Erlang library ...: nobuilding Go Library .....: nobuilding D Library .......: Nobui........... Lding NodeJS Library ...: nobuilding Lua library ...: noc++ library:build tzlibtransport ....: Yes, Buil, and so on. D tnonblockingserver.  : Yes Build Tqtcpserver (QT4) ...: No build tqtcpserver (QT5) ....: noif something is missing so you think should  Be present,please skim the output of configure to find the missingcomponent. Details is present in Config.log. 

Compile

Make
3 running the test program

Test

Make check

Note that the v0.9.3 make check has a bug, here is the corresponding Jira issue, the error message is

An error message from getaddrinfo on the console is Expected:Thrift:Mon Dec 12:19:09 tserversocket::listen () BIND 9090
4 Installation

sudo make install

Attention:

    • $thrift-git-project is the directory where the Thrift GI project is located
    • Library files are installed in the/usr/lib directory
    • The header file is installed in the/usr/local/include/thrift directory
Making install in compiler/cppmake[1]: Entering directory ' $thrift-git-project/compiler/cpp ' make install-ammake[2]: Entering directory ' $thrift-git-project/compiler/cpp ' make[3]: Entering directory ' $thrift-git-project/compiler/cpp ' /bin/mkdir-p '/usr/local/bin '/bin/bash. /.. /libtool--mode=install/usr/bin/install-c Thrift '/usr/local/bin ' Libtool:install:/usr/bin/install-c thrift/usr/loc AL/BIN/THRIFTMAKE[3]: Nothing to being done for ' install-data-am '. make[3]: Leaving directory ' $thrift-git-project/compiler /cpp ' make[2]: Leaving directory ' $thrift-git-project/compiler/cpp ' make[1]: Leaving directory ' $thrift-git-project/ Compiler/cpp ' Making install in libmake[1]: Entering directory ' $thrift-git-project/lib ' Making install in cppmake[2]: Entering directory ' $thrift-git-project/lib/cpp ' Making install in. make[3]: Entering directory ' $thrift-git-project/ Lib/cpp ' make[4]: Entering directory ' $thrift-git-project/lib/cpp '/bin/mkdir-p '/usr/lib '/bin/bash '. /.. /libtool--mode=install/usr/bin/install-c libthrift.la libthriftnb.la libthriftz.la '/usr/lib ' Libtool:install:/usr/bin/install-c. libs/lib Thrift-0.9.3.so/usr/lib/libthrift-0.9.3.solibtool:install: (cd/usr/lib && {ln-s-F libthrift-0.9.3.so libthr ift.so | | {rm-f libthrift.so && ln-s libthrift-0.9.3.so libthrift.so;}; }) Libtool:install:/usr/bin/install-c. Libs/libthrift.lai/usr/lib/libthrift.lalibtool:install:/usr/bin/install-c . Libs/libthriftnb-0.9.3.so/usr/lib/libthriftnb-0.9.3.solibtool:install: (cd/usr/lib && {ln-s-F libthriftnb-0.9.3.so libthriftnb.so | | {rm-f libthriftnb.so && ln-s libthriftnb-0.9.3.so libthriftnb.so;}; }) Libtool:install:/usr/bin/install-c. Libs/libthriftnb.lai/usr/lib/libthriftnb.lalibtool:install:/usr/bin/ Install-c. Libs/libthriftz-0.9.3.so/usr/lib/libthriftz-0.9.3.solibtool:install: (cd/usr/lib && {ln-s-F libt hriftz-0.9.3.so libthriftz.so | | {rm-f libthriftz.so && ln-s libthriftz-0.9.3.so Libthriftz.so; }; }) Libtool:install:/usr/bin/install-c. Libs/libthriftz.lai/usr/lib/libthriftz.lalibtool:install:/usr/bin/install -C. libs/libthrift.a/usr/lib/libthrift.alibtool:install:chmod 644/usr/lib/libthrift.alibtool:install:ranlib/usr/ Lib/libthrift.alibtool:install:/usr/bin/install-c. Libs/libthriftnb.a/usr/lib/libthriftnb.alibtool:install: chmod 644/usr/lib/libthriftnb.alibtool:install:ranlib/usr/lib/libthriftnb.alibtool:install:/usr/bin/install-c. Libs/libthriftz.a/usr/lib/libthriftz.alibtool:install:chmod 644/usr/lib/libthriftz.alibtool:install:ranlib/usr/ Lib/libthriftz.alibtool:finish:path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" Ldconfig-n/usr/lib----------------------------------------------------------------------Libraries have been Installed in:/usr/libif-ever happen to want-link against installed Librariesin a given directory, Libdir, you mu St either use Libtool, andspecify the full pathname of the Library, or use the '-llibdir ' flag during linking and does at least one of the following:-add Libdir to the ' ld_library _path ' environment variable during execution-add libdir to the ' Ld_run_path ' environment variable during Linki Ng-use the '-WL,-RPATH-WL,LIBDIR ' linker flag-have Your system administrator add Libdir to '/etc/ld.so.conf ' see a NY operating system documentation about shared libraries Formore information, such as the LD (1) and ld.so (8) manual pages. ----------------------------------------------------------------------/bin/mkdir-p '/usr/local/include/thrift/ Async '/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 '/bin/mkdir-p '/usr/local/include/thrift/concurrency '/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 '/bin/mkdir-p '/usr/local/include/thrift/processor '/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 '/bin/mkdir-p '/usr/local/include/thrift/protocol '/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 '/bin/mkdir-p '/ Usr/local/include/thrift/qt '/usr/bin/install-c-M 644 src/thrift/qt/tqiodevicetransport.h src/thrift/qt/ TQTcpServer.h '/usr/local/include/thrift/qt '/bin/mkdir-p '/usr/local/include/thrift/server '/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 '/bin/mkdir-p '/usr/local/include/thrift '/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 '/bin/mkdir-p '/usr/local/include/thrift/transport '/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 '/bin /mkdir-p '/usr/lib/pkgconfig '/usr/bin/install-c-M 644 thrift.pc thrift-nb.pc thrift-z.pc '/usr/lib/pkgconfig ' make[4] : Leaving directory ' $thrift-git-project/lib/cpp ' make[3]: Leaving directory ' $thrift-git-project/lib/cpp ' Making Install in testmake[3]: Entering directory ' $thrift-git-project/lib/cpp/test ' make install-ammake[4]: Entering Directory ' $thrift-git-project/lib/cpp/test ' make[5]: Entering directory ' $thrift-git-project/lib/cpp/test ' make[5]: Nothing-to-be-do for ' install-exec-am '. Make[5]: Nothing to is done for ' install-data-am '. make[5]: Leaving directory ' $th Rift-git-project/lib/cpp/test ' make[4]: Leaving directory ' $thrift-git-project/lib/cpp/test ' make[3]: Leaving directory ' $thrift-git-project/lib/cpp/test ' make[2]: Leaving directory ' $ Thrift-git-project/lib/cpp ' make[2]: Entering directory ' $thrift-git-project/lib ' make[3]: Entering directory ' $ Thrift-git-project/lib ' make[3]: Nothing-to-be-done for ' install-exec-am '. Make[3]: Nothing to being done for ' install-data-am ' . make[3]: Leaving directory ' $thrift-git-project/lib ' make[2]: Leaving directory ' $thrift-git-project/lib ' make[1]: Leaving directory ' $thrift-git-project/lib ' Making install in testmake[1]: Entering directory ' $thrift-git-project/test ' Making install in cppmake[2]: Entering directory ' $thrift-git-project/test/cpp ' make install-ammake[3]: Entering Directory ' $thrift-git-project/test/cpp ' make[4]: Entering directory ' $thrift-git-project/test/cpp ' make[4]: nothing To is done for ' install-exec-am '. Make[4]: Nothing to is done for ' install-data-am '. make[4]: Leaving directory ' $thrift-git -project/test/cpp ' make[3]: Leaving directory ' $thrift-git-project/test/cpp ' make[2]: LEaving directory ' $thrift-git-project/test/cpp ' make[2]: Entering directory ' $thrift-git-project/test ' make[3]:  Entering directory ' $thrift-git-project/test ' make[3]: Nothing to being done for ' install-exec-am '. Make[3]: Nothing to being done For ' Install-data-am '. make[3]: Leaving directory ' $thrift-git-project/test ' make[2]: Leaving directory ' $ Thrift-git-project/test ' make[1]: Leaving directory ' $thrift-git-project/test ' Making install in tutorialmake[1]: Entering directory ' $thrift-git-project/tutorial ' Making install in cppmake[2]: Entering directory ' $thrift-git-project /tutorial/cpp ' Make install-ammake[3]: Entering directory ' $thrift-git-project/tutorial/cpp ' make[4]: Entering  Directory ' $thrift-git-project/tutorial/cpp ' make[4]: Nothing to being done for ' install-exec-am '. Make[4]: Nothing to being done For ' Install-data-am '. make[4]: Leaving directory ' $thrift-git-project/tutorial/cpp ' make[3]: Leaving directory ' $ Thrift-git-project/tutorial/cpp ' make[2]: Leaving directory ' $thrift-git-project/tutorial/CPP ' make[2]: Entering directory ' $thrift-git-project/tutorial '. /compiler/cpp/thrift--gen Html-r. /TUTORIAL/TUTORIAL.THRIFTMAKE[3]: Entering directory ' $thrift-git-project/tutorial ' make[3]: Nothing to being done for ' Install-exec-am '. Make[3]: Nothing to being done for ' install-data-am '. make[3]: Leaving directory ' $thrift-git-project/ Tutorial ' make[2]: Leaving directory ' $thrift-git-project/tutorial ' make[1]: Leaving directory ' $thrift-git-project/ Tutorial ' make[1]: Entering directory ' $thrift-git-project ' make[2]: Entering directory ' $thrift-git-project ' make[2]: Nothing-to-be-do for ' install-exec-am '. Make[2]: Nothing to is done for ' install-data-am '. make[2]: Leaving directory ' $th Rift-git-project ' make[1]: Leaving directory ' $thrift-git-project '

Author:dean

CREATED:2015-12-14 One 22:46

Validate


From: http://blog.csdn.net/csfreebird/article/details/50293715

Ubuntu Thrift 0.9.3 Compilation Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.