本文主要讲解:Zookeeper C客户端库在Centos 7上的编译,使用的Zookeeper版本为3.4.13。
安装ant 和cppunit-devel工具:
- [root@localhost source_code]# yum install -y cppunit-devel
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- base | 3.6 kB 00:00:00
- docker-ce-stable | 3.5 kB 00:00:00
- extras | 2.9 kB 00:00:00
- updates | 2.9 kB 00:00:00
- updates/7/x86_64/primary_db | 22 MB 00:02:01
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 cppunit-devel.x86_64.0.1.12.1-11.el7 将被 安装
- --> 正在处理依赖关系 cppunit = 1.12.1-11.el7,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
- --> 正在处理依赖关系 automake,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
- ********
- [root@localhost source_code]# yum install -y ant
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 ant.noarch.0.1.9.4-2.el7 将被 安装
- --> 正在处理依赖关系 jpackage-utils >= 1.7.5,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 java-devel >= 1.5.0,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 xml-commons-apis,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 xerces-j2,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 jpackage-utils,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在检查事务
- ---> 软件包 java-1.8.0-openjdk-devel.x86_64.1.1.8.0.382.b05-1.el7_9 将被 安装
- --> 正在处理依赖关系 java-1.8.0-openjdk(x86-64) = 1:1.8.0.382.b05-1.el7_9,它
- ******
查看ant 版本信息:
- [root@localhost apache-zookeeper-3.8.2]# ant -version
- Apache Ant(TM) version 1.9.4 compiled on November 5 2018
下载 zookeeper-release-3.4.13.tar.gz 源码, zookeeper 源码存放文件目录:/usr/local/source_code
温馨提示:使用wget 工具通过github 下载指定zookeeper 源码。
第一步:安装wget 工具
- [root@localhost source_code]# yum install wget
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 wget.x86_64.0.1.14-18.el7_6.1 将被 安装
- --> 解决依赖关系完成
- ******
第二步:下载 zookeeper-release-3.4.13.tar.gz 源码
- [root@localhost source_code]# wget https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
- --2023-08-31 16:21:19-- https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
- 正在解析主机 github.com (github.com)... 140.82.113.4
- 正在连接 github.com (github.com)|140.82.113.4|:443... 已连接。
- ******
第三步:解压
- [root@localhost source_code]# tar -zxvf release-3.4.13.tar.gz
- zookeeper-release-3.4.13/
- zookeeper-release-3.4.13/.gitattributes
- zookeeper-release-3.4.13/.gitignore
- zookeeper-release-3.4.13/LICENSE.txt
- zookeeper-release-3.4.13/NOTICE.txt
- zookeeper-release-3.4.13/README.md
- ******
第四步:进入ZooKeeper 的根目录,执行如下命令:
- ant clean jar
- ant compile_jute
- [root@localhost zookeeper-release-3.4.13]# ant clean jar
- Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
-
- clean-contrib:
-
- clean:
-
- clean:
- [echo] contrib: fatjar
- ******
- [root@localhost zookeeper-release-3.4.13]# ant compile_jute
- Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
-
- init:
-
- jute:
-
- compile_jute_uptodate:
-
- compile_jute:
-
- BUILD SUCCESSFUL
- Total time: 0 seconds
第五步:生成ZooKeeper 配置文件
执行如下指令:
autoreconf -if
- [root@localhost c]# autoreconf -if
- libtoolize: putting auxiliary files in `.'.
- libtoolize: copying file `./ltmain.sh'
- libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
- libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
- libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
- configure.ac:51: installing './compile'
- configure.ac:57: installing './config.guess'
- configure.ac:57: installing './config.sub'
- configure.ac:25: installing './install-sh'
- configure.ac:25: installing './missing'
- Makefile.am:80: warning: wildcard ${srcdir}/tests/*.cc: non-POSIX variable name
- Makefile.am:80: (probably a GNU make extension)
- Makefile.am:80: warning: wildcard ${srcdir}/tests/*.h: non-POSIX variable name
- Makefile.am:80: (probably a GNU make extension)
- Makefile.am:93: warning: SHELL_SYMBOL_WRAPPERS:sh: non-POSIX variable name
- Makefile.am:95: warning: shell cat ${srcdir}/tests/wrappers.opt: non-POSIX variable name
- ******
第六步:编译安装ZooKeeper C客户端,执行如下指令。
温馨提示:需要从ZooKeeper 根目录切换至
/usr/local/source_code/zookeeper-release-3.4.13/src/c
- ./configure
- make
- make install
- [root@localhost c]# ./configure
- checking for doxygen... no
- checking for perl... /usr/bin/perl
- checking for dot... no
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
- checking for gawk... gawk
- checking whether make sets $(MAKE)... yes
- checking whether make supports nested variables... yes
- checking for cppunit-config... /usr/bin/cppunit-config
- checking for Cppunit - version >= 1.10.2... 1.12.1
- checking for generated/zookeeper.jute.c... yes
- checking for generated/zookeeper.jute.h... yes
- checking for gcc... gcc
- checking whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- ******
- [root@localhost c]# make
- make all-am
- make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
- /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -o zookeeper.o >/dev/null 2>&1
- mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
- /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c -o recordio.lo `test -f 'src/recordio.c' || echo './'`src/recordio.c
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -fPIC -DPIC -o .libs/recordio.o
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -o recordio.o >/dev/null 2>&1
- mv -f .deps/recordio.Tpo .deps/recordio.Plo
- /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c -o zookeeper.jute.lo `test -f 'generated/zookeeper.jute.c' || echo './'`generated/zookeeper.jute.c
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -
- ******
- [root@localhost c]# make install
- make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
- /usr/bin/mkdir -p '/usr/local/lib'
- /bin/sh ./libtool --mode=install /usr/bin/install -c libzookeeper_st.la libzookeeper_mt.la '/usr/local/lib'
- libtool: install: /usr/bin/install -c .libs/libzookeeper_st.so.2.0.0 /usr/local/lib/libzookeeper_st.so.2.0.0
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_st.so.2.0.0 libzookeeper_st.so.2 || { rm -f libzookeeper_st.so.2 && ln -s libzookeeper_st.so.2.0.0 libzookeeper_st.so.2; }; })
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_st.so.2.0.0 libzookeeper_st.so || { rm -f libzookeeper_st.so && ln -s libzookeeper_st.so.2.0.0 libzookeeper_st.so; }; })
- libtool: install: /usr/bin/install -c .libs/libzookeeper_st.lai /usr/local/lib/libzookeeper_st.la
- libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.so.2.0.0 /usr/local/lib/libzookeeper_mt.so.2.0.0
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_mt.so.2.0.0 libzookeeper_mt.so.2 || { rm -f libzookeeper_mt.so.2 && ln -s libzookeeper_mt.so.2.0.0 libzookeeper_mt.so.2; }; })
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_mt.so.2.0.0 libzookeeper_mt.so || { rm -f libzookeeper_mt.so && ln -s libzookeeper_mt.so.2.0.0 libzookeeper_mt.so; }; })
- libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.lai /usr/local/lib/libzookeeper_mt.la
- libtool: install: /usr/bin/install -c .libs/libzookeeper_st.a /usr/local/lib/libzookeeper_st.a
- libtool: install: chmod 644 /usr/local/lib/libzookeeper_st.a
- libtool: install: ranlib /usr/local/lib/libzookeeper_st.a
- libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.a /usr/local/lib/libzookeeper_mt.a
- libtool: install: chmod 644 /usr/local/lib/libzookeeper_mt.a
- ******
zookeeper 生成头文件名称:zookeeper.h
zookeeper 生成链接库名称:
- [root@localhost include]# pwd
- /usr/local/source_code/zookeeper-release-3.4.13/src/c/include
- [root@localhost include]# ls -al
- 总用量 96
- drwxrwxr-x. 2 root root 127 6月 22 2018 .
- drwxrwxr-x. 9 root root 4096 8月 31 16:56 ..
- -rw-rw-r--. 1 root root 1361 6月 22 2018 proto.h
- -rw-rw-r--. 1 root root 3077 6月 22 2018 recordio.h
- -rw-rw-r--. 1 root root 355 6月 22 2018 winconfig.h
- -rw-rw-r--. 1 root root 72869 6月 22 2018 zookeeper.h
- -rw-rw-r--. 1 root root 1747 6月 22 2018 zookeeper_log.h
- -rw-rw-r--. 1 root root 1055 6月 22 2018 zookeeper_version.h
解决办法:执行如下指令 yum install autoconf automake
- [root@localhost zookeeper-release-3.4.13]# autoreconf -if
- autoreconf: 'configure.ac' or 'configure.in' is required
- [root@localhost zookeeper-release-3.4.13]# yum install autoconf automake
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- base | 3.6 kB 00:00:00
- docker-ce-stable | 3.5 kB 00:00:00
- extras | 2.9 kB 00:00:00
- updates | 2.9 kB 00:00:00
- 软件包 autoconf-2.69-11.el7.noarch 已安装并且是最新版本
- ******
- [root@localhost c]# autoreconf -if
- configure.ac:57: error: possibly undefined macro: AC_PROG_LIBTOOL
- If this token and others are legitimate, please use m4_pattern_allow.
- See the Autoconf documentation.
- autoreconf: /usr/bin/autoconf failed with exit status: 1
原因:在处理configure.ac文件时出错了,认为AC_PROG_LIBTOOL是未定义的宏,使得执行autoreconf失败,安装libtool包得以解决:
- [root@localhost c]# yum install libtool
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 libtool.x86_64.0.2.4.2-22.el7_3 将被 安装
- --> 解决依赖关系完成
-
- 依赖关系解决
- ******
CentOS 7 ZooKeeper C 客户端源码编译指令:
- [root@localhost source_code]# yum install -y cppunit-devel
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- base | 3.6 kB 00:00:00
- docker-ce-stable | 3.5 kB 00:00:00
- extras | 2.9 kB 00:00:00
- updates | 2.9 kB 00:00:00
- updates/7/x86_64/primary_db | 22 MB 00:02:01
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 cppunit-devel.x86_64.0.1.12.1-11.el7 将被 安装
- --> 正在处理依赖关系 cppunit = 1.12.1-11.el7,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
- --> 正在处理依赖关系 automake,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
- ********
- [root@localhost source_code]# yum install -y ant
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 ant.noarch.0.1.9.4-2.el7 将被 安装
- --> 正在处理依赖关系 jpackage-utils >= 1.7.5,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 java-devel >= 1.5.0,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 xml-commons-apis,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 xerces-j2,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在处理依赖关系 jpackage-utils,它被软件包 ant-1.9.4-2.el7.noarch 需要
- --> 正在检查事务
- ---> 软件包 java-1.8.0-openjdk-devel.x86_64.1.1.8.0.382.b05-1.el7_9 将被 安装
- --> 正在处理依赖关系 java-1.8.0-openjdk(x86-64) = 1:1.8.0.382.b05-1.el7_9,它
- ******
- [root@localhost apache-zookeeper-3.8.2]# ant -version
- Apache Ant(TM) version 1.9.4 compiled on November 5 2018
- [root@localhost source_code]# yum install wget
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 wget.x86_64.0.1.14-18.el7_6.1 将被 安装
- --> 解决依赖关系完成
- ******
- [root@localhost source_code]# wget https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
- --2023-08-31 16:21:19-- https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
- 正在解析主机 github.com (github.com)... 140.82.113.4
- 正在连接 github.com (github.com)|140.82.113.4|:443... 已连接。
- ******
- [root@localhost source_code]# tar -zxvf release-3.4.13.tar.gz
- zookeeper-release-3.4.13/
- zookeeper-release-3.4.13/.gitattributes
- zookeeper-release-3.4.13/.gitignore
- zookeeper-release-3.4.13/LICENSE.txt
- zookeeper-release-3.4.13/NOTICE.txt
- zookeeper-release-3.4.13/README.md
- ******
- [root@localhost zookeeper-release-3.4.13]# ant clean jar
- Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
-
- clean-contrib:
-
- clean:
-
- clean:
- [echo] contrib: fatjar
- ******
- [root@localhost zookeeper-release-3.4.13]# ant compile_jute
- Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
-
- init:
-
- jute:
-
- compile_jute_uptodate:
-
- compile_jute:
-
- BUILD SUCCESSFUL
- Total time: 0 seconds
- -- 问题一
- [root@localhost zookeeper-release-3.4.13]# autoreconf -if
- autoreconf: 'configure.ac' or 'configure.in' is required
- -- 问题一,解决办法
- [root@localhost zookeeper-release-3.4.13]# yum install autoconf automake
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- base | 3.6 kB 00:00:00
- docker-ce-stable | 3.5 kB 00:00:00
- extras | 2.9 kB 00:00:00
- updates | 2.9 kB 00:00:00
- 软件包 autoconf-2.69-11.el7.noarch 已安装并且是最新版本
- ******
- 切换至zookeeper/src/c 目录
- [root@localhost c]# pwd
- /usr/local/source_code/zookeeper-release-3.4.13/src/c
- -- 问题二
- [root@localhost c]# autoreconf -if
- configure.ac:57: error: possibly undefined macro: AC_PROG_LIBTOOL
- If this token and others are legitimate, please use m4_pattern_allow.
- See the Autoconf documentation.
- autoreconf: /usr/bin/autoconf failed with exit status: 1
- -- 问题二,解决办法
- [root@localhost c]# yum install libtool
- 已加载插件:fastestmirror
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 libtool.x86_64.0.2.4.2-22.el7_3 将被 安装
- --> 解决依赖关系完成
-
- 依赖关系解决
- ******
- [root@localhost c]# autoreconf -if
- libtoolize: putting auxiliary files in `.'.
- libtoolize: copying file `./ltmain.sh'
- libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
- libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
- libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
- configure.ac:51: installing './compile'
- configure.ac:57: installing './config.guess'
- configure.ac:57: installing './config.sub'
- configure.ac:25: installing './install-sh'
- configure.ac:25: installing './missing'
- Makefile.am:80: warning: wildcard ${srcdir}/tests/*.cc: non-POSIX variable name
- Makefile.am:80: (probably a GNU make extension)
- Makefile.am:80: warning: wildcard ${srcdir}/tests/*.h: non-POSIX variable name
- Makefile.am:80: (probably a GNU make extension)
- Makefile.am:93: warning: SHELL_SYMBOL_WRAPPERS:sh: non-POSIX variable name
- Makefile.am:95: warning: shell cat ${srcdir}/tests/wrappers.opt: non-POSIX variable name
- ******
- [root@localhost c]# ./configure
- checking for doxygen... no
- checking for perl... /usr/bin/perl
- checking for dot... no
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
- checking for gawk... gawk
- checking whether make sets $(MAKE)... yes
- checking whether make supports nested variables... yes
- checking for cppunit-config... /usr/bin/cppunit-config
- checking for Cppunit - version >= 1.10.2... 1.12.1
- checking for generated/zookeeper.jute.c... yes
- checking for generated/zookeeper.jute.h... yes
- checking for gcc... gcc
- checking whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- ******
- [root@localhost c]# make
- make all-am
- make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
- /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -o zookeeper.o >/dev/null 2>&1
- mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
- /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c -o recordio.lo `test -f 'src/recordio.c' || echo './'`src/recordio.c
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -fPIC -DPIC -o .libs/recordio.o
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -o recordio.o >/dev/null 2>&1
- mv -f .deps/recordio.Tpo .deps/recordio.Plo
- /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c -o zookeeper.jute.lo `test -f 'generated/zookeeper.jute.c' || echo './'`generated/zookeeper.jute.c
- libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -
- ******
- [root@localhost c]# make install
- make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
- /usr/bin/mkdir -p '/usr/local/lib'
- /bin/sh ./libtool --mode=install /usr/bin/install -c libzookeeper_st.la libzookeeper_mt.la '/usr/local/lib'
- libtool: install: /usr/bin/install -c .libs/libzookeeper_st.so.2.0.0 /usr/local/lib/libzookeeper_st.so.2.0.0
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_st.so.2.0.0 libzookeeper_st.so.2 || { rm -f libzookeeper_st.so.2 && ln -s libzookeeper_st.so.2.0.0 libzookeeper_st.so.2; }; })
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_st.so.2.0.0 libzookeeper_st.so || { rm -f libzookeeper_st.so && ln -s libzookeeper_st.so.2.0.0 libzookeeper_st.so; }; })
- libtool: install: /usr/bin/install -c .libs/libzookeeper_st.lai /usr/local/lib/libzookeeper_st.la
- libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.so.2.0.0 /usr/local/lib/libzookeeper_mt.so.2.0.0
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_mt.so.2.0.0 libzookeeper_mt.so.2 || { rm -f libzookeeper_mt.so.2 && ln -s libzookeeper_mt.so.2.0.0 libzookeeper_mt.so.2; }; })
- libtool: install: (cd /usr/local/lib && { ln -s -f libzookeeper_mt.so.2.0.0 libzookeeper_mt.so || { rm -f libzookeeper_mt.so && ln -s libzookeeper_mt.so.2.0.0 libzookeeper_mt.so; }; })
- libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.lai /usr/local/lib/libzookeeper_mt.la
- libtool: install: /usr/bin/install -c .libs/libzookeeper_st.a /usr/local/lib/libzookeeper_st.a
- libtool: install: chmod 644 /usr/local/lib/libzookeeper_st.a
- libtool: install: ranlib /usr/local/lib/libzookeeper_st.a
- libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.a /usr/local/lib/libzookeeper_mt.a
- libtool: install: chmod 644 /usr/local/lib/libzookeeper_mt.a
- ******
- ZooKeeper C连接库文件,存放位置
- [root@localhost include]# pwd
- /usr/local/source_code/zookeeper-release-3.4.13/src/c/include
- [root@localhost include]# ls -al
- 总用量 96
- drwxrwxr-x. 2 root root 127 6月 22 2018 .
- drwxrwxr-x. 9 root root 4096 8月 31 16:56 ..
- -rw-rw-r--. 1 root root 1361 6月 22 2018 proto.h
- -rw-rw-r--. 1 root root 3077 6月 22 2018 recordio.h
- -rw-rw-r--. 1 root root 355 6月 22 2018 winconfig.h
- -rw-rw-r--. 1 root root 72869 6月 22 2018 zookeeper.h
- -rw-rw-r--. 1 root root 1747 6月 22 2018 zookeeper_log.h
- -rw-rw-r--. 1 root root 1055 6月 22 2018 zookeeper_version.h
-
-