mac上編譯thrift 0.8.0

mac上編譯thrift 0.8.0

git上下載了 thrift 0.8的源碼,開始編譯,發現一些問題,記錄一下:

1、編譯報錯
thrifty.h 文件找不到,確認是 automake的一個BUG,是產生的文件擴展名叢h變成了hh,參考: https://issues.apache.org/jira/browse/THRIFT-1614
以及對應的補丁:https://issues.apache.org/jira/secure/attachment/12565867/THRIFT-1838.patch
其實手工改一行就行,把 /compiler/cpp/src/thriftl.ll 裏面的 #include “thrifty.h” 改成 #include “thrifty.hh”。

2、tr1/functional 找不到
我機器上安裝的boost的是 functional.hpp ,補上擴展名就好。

3、openssl的include找不到
mac下安裝 “brew install openssl”之後,執行 “brew link openssl –force”。會確保產生鏈接 /usr/local/include/openssl 。

貌似是 EI Capitan 引入的問題。

4、其它,測試代碼 test/Benchmark.cpp 編譯失敗
說 shared_ptr ambigous , 用 boost::shared_ptr 替換 shared_ptr 就好。
這個不影響編譯thrift。

其它還有錯誤,但是thrift的可執行文件已經可以編譯出來了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章