Thrift installation and troubleshooting

Source: Internet
Author: User

Introduction 

Thrift is one of Facebook's core technical frameworks, allowing systems developed in different languages to communicate through this framework. The developer uses the format provided by thrift to define data and service scripts. Thrift can automatically generate code in different languages through defined scripts to support communication between different languages. Thrift supports multiple data communication protocols, such as XML, Jason, and Binnary.

Thrift is not the only cross-language communication framework. Google's protocol buffers is also a similar framework. For the comparison between the two, you can refer to them.

 

Trift Installation

1. install the linux package Autoconf automake sysconftool boost-devel libtool byacc flex bison on which thrift depends. Please install it according to the relevant system, because the Red hat5 server version is used now, therefore, I directly find the RPM package from the disc and install it directly using the rpm-IVH package name. rpm for installation.

2. Download thrift code: http://incubator.apache.org/thrift/download/

3. decompress the code package tar-zxvf thrift-0.2.0-incubating.tar.gz

4. Copy thrift to the installation directory CP-r thrift0.2.0/usr/local/

5. CD/usr/local/thrift0.2.0 run the./Bootstrap. sh shell script in this directory. You may encounter these two errors in this step.

Error 1

[Root @ localhost thrift] #./Bootstrap. Sh -- enable-m4_pattern_allow

Libtoolize: You shocould Add the contents of './aclocal/libtool. M4' to 'aclocal. M4 '.

Libtoolize: You shocould Add the contents of './aclocal/ltoptions. M4' to 'aclocal. M4 '.

Libtoolize: You shocould Add the contents of './aclocal/ltsugar. M4' to 'aclocal. M4 '.

Libtoolize: You shocould Add the contents of './aclocal/ltversion. M4' to 'aclocal. M4 '.

Libtoolize: You shocould Add the contents of './aclocal/LT ~ Obsolete. M4 'to 'aclocal. M4 '.

Configure. AC: 50: Error: Possibly undefined macro: ac_prog_mkdir_p

If this token and others are legitimate, please use m4_pattern_allow.

See the Autoconf documentation.

Configure. AC: 144: Error: Possibly undefined macro: ac_type_int16_t

Configure. AC: 145: Error: Possibly undefined macro: ac_type_int32_t

Configure. AC: 146: Error: Possibly undefined macro: ac_type_int64_t

Configure. AC: 147: Error: Possibly undefined macro: ac_type_int8_t

Configure. AC: 151: Error: Possibly undefined macro: ac_type_ssize_t

Configure. AC: 152: Error: Possibly undefined macro: ac_type_uint16_t

Configure. AC: 153: Error: Possibly undefined macro: ac_type_uint32_t

Configure. AC: 154: Error: Possibly undefined macro: ac_type_uint64_t

Configure. AC: 155: Error: Possibly undefined macro: ac_type_uint8_t

Configure. AC: Installing './install-Sh'

Configure. AC: Installing './missing'

Compiler/CPP/makefile. AM: Installing './depcomp'

Configure. AC: 44: Installing './config. Guess'

Configure. AC: 44: Installing './config. sub'

This error can be ignored without affecting usage.

Error 2

Required file './ltmain. Sh' not found

Solution: Install the libtool package

6. Run./configure

7. Two errors may occur when running./make.

Error 1

. /Bin/sh http://www.cnblogs.com/libtool -- tag = cxx -- mode = compile g ++-dhave_config_h-I. -I .. /.. -I/usr/include-I. /src-wall-g-O2-MT thrift. lo-MD-MP-MF. deps/thrift. TPO-c-o thrift. lo'test-F' src/thrift. CPP '| echo '. /''src/thrift. CPP

Http: // www.cnblogs.com/libtool: line 841: X -- tag = cxx: Command not found

Http://www.cnblogs.com/libtool: line 874: libtool: Ignoring unknown Tag: Command not found

Http: // www.cnblogs.com/libtool: line 841: X -- mode = compile: Command not found

Http://www.cnblogs.com/libtool: line 1008: *** warning: inferring the mode of operation is deprecated.: Command not found

Http://www.cnblogs.com/libtool: line 1009: *** ure versions of libtool will require -- mode = mode be specified.: Command not found

Http://www.cnblogs.com/libtool: line 1152: XG ++: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-DHAVE_CONFIG_H: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-I.: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-I...: no such file or directory

Http://www.cnblogs.com/libtool: line 1152: X-I/usr/include: no such file or directory

Http://www.cnblogs.com/libtool: line 1152: X-I./src: no such file or directory

Http: // www.cnblogs.com/libtool: line 1152: X-wall: Command not found

Http: // www.cnblogs.com/libtool: line 1152: X-G: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-O2: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-MT: Command not found

Http://www.cnblogs.com/libtool: line 1152: xthrift. Lo: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-MD: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-MP: Command not found

Http://www.cnblogs.com/libtool: line 1152: X-MF: Command not found

Http://www.cnblogs.com/libtool: line 1152: X. deps/thrift. TPO: no such file or directory

Http: // www.cnblogs.com/libtool: line 1152: X-C: Command not found

Http://www.cnblogs.com/libtool: line 1205: xthrift. Lo: Command not found

Http://www.cnblogs.com/libtool: line 1210: libtool: compile: cannot determine name of library object from '': Command not found

Solution: libtool is currently only available on the server.

(1) uninstall the original server's libtool

(2) download the latest libtool installation, wget http://ftp.gnu.org/gnu/libtool/libtool-2.2.6b.tar.gz./configure; Make; make install

(3) re-install thrift step 4.

Error 2

An error occurred while compiling the Java package because Maven is not allowed because there is no link to the network. You can ignore it. You need to use Java for manual compilation later.

8. After the installation is complete, enter Thrift on the terminal and a message is displayed, indicating that the installation is successful.

 

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.