如何让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/先 ...
随机推荐
- 代码审计之Finecms任意文件下载漏洞
PS:该漏洞已被公布,只是学习.故自己跟着大佬的步伐审计. 文件地址:\controllers\ApiController.php Line 57 public function downAction ...
- SQL查询优化联合索引 与 单一列的索引
目前WEB的普及太快,在实际的开发中,一旦遇到大数据量的时候就需要做到优化,让查询的更快,才能给客户更好的体验,也能够在程序上避免timeout. 部分转载自:https://www.cnblogs. ...
- Unix系统编程()进程内存布局
每个进程所分配的内存由很多部分组成,通常称之为"段(segment)". 文本段包含了进程运行的程序机器语言指令.文本段具有只读属性,以防止进程通过错误指针意外修改自身指令. 因为 ...
- 使用tcpdump观察IPV4头部结构
sudo tcpdump -nt -i lo #抓取本地回路上的数据包 先运行上面的命令,然后再另一个终端运行下图所示的命令: [root@linux 5]# sudo tcpdump -nt -i ...
- saveFileDialog对话框
private void button1_Click(object sender, EventArgs e) { saveFileDialog1.Filter = "*.txt|*.txt| ...
- JVM调优浅谈(转)
1.数据类型 java虚拟机中,数据类型可以分为两类:基本类型和引用类型.基本类型的变量保存原始值,即:它代表的值就是数值本身,而引用类型的变量保存引用值.“引用值”代表了某个对象的引用,而不是对象本 ...
- 关于报错“syntax error near unexpected token `”和回车换行
本来是很简单一个事情,转过来是因为打字机这事比较有趣…… http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 ...
- Android基础总结(五)网络通信2
HttpClient 发送get请求 创建一个客户端对象 HttpClient client = new DefaultHttpClient(); 创建一个get请求对象 HttpGet hg = n ...
- ansible之并行运行
ansible之并发运行 转载 2016年07月14日 12:33:39 标签: 并发 / ansible 4474 ansible默认只会创建5个进程,所以一次任务只能同时控制5台机器执行.那如果你 ...
- SQL on Hadoop系统的最新进展(1)
转自:http://blog.jobbole.com/47892/ 为什么非要把SQL放到Hadoop上? SQL易于使用.那为什么非得基于Hadoop呢?the robust and scalabl ...