如何让thrift0.9.2 在macos上面编译通过?
为将来跨语言通信预研,选择了thrift来试试。结果在mac os上面安装遇到种种困难,不知道是我选择方法错误还是咋的,不管怎样,总算是编译过去了。
首先,我们来参考官网的安装步骤:https://thrift.apache.org/docs/install/os_x
OS X Setup
The following command install all the required tools and libraries to build and install the Apache Thrift compiler on a OS X based system.
Install Boost
Download the boost library from boost.org untar compile with
./bootstrap.sh
sudo ./b2 threading=multi address-model=64 variant=release stage install
Install libevent
Download libevent, untar and compile with
./configure --prefix=/usr/local
make
sudo make install
Building Apache Thrift
Download the latest version of Apache Thrift, untar and compile with
./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local
Additional reading
For more information on the requirements see: Apache Thrift Requirements
For more information on building and installing Thrift see: Building from source
This snippet was generated by Apache Thrift's source tree docs: doc/install/os_x.md
----------------------------------------------------------------------------------
然后,你可能会遇到下面的问题:
make[4]: *** [src/thrift/transport/TSSLSocket.lo] Error 1
openssl版本过旧导致, 在mac下面可以升级一下:
brew updatebrew install opensslbrew link --force openssl
openssl version -a
processor/ProcessorTest.cpp:26:10: fatal error: 'tr1/functional' file not found
The problem here is that libc++ has been written after c++11 was "released".
You could try this:
#if __cplusplus >= 201103L
#include <functional>
#else
#include <tr1/functional>
#endif
and compile with CXXFLAGS="-std=c++11".
[thrift dir]/lib/cpp/test/processor/ProcessorTest.cpp
---------------------------------------------------------------------
library not found for -l:libboost_unit_test_framework.a thrift
为啥不能找到lib目录呢?
fuck,修改:
vim [thrift dir]/lib/cpp/test/Makefile.am
暂时用绝对路径:/usr/local/lib/ibboost_unit_test_framework.a 替换
终于通过了,跨平台为啥做的这么烂~
如何让thrift0.9.2 在macos上面编译通过?的更多相关文章
- 【Java】macOS下编译JDK8
安装mercurial brew install mercurial 下载源码 1234 hg clone http://hg.openjdk.java.net/jdk8/jdk8 java-sour ...
- 在Windows和MacOS下编译Lua
官方说明: http://www.lua.org/manual/5.3/readme.html 在Windows下编译Lua动态链接库的注意事项: 1. 创建一个空的DLL项目: 2. 将src文件夹 ...
- 在 MacOS 上编译链接 OpenGL 程序
几个星期以前开始折腾在我的MBA上写 OpenGL 小程序.我不太熟悉MacOS上的开发工具比如XCode,所以一开始的想法就是用vim来写程序,然后手工编译链接.网上查了一下,MacOS上的Open ...
- macOS 上编译 Dynamips
Dynamips 是一个Cisco 路由器模拟软件. 安装过程: git clone git://github.com/GNS3/dynamips.git cd dynamips mkdir buil ...
- MacOS X编译OpenSceneGraph
本文主要记录在MacOS X上编译OpenSceneGraph,方便日后查阅.所使用的环境如下: MacOS X 10.10 Yosemite XCode 6.3.2 CMake 3.3.0 Open ...
- Macos系统编译percona及部分函数在Macos系统上运算差异
欢迎来到 GreatSQL社区分享的MySQL技术文章,如有疑问或想学习的内容,可以在下方评论区留言,看到后会进行解答 本文来源:原创投稿 GreatSQL社区原创内容未经授权不得随意使用,转载请联系 ...
- TODO:macOS编译PHP7.1
TODO:macOS编译PHP7.1 本文主要介绍在macOS上编译PHP7.1,有兴趣的朋友可以去尝试一下. 1.下载PHP7.1源码,建议到PHP官网下载纯净到源码包php-7.1.0.tar.g ...
- macos解决Hadoop之Unable to load native-hadoop library
很显然,native-hadoop library不支持macos,如果是Linux就不会有这个问题.在百度上搜了,要下载在macos上编译的native hadoop library,我在网上下载了 ...
- thrift笔记
Thrift tutorial 演示 python服务端与客户端本文的开发环境是windows 7 + python2.7.3Thrift官方主页:http://thrift.apache.org/先 ...
随机推荐
- [Linux]Linux printf 输出重定向
方法一 #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <sys/st ...
- Android——Activity恢复用户用EditText输入的数据
说明: 在横屏输入的内容,在Activity销毁后,即横屏后,获取用户输入的内容 步骤: 1.在xml页面定义EditText的id 2.用onSaveInstanceState保存用户输入的数据 ( ...
- PHP+jquery+ajax实现分页
HTML <div id="list"> <ul></ul> </div> <div id="pagecount&q ...
- TF和SD
TF卡又称T-Flash卡,全名:TransFLash,又名:Micro SD SD卡(Secure Digital Memory Card,安全数码卡)
- Easyui Datagrid相同连续列合并扩展(二)
JS: //合并相同数据的单元格 function MergeCells(seletor, rows, fields) { if(rows == null || rows.length == 0 || ...
- java自定义获取星期几、几点、几分。
/** * @author 9082046**@qq.com * */ public void out_week_hour_minute() { lo ...
- Yii2.0实现微信公众号后台开发
接入微信 Yii2后台配置 1.在app/config/params.php中配置token参数 return [ //微信接入 'wechat' =>[ 'token' => 'your ...
- bootstrap基础学习五篇
bootstrap表格 Bootstrap 提供了一个清晰的创建表格的布局.下表列出了 Bootstrap 支持的一些表格元素: 标签 描述 <table> 为表格添加基础样式. < ...
- odoo 在原有工作流中添加审批流
odoo 在原有工作流中添加审批流 步骤: 1.加入所需的工作流节点以及相连的线(即所添加的审批流),代码如下: <?xml version="1.0" encoding=& ...
- ifcfg-<interface-name> 文件配置详解
TYPE=Ethernet #网卡类型DEVICE=<name> <name>表示物理设备的名字I ...