macox下编译snappy静态库

  1. 源码地址:https://github.com/google/snappy
    下载 git clone https://github.com/google/snappy
  2. 编译
    • 进入snappy源码目录,执行命令: ./autogen.sh
      报错 “./autogen.sh: line 3: aclocal: command not found”
      通过http://superuser.com/questions/657925/cygwin-rtorrent-installing-libtorrent-autogen-sh-aclocal-not-found这篇文章得知,系统没有安装automake,
      执行命令: breaw install automake
      报错“-bash: brew: command not found”
      安装 brew
      执行 命令:ruby -e "$(curl -f sSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      这里写图片描述
      然后 安装 automake,执行命令: brew install automake
      执行命令:./autogen.sh
      报错:“./autogen.sh: line 5: libtoolize: command not found”
      安装 libtool,执行命令:brew install libtool
      继续执行命令:./autogen.sh
      报错“./autogen.sh: line 5: libtoolize: command not found”
      通过这篇文章:http://stackoverflow.com/questions/15448582/installed-libtool-but-libtoolize-not-found
      我是在修改./autogen.sh 把第五行改成 glibtoolize --copy
      网上也有这样改得(我没试):
case `uname` in Darwin*) glibtoolize --copy ;;
  *) libtoolize --copy ;; esac 

执行命令:./autogen.sh
报错:“configure.ac:42: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:44: error: possibly undefined macro: AC_MSG_FAILURE”
通过这篇文章http://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error
我安装了pkgconfig,执行命令:brew install pkgconfig
报错“rm: autom4te.cache/output.0: Permission denied
rm: autom4te.cache/output.1: Permission denied
rm: autom4te.cache/requests: Permission denied
rm: autom4te.cache/traces.0: Permission denied
rm: autom4te.cache/traces.1: Permission denied
rm: autom4te.cache: Directory not empty

改成sudo ,执行命令:sudo ./autogen.sh
- 执行configure ,执行命令:./configure
- 执行make,执行命令:make
- 执行make install,执行命令:make install
3. 验证
这里写图片描述

版权声明:本文为博主原创文章,未经博主允许不得转载。

转载于:https://www.cnblogs.com/stark-summer/p/4829766.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值