Thrift源碼編譯

Thrfit0.11版本安裝

沙灣網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)建站,沙灣網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為沙灣1000多家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的沙灣做網(wǎng)站的公司定做!

構(gòu)建Apache Thrift IDL編譯器

環(huán)境準(zhǔn)備

????????????yum install libtool libtool-devel libevent libevent-devel flex? byacc byacc-devel? boost boost-devel? bison bison-devel -y

下載

????????????wget https://github.com/apache/thrift/archive/0.11.0.tar.gz

指令執(zhí)行

?./bootstrap.sh
./configure --enable-libs=no --prefix=/home/test/
make && make install

說明?--enable-libs=no開關(guān)僅在沒有l(wèi)ib構(gòu)建的情況下構(gòu)建Apache Thrift IDL編譯器

configure后面可以指定如下需要編譯的語言庫

? --with-csharp?????????? build the C# library [default=yes]
? --with-java???????????? build the Java library [default=yes]
? --with-erlang?????????? build the Erlang library [default=yes]
? --with-nodejs?????????? build the Nodejs library [default=yes]
? --with-lua????????????? build the Lua library [default=yes]
? --with-python?????????? build the Python library [default=yes]
? --with-perl???????????? build the Perl library [default=yes]
? --with-php????????????? build the PHP library [default=yes]
? --with-php_extension??? build the PHP_EXTENSION library [default=yes]
? --with-dart???????????? build the DART library [default=yes]
? --with-ruby???????????? build the Ruby library [default=yes]
? --with-haskell????????? build the Haskell library [default=yes]
? --with-go?????????????? build the Go library [default=yes]

注意

# 當(dāng)make報(bào)錯(cuò)時(shí),package golang.org/x/net/context: unrecognized import path "golang.org/x/net/context",可以把go關(guān)掉:
[root@node1 thrift-0.11.0]# ./configure? --with-go=no

Thrift C++動(dòng)態(tài)庫編譯

源碼目錄:thrift-0.11.0/lib/cpp

只有當(dāng)執(zhí)行了./configure --enable-libs=no --prefix=/home/test/,進(jìn)行了IDL的配置之后,才會(huì)根據(jù)Makefile.am文件生成Makefile文件。

只有執(zhí)行了make &&make install,才能夠正常的編譯完成C++的測試?yán)?,出錯(cuò)如下,原因是還沒有生成IDL工具thrift:

make[1]: Entering directory '/home/dong/thrift/thrift-0.11.0/lib/cpp/test'
/home/dong/thrift/thrift-0.11.0/compiler/cpp/thrift --gen cpp ../../../test/AnnotationTest.thrift
make[1]: /home/dong/thrift/thrift-0.11.0/compiler/cpp/thrift: Command not found
make[1]: *** [Makefile:1815: gen-cpp/AnnotationTest_types.h] Error 127
make[1]: Leaving directory '/home/dong/thrift/thrift-0.11.0/lib/cpp/test'
make: *** [Makefile:1720: all-recursive] Error 1

實(shí)際上已經(jīng)成功生成了libthrift動(dòng)態(tài)庫目錄在thrift-0.11.0/lib/cpp/.libs

庫:libthrift-0.11.0.so? libthrift.a? libthrift.la? libthrift.lai? libthrift.so

Thrfit0.90版本安裝

1)確保系統(tǒng)安裝了OpenSSL開發(fā)包

rpm -qa |grep openssl
openssl-libs-1.0.2k-19.el7.x86_64
openssl-1.0.2k-19.el7.x86_64
openssl-devel-1.0.2k-19.el7.x86_64

2)沒有rpm源倉庫,手動(dòng)編譯指定安裝

./configure CPPFLAGS="-I /home/dong/3thrdparty/openssl-1.0.2j/include" LDFLAGS="-ldl -L /home/dong/3thrdparty/openssl-1.0.2j/"

否則編譯出錯(cuò)

configure: error: "Error: libcrypto required."

網(wǎng)頁標(biāo)題:Thrift源碼編譯
文章分享:http://m.kartarina.com/article36/pgocpg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動(dòng)態(tài)網(wǎng)站、App設(shè)計(jì)移動(dòng)網(wǎng)站建設(shè)、面包屑導(dǎo)航、軟件開發(fā)、企業(yè)建站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站
主站蜘蛛池模板: 日韩欧精品无码视频无删节| 日韩人妻无码免费视频一区二区三区| 中文字幕精品无码亚洲字| 人妻精品久久无码区洗澡| 亚洲人成网亚洲欧洲无码久久| 日韩精品少妇无码受不了| 无码精品国产dvd在线观看9久| 精品人妻无码专区中文字幕| 亚洲精品久久无码| 少妇无码一区二区二三区| 久久精品无码一区二区日韩AV| 精品人妻无码一区二区三区蜜桃一| 亚洲∧v久久久无码精品| 中文字幕精品无码久久久久久3D日动漫 | 久久精品aⅴ无码中文字字幕重口| 精品无码成人网站久久久久久| 亚洲成av人片在线观看无码不卡| 日韩夜夜高潮夜夜爽无码| 孕妇特级毛片WW无码内射| 精品无码一区二区三区爱欲九九| 中文字幕av无码一区二区三区电影| 国产在线无码精品无码| 亚洲av中文无码字幕色不卡| 18精品久久久无码午夜福利| 亚洲AV日韩AV永久无码免下载| 国产精品99久久久精品无码 | 无码少妇一区二区| 国产亚洲精品无码成人| 成人无码WWW免费视频| 国产色爽免费无码视频| 亚洲午夜福利AV一区二区无码| 亚洲av无码不卡私人影院| 无码日韩人妻精品久久| 无码av中文一区二区三区桃花岛| 国产福利无码一区在线| 色欲香天天综合网无码| 亚洲成av人片在线观看天堂无码| 精品久久久无码人妻字幂| 亚洲Av无码乱码在线znlu| 国产精品无码v在线观看| 亚洲无码在线播放|