Compile and install thrift0.9.3 in Ubuntu

Source: Internet
Author: User
Thrift0.9.3 compilation and installation in Ubuntu 1 download the thrift source code gitclonehttps: // example

Compile and install thrift 0.9.3 in Ubuntu

1. Download the thrift source code.
Git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
Git checkout 0.9.3
2. Compile and install
Install dependency

Apt-get install automake
Apt-get install libssl-dev
Apt-get install byacc
Apt-get install bison
Apt-get install flex
Apt-get install libevent-dev
Generate the compilation File

Cd thrift
./Bootstrap. sh
Configure. 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'
Disable java and python before compilation. Set the installation directory to/usr/lib instead of the default/usr/local/lib directory.

./Configure -- libdir =/usr/lib -- without-java -- without-python
...
Thrift 0.9.3

Building C ++ Library ......: yes
Building C (GLib) Library...: no
Building Java Library ......: no
Building C # Library ......: no
Building Python Library...: no
Building Ruby Library ......: no
Building Haxe Library ......: no
Building Haskell Library...: no
Building Perl Library ......: no
Building PHP Library ......: no
Building Erlang Library...: no
Building Go Library ......: no
Building D Library ......: no
Building NodeJS Library...: no
Building Lua Library ......: no

C ++ Library:
Build TZlibTransport...: yes
Build TNonblockingServer...: yes
Build TQTcpServer (Qt4)...: no
Build TQTcpServer (Qt5)...: no

If something is missing that you think shoshould be present,
Please skim the output of configure to find the missing
Component. Details are present in config. log.
Compile

Make
3. Run the test program
Test

Make check
Note: make check in v0.9.3 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 14 12:19:09 2015 TServerSocket: listen () BIND 9090
4 installation
Sudo make install

Note:

$ Thrift-git-project is the directory of the thrift gi project
Install the library file in the/usr/lib directory
The header file is installed in the/usr/local/include/thrift directory.
Making install in compiler/cpp
Make [1]: Entering directory '$ thrift-git-project/compiler/cpp'
Make install-am
Make [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/local/bin/thrift
Make [3]: Nothing to be 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 lib
Make [1]: Entering directory '$ thrift-git-project/lib'
Making install in cpp
Make [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 libthritnb. la libthriftz. la '/usr/lib'
Libtool: install:/usr/bin/install-c. libs/libthrift-0.9.3.so/usr/lib/libthrift-0.9.3.so
Libtool: install: (cd/usr/lib & {ln-s-f libthrift-0.9.3.so libthrift. 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. la
Libtool: install:/usr/bin/install-c. libs/libthriftnb-0.9.3.so/usr/lib/libthriftnb-0.9.3.so
Libtool: install: (cd/usr/lib & {ln-s-f libthriftnb-0.9.3.so libthritnb. so | {rm-f libthritnb. so & ln-s libthriftnb-0.9.3.so libthritnb. so ;};})
Libtool: install:/usr/bin/install-c. libs/libthritnb. lai/usr/lib/libthritnb. la
Libtool: install:/usr/bin/install-c. libs/libthriftz-0.9.3.so/usr/lib/libthriftz-0.9.3.so
Libtool: install: (cd/usr/lib & {ln-s-f libthriftz-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. la
Libtool: install:/usr/bin/install-c. libs/libthrift. a/usr/lib/libthrift.
Libtool: install: chmod 644/usr/lib/libthrift.
Libtool: install: ranlib/usr/lib/libthrift.
Libtool: install:/usr/bin/install-c. libs/libthritnb. a/usr/lib/libthritnb.
Libtool: install: chmod 644/usr/lib/libthritnb.
Libtool: install: ranlib/usr/lib/libthritnb.
Libtool: install:/usr/bin/install-c. libs/libthriftz. a/usr/lib/libthriftz.
Libtool: install: chmod 644/usr/lib/libthriftz.
Libtool: install: ranlib/usr/lib/libthriftz.
Libtool: 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/lib

If you ever happen to want to link against installed libraries
In a given directory, LIBDIR, you must either use libtool, and
Specify the full pathname of the library, or use the '-llibdir'
Flag during linking and do 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 linking
-Use the '-Wl,-rpath-Wl, libdir' linker flag
-Have your system administrator add LIBDIR to '/etc/ld. so. conf'

See any operating system documentation about shared libraries
More 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 test
Make [3]: Entering directory '$ thrift-git-project/lib/cpp/Test'
Make install-am
Make [4]: Entering directory '$ thrift-git-project/lib/cpp/Test'
Make [5]: Entering directory '$ thrift-git-project/lib/cpp/Test'
Make [5]: Nothing to be done for 'Install-exec-am '.
Make [5]: Nothing to be done for 'Install-data-am '.
Make [5]: Leaving directory '$ thrift-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 be 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 test
Make [1]: Entering directory '$ thrift-git-project/Test'
Making install in cpp
Make [2]: Entering directory '$ thrift-git-project/test/cpp'
Make install-am
Make [3]: Entering directory '$ thrift-git-project/test/cpp'
Make [4]: Entering directory '$ thrift-git-project/test/cpp'
Make [4]: Nothing to be done for 'Install-exec-am '.
Make [4]: Nothing to be 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 be done for 'Install-exec-am '.
Make [3]: Nothing to be 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 tutorial
Make [1]: Entering directory '$ thrift-git-project/tutorial'
Making install in cpp
Make [2]: Entering directory '$ thrift-git-project/tutorial/cpp'
Make install-am
Make [3]: Entering directory '$ thrift-git-project/tutorial/cpp'
Make [4]: Entering directory '$ thrift-git-project/tutorial/cpp'
Make [4]: Nothing to be done for 'Install-exec-am '.
Make [4]: Nothing to be 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. thrift
Make [3]: Entering directory '$ thrift-git-project/tutorial'
Make [3]: Nothing to be done for 'Install-exec-am '.
Make [3]: Nothing to be 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 done for 'Install-exec-am '.
Make [2]: Nothing to be done for 'Install-data-am '.
Make [2]: Leaving directory '$ thrift-git-Project'
Make [1]: Leaving directory '$ thrift-git-Project'

Thrift uses an instance http://www.linuxidc.com/Linux/2014-07/104313.htm

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-01/127417.htm

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.