如何让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 update
brew install openssl
brew 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/先 ...
随机推荐
- typeof关键字
C语言中 typeof 关键字是用来定义变量数据类型的.在linux内核源代码中广泛使用. 使用方法 1.当x的类型为是 int 时 _min1变量的数据类型则为 int. 2.当x为一个表达式时(例 ...
- cacati的安装
一.安装rrdtool软件包 yum install -y cairo-devel libxml2-devel pango-devel pango libpng-devel freetype free ...
- asp.net treeview 总结
网上关于Treeview的代码虽然多 但是都是很乱 实用性和正确性也不是很好 只好自己写一套了,时间比较紧张 性能可能还需调整 以用户组织的一个实际例子来讲诉Treeview的用法吧 组织表结构: 用 ...
- JVM中的STW和CMS
Java中Stop-The-World机制简称STW,是在执行垃圾收集算法时,Java应用程序的其他所有线程都被挂起(除了垃圾收集帮助器之外).Java中一种全局暂停现象,全局停顿,所有Java代码停 ...
- JavaScript重载
在Javascript 中,每个函数都有一个隐含的对象arguments,表示给函数 实际传给的参数 ,那么我们可以用 arguments来实现函数的重载 <!DOCTYPE html PUBL ...
- heartbeat 心跳技术
转自:http://blog.csdn.net/keda8997110/article/details/8349049 heartbeat 心跳技术原理: heartbeat (Linux-HA)的工 ...
- jenkins环境搭建&配置(二)
Jenkins介绍: Jenkins用于监控持续重复的工作,功能包括: 1.持续的软件版本发布/测试项目. 2.监控外部调用执行的工作. 安装环境: 操作系统:linux(centOS) 软件:jdk ...
- 应用于Java中的一个开源的表达式语言(Expression Language)
OGNL(英文全称:Object Graph Navigation Language,中文名:对象导航图语言)是应用于Java中的一个开源的表达式语言(Expression Language),它被集 ...
- java深度搜索与广度优先搜索
图结构展示: 实现过程: 首先,我们来看看图结构在代码中的实现.有三块逻辑: 1.图中的节点: public class GraphNode { public List<GraphEdge> ...
- php -- 文件操作类(文件或文件夹的:创建、删除、复制、移动)
<? /** * 操纵文件类 * * 例子: * FileUtil::createDir('a/1/2/3'); 测试建立文件夹 建一个a/1/2/3文件夹 * FileUtil::create ...