facebook folly編譯腳本


folly in github https://github.com/facebook/folly
autoconf,autmake使用詳解 http://www.laruence.com/2009/11/18/1154.html

folly庫中的README有關於庫依賴第三方庫的詳細說明,其中double-conversion需要特殊編譯。

  Ubuntu 12.04 64-bit
    - g++
    - automake
    - autoconf
    - autoconf-archive
    - libtool
    - libboost1.46-all-dev
    - libgoogle-glog-dev
        This package has been removed from 12.04 -- use the one from 11.10
    - gflags (packages need to be downloaded from below)
        http://gflags.googlecode.com/files/libgflags-dev_2.0-1_amd64.deb
        http://gflags.googlecode.com/files/libgflags0_2.0-1_amd64.deb
    - scons (for double-conversion)

1) 安裝工具和庫,直接大多可以直接從Ubuntu軟件包從安裝。比如:sudo apt-get install libboost1.46-all-dev; sudo apt-get install scons。

2)編譯double-conversion。所有工具均安裝后,需要先編譯double-conversion。

3)編譯和安裝folly:寫了個腳本直接在folly目錄下運行腳本即可。

#!/bin/sh

if [ $# != 1 ]
then
    echo "Usage: $0 double-conversion_path"
    exit●
fi

DOUBLE_CONV_DIR=$1
echo "double-conversion_path: $DOUBLE_CONV_DIR"

aclocal
autoreconf      # must use autoreconf. autoconf has some problem!
automake --force-missing --add-missing

LDFLAGS="-L$DOUBLE_CONV_DIR" CPPFLAGS="-I$DOUBLE_CONV_DIR/src " ./configure --
enable-static --disable-shared

make
make install

自己在編譯過程中,碰到的最大問題就是autoconf和automake不熟,碰到了些問題,感謝dirlt的文章:編譯folly

希望后來者編譯順利,少花些時間。

注:Ubuntu的版本:11.10; gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM