`
haoningabc
  • 浏览: 1449248 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

thrift0.8.0在mac下

    博客分类:
  • nlu
阅读更多
thrift-0.8.0 :https://www.cnblogs.com/he-px/p/7927766.html
安装boost
http://netix.dl.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.zip
./bootstrap.sh
sudo ./b2 threading=multi address-model=64 variant=release stage install

安装libevent
brew install libevent

#./configure --prefix=/usr/local/thrift --with-boost=/usr/local --with-libevent=/usr/local --without-csharp --without-erlang --without-go --without-haskell --without-ruby   --without-perl --without-php --without-php_extension

注意去掉不用的语言,openssl路径和libevent路径


brew install openssl
brew link openssl --force
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"


./configure --prefix=/usr/local/thrift --with-boost=/usr/local --with-libevent=/usr/local/opt/libevent --with-openssl=/usr/local/opt/openssl --without-csharp --without-erlang --without-go --without-haskell --without-ruby   --without-perl  --without-php --without-php_extensionl --without-python



Building C++ Library ......... : yes
Building C (GLib) Library .... : no
Building Java Library ........ : no
Building C# Library .......... : no
Building Python Library ...... : yes


https://www.cnblogs.com/zhangqingping/p/4452990.html


报错1:

processor/ProcessorTest.cpp:26:10: fatal error: 'tr1/functional' file not found
https://my.liyunde.com/category/system/osx/

vim ./lib/cpp/src/concurrency/ThreadManager.h
多个源码文件报错 # include <tr1/functional>, file not found, 改为 # include <boost/tr1/functional.hpp> 解决.

Makefile
CXXFLAGS="-std=c++11"

报错2:
src/transport/TFileTransport.cpp:569:23: error: ordered comparison between pointer and zero ('pthread_t'
      (aka '_opaque_pthread_t *') and 'int')

https://github.com/tat/mimetic/issues/5


./lib/cpp/src/transport/TFileTransport.cpp

150和567行

//if (writerThreadId_ <= 0) {
  if (writerThreadId_ <= (_opaque_pthread_t *)0) {

报错3:

src/transport/TSSLSocket.cpp:34:10: fatal error: 'openssl/err.h' file not found

brew install openssl
装好的openssl在
/usr/local/opt/openssl/bin/openssl version -a
不是/usr/bin/openssl
brew install openssl
brew link --force openssl

configure 的时候加--with-openssl=/usr/local/opt/openssl
所以
vim /etc/profile
export PATH=/usr/local/opt/openssl/bin:$PATH
source /etc/profile

http://unix8.net/home.php/5008.html




make



protobuf-3.6.1



如果在mac上安装muduo
git clone https://github.com/chenshuo/muduo.git
git branch -r

git checkout mac

./build.sh
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics