macox下編譯snappy靜態庫

來源:互聯網
上載者:User

標籤:源碼   庫   snappy   make   install   

  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. 驗證

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

macox下編譯snappy靜態庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.