预装如下环境

autoconf 2.6.9
automake 1.14
libtool 2.4

Building from source

Download latest version of procbuffer. [https://code.google.com/p/protobuf/downloads/list].

  1. e.g  "wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2"

Untar the tar.bz2 file

  1. tar xfvj protobuf-2.5.0.tar.bz2

Configure the protobuf.

  1. cd protobuf-2.5.0
  2. ./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"

Make the source

  1. make -j 4
  2. sudo make install
 
在make -j 4时,可能出现如下错误
In file included from ./google/protobuf/stubs/common.h::
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string::
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm::
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory::
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator::: fatal error: '__debug' file not found

遇到如上错误:执行如下命令

echo '#define _LIBCPP_ASSERT(x, m) ((void)0)' | sudo tee -a /Library/Developer/CommandLineTools/usr/include/c++/v1/__debug > /dev/null

reference:

https://github.com/google/protobuf/issues/74

http://sleepythread.blogspot.com/2013/11/installing-protoc-25x-compiler-google.html

https://github.com/JuliaLang/julia/issues/10822

http://stackoverflow.com/questions/29529455/missing-c-header-debug-after-updating-osx-command-line-tools-6-3

mac os x 10.10.3 安装protoc的更多相关文章

  1. Vmare12(虚拟机)安装Mac OS X Yosemite 10.10

    需要预备的软件如下: OSX10.10的系统镜像,下载好之后将后缀.cdr改成.iso,下载来源如下:    链接:http://pan.baidu.com/s/1sj4ri5R 密码:y86w un ...

  2. 在Mac OS X Yosemite 10.10.3 中搭建第一个 ASP.NET 5 Web 项目

    终于有时间在 Mac 上安装一下 ASP.NET 5,网上有许多教程,但是多数的时间比较早了,版本不是最新,搭着 Build 2015 的春风,我也实践一下 Mac OS X 上的 ASP.NET 5 ...

  3. Mac OS X Yosemite 10.10 配置 Apache+PHP 教程注意事项

    刚更新到了 Mac OS X Yosemite 10.10,发现运行Apache出现了一些问题,修正一下! 教程基于 Mac OS X Mavericks 10.9.X,移步:Mac OS X Mav ...

  4. mac os x在PC上安装

    系统安装之前的准备工作及安装过程简介 前面我们已经提到,苹果电脑虽然已经采用了x86架构的Intel处理器,但其官方并不提供在非苹果电脑上安装Mac OS的支持.所以,要想在普通PC/笔记本电脑上安装 ...

  5. vmware 12中安装MAC OS X Lion 10.7

    下载并安装vmware.    下载并安装MAC补丁.    创建虚拟机.    设置ISO文件.    开启虚拟机.    安装vmware tools. 1. 下载并安装vmware.我是直接在腾 ...

  6. [MAC]OS X Mavericks 10.9.5 / 10.10.2 VMWare vmdk镜像,解压就能用!

    用起来是比VirtualBox好使很多: 1.鼠标很灵敏,不像Vbox那么飘 2.显卡有驱动,VM可以配置显示器尺寸,完美支持网络.语音.视频,直接搞全屏,还能看电影 3.USB设备支持热插拔 4.支 ...

  7. 苹果 Mac OS X Yosemite 10.10 新功能特性总结 - 扁平化、主打跨设备的无缝连通性

    苹果在2014.06.03凌晨的 WWDC 2014 大会上正式发布了最新的 OS X Yosemite 桌面操作系统和 iOS 8 移动系统.虽然整场发布会的重心都在软件上,并没有硬件亮相,但软件上 ...

  8. Mac OS X 懒人版安装教程(之前的图全部挂了,所以重发了)

    请版主把我之前发的那个帖子删了!因为所有的图全部挂了,所以麻烦版主了…… 安装中出现五国的话就请进入这里看看是那里的错误http://bbs.pcbeta.com/viewthread-863656- ...

  9. Mac OS X 上Lua的安装方法

    先在Mac OS的终端查询下本机是否已安装Lua Last login: Thu Jul 10 07:54:48 on ttys000 keshans-Mac-mini:~ keshan$ lua - ...

  10. Mac OS X Mavericks or Yosemite 安装Nginx、PHP、Mysql、phpMyAdmin

    翻译:http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/ 最 ...

随机推荐

  1. jQuery-3~4章

    jQuery-3~5章 JQuery003-JQuery中的DOM操作 jQuery中的DOM操作: 1.查找节点 A.查找元素节点 B. 查找属性节点 var s1 = $("ul li: ...

  2. 深入C#内存管理来分析值类型&引用类型,装箱&拆箱,堆栈几个概念组合之间的区别

    C#初学者经常被问的几道辨析题,值类型与引用类型,装箱与拆箱,堆栈,这几个概念组合之间区别,看完此篇应该可以解惑. 俗话说,用思想编程的是文艺程序猿,用经验编程的是普通程序猿,用复制粘贴编程的是2B程 ...

  3. No module named migrate.versioning

    在学习mega-tutorial的数据库章节时创建数据库遇到了问题,在stackoverflow上找到了结果 pip install sqlalchemy==0.7.9 pip install sql ...

  4. Node.js入门笔记(4):文件系统(fs)

    文件系统(FileSystem) 文件系统模块 对于文件无外乎创建修改添加. File System - 文件系统模块 - require('fs') fs模块是核心模块,需要使用require导入后 ...

  5. [Head First设计模式]一个人的平安夜——单例模式

    系列文章 [Head First设计模式]山西面馆中的设计模式——装饰者模式 [Head First设计模式]山西面馆中的设计模式——观察者模式 [Head First设计模式]山西面馆中的设计模式— ...

  6. js自适应屏幕高度

    //自适应屏幕高度 $(window).resize(function() { hightChange(); }); function hightChange(){ ; $();// iframe i ...

  7. PHP判断远程文件是否存在

    <?php /* 函数:remote_file_exists 功能:判断远程文件是否存在 参数: $url_file -远程文件URL 返回:存在返回true,不存在或者其他原因返回false ...

  8. class Solution(object): def fizzBuzz(self, n): a = [] i = 1 while(i <= n): if(i%15 == 0): a.append("FizzBuzz") elifleetcode day_01

    412. Fizz Buzz Write a program that outputs the string representation of numbers from 1 to n. But fo ...

  9. C++ 修饰名的格式探究

    以下结果是由VS2010里面测试得出: ------------------------------------------------------------------ /* 函数名.类名.名称空 ...

  10. 网址前面的icon

    shortcut icon和icon代码之间究竟有何区别呢.下面介绍一下   语句一:<link rel="shortcut icon" href="favicon ...