前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux平台下的watchman源码编译

Linux平台下的watchman源码编译

作者头像
程裕强
发布2022-05-06 10:43:17
6360
发布2022-05-06 10:43:17
举报
文章被收录于专栏:大数据学习笔记

参考英文:https://facebook.github.io/watchman/docs/install.html

0、准备工作

      (1)确定gcc版本

[root@master ~]# gcc --version gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

        如果gcc版本低于4.8,需要升级,参考http://blog.csdn.net/chengyuqiang/article/details/53868915

       (2)python

        [root@master ~]# yum install -y python-devel

1、下载源码

        git clone https://github.com/facebook/watchman.git

        最近国外网络很慢,可以通过迅雷等下载工具下载

        打开 https://github.com/facebook/watchman,单击“download”

2、安装编译工具

       [root@master ~]# yum install -y automake

       [root@master watchman-master]# yum install -y gcc gcc-c++

3、编译源码

      (1)解压缩

        [root@master ~]# unzip watchman-master.zip

      (2)进入watchman根目录         [root@master ~]# cd watchman-master         [root@master watchman-master]#

      (3)执行脚本

        [root@master watchman-master]# ./autogen.sh

configure.ac:29: installing `./compile' configure.ac:2: installing `./config.guess' configure.ac:2: installing `./config.sub' configure.ac:3: installing `./install-sh' configure.ac:3: installing `./missing' Makefile.am: installing `./depcomp'

     (4)[root@master watchman-master]# ./configure

       Your build configuration:         CC = gcc         CPPFLAGS =  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE         CFLAGS = -g -O2 -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer         CXX = g++ -std=c++11         CXXFLAGS = -g -O2 -Wall -Wextra -g -gdwarf-2 -fno-omit-frame-pointer         LDFLAGS =          prefix: /usr/local         version: 4.8.0         state directory: /usr/local/var/run/watchman

       (5)[root@master watchman-master]# make

   gcc -pthread -shared build/temp.linux-x86_64-2.6/pywatchman/bser.o -L/usr/lib64 -lpython2.6 -o /root/watchman-master/python/pywatchman/bser.so    make[1]: Leaving directory `/root/watchman-master'

        (6)make install

           [root@master watchman-master]# make install

           /usr/bin/install -c -d -m 777 //usr/local/var/run/watchman            chmod g+s //usr/local/var/run/watchman            touch //usr/local/var/run/watchman/.not-empty            test -z "/usr/local/share/doc/watchman-4.8.0" || /bin/mkdir -p "//usr/local/share/doc/watchman-4.8.0"            /usr/bin/install -c -m 644 README.markdown '//usr/local/share/doc/watchman-4.8.0'            make[1]: Leaving directory `/root/watchman-master'

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2016-12-23,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档