好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

facebook folly编译脚本

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)


作者: zhenjing.chen  
出处: http://www.cnblogs.com/zhenjing/  
未注明转载的文章,版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

分类:  C/C++名库

标签:  编译 ,  facebook ,  folly

作者: Leo_wl

    

出处: http://www.cnblogs.com/Leo_wl/

    

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

版权信息

查看更多关于facebook folly编译脚本的详细内容...

  阅读:48次