• CentOS 7 编译ZooKeeper C客户端


    简介

    本文主要讲解:Zookeeper C客户端库在Centos 7上的编译,使用的Zookeeper版本为3.4.13。

    工具安装

    安装ant 和cppunit-devel工具:

    1. [root@localhost source_code]# yum install -y cppunit-devel
    2. 已加载插件:fastestmirror
    3. Loading mirror speeds from cached hostfile
    4. * base: mirrors.aliyun.com
    5. * extras: mirrors.aliyun.com
    6. * updates: mirrors.aliyun.com
    7. base | 3.6 kB 00:00:00
    8. docker-ce-stable | 3.5 kB 00:00:00
    9. extras | 2.9 kB 00:00:00
    10. updates | 2.9 kB 00:00:00
    11. updates/7/x86_64/primary_db | 22 MB 00:02:01
    12. 正在解决依赖关系
    13. --> 正在检查事务
    14. ---> 软件包 cppunit-devel.x86_64.0.1.12.1-11.el7 将被 安装
    15. --> 正在处理依赖关系 cppunit = 1.12.1-11.el7,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
    16. --> 正在处理依赖关系 automake,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
    17. ********
    18. [root@localhost source_code]# yum install -y ant
    19. 已加载插件:fastestmirror
    20. Loading mirror speeds from cached hostfile
    21. * base: mirrors.aliyun.com
    22. * extras: mirrors.aliyun.com
    23. * updates: mirrors.aliyun.com
    24. 正在解决依赖关系
    25. --> 正在检查事务
    26. ---> 软件包 ant.noarch.0.1.9.4-2.el7 将被 安装
    27. --> 正在处理依赖关系 jpackage-utils >= 1.7.5,它被软件包 ant-1.9.4-2.el7.noarch 需要
    28. --> 正在处理依赖关系 java-devel >= 1.5.0,它被软件包 ant-1.9.4-2.el7.noarch 需要
    29. --> 正在处理依赖关系 xml-commons-apis,它被软件包 ant-1.9.4-2.el7.noarch 需要
    30. --> 正在处理依赖关系 xerces-j2,它被软件包 ant-1.9.4-2.el7.noarch 需要
    31. --> 正在处理依赖关系 jpackage-utils,它被软件包 ant-1.9.4-2.el7.noarch 需要
    32. --> 正在检查事务
    33. ---> 软件包 java-1.8.0-openjdk-devel.x86_64.1.1.8.0.382.b05-1.el7_9 将被 安装
    34. --> 正在处理依赖关系 java-1.8.0-openjdk(x86-64) = 1:1.8.0.382.b05-1.el7_9,它
    35. ******

    查看ant 版本信息:

    1. [root@localhost apache-zookeeper-3.8.2]# ant -version
    2. 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 工具

    1. [root@localhost source_code]# yum install wget
    2. 已加载插件:fastestmirror
    3. Loading mirror speeds from cached hostfile
    4. * base: mirrors.aliyun.com
    5. * extras: mirrors.aliyun.com
    6. * updates: mirrors.aliyun.com
    7. 正在解决依赖关系
    8. --> 正在检查事务
    9. ---> 软件包 wget.x86_64.0.1.14-18.el7_6.1 将被 安装
    10. --> 解决依赖关系完成
    11. ******

    第二步:下载 zookeeper-release-3.4.13.tar.gz 源码

    1. [root@localhost source_code]# wget https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
    2. --2023-08-31 16:21:19-- https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
    3. 正在解析主机 github.com (github.com)... 140.82.113.4
    4. 正在连接 github.com (github.com)|140.82.113.4|:443... 已连接。
    5. ******

    第三步:解压

    1. [root@localhost source_code]# tar -zxvf release-3.4.13.tar.gz
    2. zookeeper-release-3.4.13/
    3. zookeeper-release-3.4.13/.gitattributes
    4. zookeeper-release-3.4.13/.gitignore
    5. zookeeper-release-3.4.13/LICENSE.txt
    6. zookeeper-release-3.4.13/NOTICE.txt
    7. zookeeper-release-3.4.13/README.md
    8. ******

    第四步:进入ZooKeeper 的根目录,执行如下命令:

    1. ant clean jar
    2. ant compile_jute
    1. [root@localhost zookeeper-release-3.4.13]# ant clean jar
    2. Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
    3. clean-contrib:
    4. clean:
    5. clean:
    6. [echo] contrib: fatjar
    7. ******
    8. [root@localhost zookeeper-release-3.4.13]# ant compile_jute
    9. Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
    10. init:
    11. jute:
    12. compile_jute_uptodate:
    13. compile_jute:
    14. BUILD SUCCESSFUL
    15. Total time: 0 seconds

     第五步:生成ZooKeeper 配置文件

    执行如下指令:

    autoreconf -if
    1. [root@localhost c]# autoreconf -if
    2. libtoolize: putting auxiliary files in `.'.
    3. libtoolize: copying file `./ltmain.sh'
    4. libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
    5. libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
    6. libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
    7. configure.ac:51: installing './compile'
    8. configure.ac:57: installing './config.guess'
    9. configure.ac:57: installing './config.sub'
    10. configure.ac:25: installing './install-sh'
    11. configure.ac:25: installing './missing'
    12. Makefile.am:80: warning: wildcard ${srcdir}/tests/*.cc: non-POSIX variable name
    13. Makefile.am:80: (probably a GNU make extension)
    14. Makefile.am:80: warning: wildcard ${srcdir}/tests/*.h: non-POSIX variable name
    15. Makefile.am:80: (probably a GNU make extension)
    16. Makefile.am:93: warning: SHELL_SYMBOL_WRAPPERS:sh: non-POSIX variable name
    17. Makefile.am:95: warning: shell cat ${srcdir}/tests/wrappers.opt: non-POSIX variable name
    18. ******

    第六步:编译安装ZooKeeper C客户端,执行如下指令。

    温馨提示:需要从ZooKeeper 根目录切换至
    /usr/local/source_code/zookeeper-release-3.4.13/src/c

    1. ./configure
    2. make
    3. make install
    1. [root@localhost c]# ./configure
    2. checking for doxygen... no
    3. checking for perl... /usr/bin/perl
    4. checking for dot... no
    5. checking for a BSD-compatible install... /usr/bin/install -c
    6. checking whether build environment is sane... yes
    7. checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    8. checking for gawk... gawk
    9. checking whether make sets $(MAKE)... yes
    10. checking whether make supports nested variables... yes
    11. checking for cppunit-config... /usr/bin/cppunit-config
    12. checking for Cppunit - version >= 1.10.2... 1.12.1
    13. checking for generated/zookeeper.jute.c... yes
    14. checking for generated/zookeeper.jute.h... yes
    15. checking for gcc... gcc
    16. checking whether the C compiler works... yes
    17. checking for C compiler default output file name... a.out
    18. ******
    19. [root@localhost c]# make
    20. make all-am
    21. make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
    22. /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
    23. 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
    24. 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
    25. mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
    26. /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
    27. 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
    28. 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
    29. mv -f .deps/recordio.Tpo .deps/recordio.Plo
    30. /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
    31. libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -
    32. ******
    33. [root@localhost c]# make install
    34. make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
    35. /usr/bin/mkdir -p '/usr/local/lib'
    36. /bin/sh ./libtool --mode=install /usr/bin/install -c libzookeeper_st.la libzookeeper_mt.la '/usr/local/lib'
    37. libtool: install: /usr/bin/install -c .libs/libzookeeper_st.so.2.0.0 /usr/local/lib/libzookeeper_st.so.2.0.0
    38. 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; }; })
    39. 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; }; })
    40. libtool: install: /usr/bin/install -c .libs/libzookeeper_st.lai /usr/local/lib/libzookeeper_st.la
    41. libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.so.2.0.0 /usr/local/lib/libzookeeper_mt.so.2.0.0
    42. 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; }; })
    43. 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; }; })
    44. libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.lai /usr/local/lib/libzookeeper_mt.la
    45. libtool: install: /usr/bin/install -c .libs/libzookeeper_st.a /usr/local/lib/libzookeeper_st.a
    46. libtool: install: chmod 644 /usr/local/lib/libzookeeper_st.a
    47. libtool: install: ranlib /usr/local/lib/libzookeeper_st.a
    48. libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.a /usr/local/lib/libzookeeper_mt.a
    49. libtool: install: chmod 644 /usr/local/lib/libzookeeper_mt.a
    50. ******

    ZooKeeper C客户端头文件和链接库位置

    zookeeper 生成头文件名称:zookeeper.h

    zookeeper 生成链接库名称:

    1. [root@localhost include]# pwd
    2. /usr/local/source_code/zookeeper-release-3.4.13/src/c/include
    3. [root@localhost include]# ls -al
    4. 总用量 96
    5. drwxrwxr-x. 2 root root 127 622 2018 .
    6. drwxrwxr-x. 9 root root 4096 831 16:56 ..
    7. -rw-rw-r--. 1 root root 1361 622 2018 proto.h
    8. -rw-rw-r--. 1 root root 3077 622 2018 recordio.h
    9. -rw-rw-r--. 1 root root 355 622 2018 winconfig.h
    10. -rw-rw-r--. 1 root root 72869 622 2018 zookeeper.h
    11. -rw-rw-r--. 1 root root 1747 622 2018 zookeeper_log.h
    12. -rw-rw-r--. 1 root root 1055 622 2018 zookeeper_version.h

    常见问题

    ZooKeeper 生成自动配置文件报错。

    解决办法:执行如下指令 yum install autoconf automake

    1. [root@localhost zookeeper-release-3.4.13]# autoreconf -if
    2. autoreconf: 'configure.ac' or 'configure.in' is required
    3. [root@localhost zookeeper-release-3.4.13]# yum install autoconf automake
    4. 已加载插件:fastestmirror
    5. Loading mirror speeds from cached hostfile
    6. * base: mirrors.aliyun.com
    7. * extras: mirrors.aliyun.com
    8. * updates: mirrors.aliyun.com
    9. base | 3.6 kB 00:00:00
    10. docker-ce-stable | 3.5 kB 00:00:00
    11. extras | 2.9 kB 00:00:00
    12. updates | 2.9 kB 00:00:00
    13. 软件包 autoconf-2.69-11.el7.noarch 已安装并且是最新版本
    14. ******

    编译ZooKeeper 报错

    1. [root@localhost c]# autoreconf -if
    2. configure.ac:57: error: possibly undefined macro: AC_PROG_LIBTOOL
    3. If this token and others are legitimate, please use m4_pattern_allow.
    4. See the Autoconf documentation.
    5. autoreconf: /usr/bin/autoconf failed with exit status: 1

    原因:在处理configure.ac文件时出错了,认为AC_PROG_LIBTOOL是未定义的宏,使得执行autoreconf失败,安装libtool包得以解决:

    1. [root@localhost c]# yum install libtool
    2. 已加载插件:fastestmirror
    3. Loading mirror speeds from cached hostfile
    4. * base: mirrors.aliyun.com
    5. * extras: mirrors.aliyun.com
    6. * updates: mirrors.aliyun.com
    7. 正在解决依赖关系
    8. --> 正在检查事务
    9. ---> 软件包 libtool.x86_64.0.2.4.2-22.el7_3 将被 安装
    10. --> 解决依赖关系完成
    11. 依赖关系解决
    12. ******

    CentOS 7 ZooKeeper C 客户端源码编译指令:

    1. [root@localhost source_code]# yum install -y cppunit-devel
    2. 已加载插件:fastestmirror
    3. Loading mirror speeds from cached hostfile
    4. * base: mirrors.aliyun.com
    5. * extras: mirrors.aliyun.com
    6. * updates: mirrors.aliyun.com
    7. base | 3.6 kB 00:00:00
    8. docker-ce-stable | 3.5 kB 00:00:00
    9. extras | 2.9 kB 00:00:00
    10. updates | 2.9 kB 00:00:00
    11. updates/7/x86_64/primary_db | 22 MB 00:02:01
    12. 正在解决依赖关系
    13. --> 正在检查事务
    14. ---> 软件包 cppunit-devel.x86_64.0.1.12.1-11.el7 将被 安装
    15. --> 正在处理依赖关系 cppunit = 1.12.1-11.el7,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
    16. --> 正在处理依赖关系 automake,它被软件包 cppunit-devel-1.12.1-11.el7.x86_64 需要
    17. ********
    18. [root@localhost source_code]# yum install -y ant
    19. 已加载插件:fastestmirror
    20. Loading mirror speeds from cached hostfile
    21. * base: mirrors.aliyun.com
    22. * extras: mirrors.aliyun.com
    23. * updates: mirrors.aliyun.com
    24. 正在解决依赖关系
    25. --> 正在检查事务
    26. ---> 软件包 ant.noarch.0.1.9.4-2.el7 将被 安装
    27. --> 正在处理依赖关系 jpackage-utils >= 1.7.5,它被软件包 ant-1.9.4-2.el7.noarch 需要
    28. --> 正在处理依赖关系 java-devel >= 1.5.0,它被软件包 ant-1.9.4-2.el7.noarch 需要
    29. --> 正在处理依赖关系 xml-commons-apis,它被软件包 ant-1.9.4-2.el7.noarch 需要
    30. --> 正在处理依赖关系 xerces-j2,它被软件包 ant-1.9.4-2.el7.noarch 需要
    31. --> 正在处理依赖关系 jpackage-utils,它被软件包 ant-1.9.4-2.el7.noarch 需要
    32. --> 正在检查事务
    33. ---> 软件包 java-1.8.0-openjdk-devel.x86_64.1.1.8.0.382.b05-1.el7_9 将被 安装
    34. --> 正在处理依赖关系 java-1.8.0-openjdk(x86-64) = 1:1.8.0.382.b05-1.el7_9,它
    35. ******
    36. [root@localhost apache-zookeeper-3.8.2]# ant -version
    37. Apache Ant(TM) version 1.9.4 compiled on November 5 2018
    38. [root@localhost source_code]# yum install wget
    39. 已加载插件:fastestmirror
    40. Loading mirror speeds from cached hostfile
    41. * base: mirrors.aliyun.com
    42. * extras: mirrors.aliyun.com
    43. * updates: mirrors.aliyun.com
    44. 正在解决依赖关系
    45. --> 正在检查事务
    46. ---> 软件包 wget.x86_64.0.1.14-18.el7_6.1 将被 安装
    47. --> 解决依赖关系完成
    48. ******
    49. [root@localhost source_code]# wget https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
    50. --2023-08-31 16:21:19-- https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
    51. 正在解析主机 github.com (github.com)... 140.82.113.4
    52. 正在连接 github.com (github.com)|140.82.113.4|:443... 已连接。
    53. ******
    54. [root@localhost source_code]# tar -zxvf release-3.4.13.tar.gz
    55. zookeeper-release-3.4.13/
    56. zookeeper-release-3.4.13/.gitattributes
    57. zookeeper-release-3.4.13/.gitignore
    58. zookeeper-release-3.4.13/LICENSE.txt
    59. zookeeper-release-3.4.13/NOTICE.txt
    60. zookeeper-release-3.4.13/README.md
    61. ******
    62. [root@localhost zookeeper-release-3.4.13]# ant clean jar
    63. Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
    64. clean-contrib:
    65. clean:
    66. clean:
    67. [echo] contrib: fatjar
    68. ******
    69. [root@localhost zookeeper-release-3.4.13]# ant compile_jute
    70. Buildfile: /usr/local/source_code/zookeeper-release-3.4.13/build.xml
    71. init:
    72. jute:
    73. compile_jute_uptodate:
    74. compile_jute:
    75. BUILD SUCCESSFUL
    76. Total time: 0 seconds
    77. -- 问题一
    78. [root@localhost zookeeper-release-3.4.13]# autoreconf -if
    79. autoreconf: 'configure.ac' or 'configure.in' is required
    80. -- 问题一,解决办法
    81. [root@localhost zookeeper-release-3.4.13]# yum install autoconf automake
    82. 已加载插件:fastestmirror
    83. Loading mirror speeds from cached hostfile
    84. * base: mirrors.aliyun.com
    85. * extras: mirrors.aliyun.com
    86. * updates: mirrors.aliyun.com
    87. base | 3.6 kB 00:00:00
    88. docker-ce-stable | 3.5 kB 00:00:00
    89. extras | 2.9 kB 00:00:00
    90. updates | 2.9 kB 00:00:00
    91. 软件包 autoconf-2.69-11.el7.noarch 已安装并且是最新版本
    92. ******
    93. 切换至zookeeper/src/c 目录
    94. [root@localhost c]# pwd
    95. /usr/local/source_code/zookeeper-release-3.4.13/src/c
    96. -- 问题二
    97. [root@localhost c]# autoreconf -if
    98. configure.ac:57: error: possibly undefined macro: AC_PROG_LIBTOOL
    99. If this token and others are legitimate, please use m4_pattern_allow.
    100. See the Autoconf documentation.
    101. autoreconf: /usr/bin/autoconf failed with exit status: 1
    102. -- 问题二,解决办法
    103. [root@localhost c]# yum install libtool
    104. 已加载插件:fastestmirror
    105. Loading mirror speeds from cached hostfile
    106. * base: mirrors.aliyun.com
    107. * extras: mirrors.aliyun.com
    108. * updates: mirrors.aliyun.com
    109. 正在解决依赖关系
    110. --> 正在检查事务
    111. ---> 软件包 libtool.x86_64.0.2.4.2-22.el7_3 将被 安装
    112. --> 解决依赖关系完成
    113. 依赖关系解决
    114. ******
    115. [root@localhost c]# autoreconf -if
    116. libtoolize: putting auxiliary files in `.'.
    117. libtoolize: copying file `./ltmain.sh'
    118. libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
    119. libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
    120. libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
    121. configure.ac:51: installing './compile'
    122. configure.ac:57: installing './config.guess'
    123. configure.ac:57: installing './config.sub'
    124. configure.ac:25: installing './install-sh'
    125. configure.ac:25: installing './missing'
    126. Makefile.am:80: warning: wildcard ${srcdir}/tests/*.cc: non-POSIX variable name
    127. Makefile.am:80: (probably a GNU make extension)
    128. Makefile.am:80: warning: wildcard ${srcdir}/tests/*.h: non-POSIX variable name
    129. Makefile.am:80: (probably a GNU make extension)
    130. Makefile.am:93: warning: SHELL_SYMBOL_WRAPPERS:sh: non-POSIX variable name
    131. Makefile.am:95: warning: shell cat ${srcdir}/tests/wrappers.opt: non-POSIX variable name
    132. ******
    133. [root@localhost c]# ./configure
    134. checking for doxygen... no
    135. checking for perl... /usr/bin/perl
    136. checking for dot... no
    137. checking for a BSD-compatible install... /usr/bin/install -c
    138. checking whether build environment is sane... yes
    139. checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    140. checking for gawk... gawk
    141. checking whether make sets $(MAKE)... yes
    142. checking whether make supports nested variables... yes
    143. checking for cppunit-config... /usr/bin/cppunit-config
    144. checking for Cppunit - version >= 1.10.2... 1.12.1
    145. checking for generated/zookeeper.jute.c... yes
    146. checking for generated/zookeeper.jute.h... yes
    147. checking for gcc... gcc
    148. checking whether the C compiler works... yes
    149. checking for C compiler default output file name... a.out
    150. ******
    151. [root@localhost c]# make
    152. make all-am
    153. make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
    154. /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
    155. 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
    156. 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
    157. mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
    158. /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
    159. 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
    160. 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
    161. mv -f .deps/recordio.Tpo .deps/recordio.Plo
    162. /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
    163. libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -
    164. ******
    165. [root@localhost c]# make install
    166. make[1]: 进入目录“/usr/local/source_code/zookeeper-release-3.4.13/src/c”
    167. /usr/bin/mkdir -p '/usr/local/lib'
    168. /bin/sh ./libtool --mode=install /usr/bin/install -c libzookeeper_st.la libzookeeper_mt.la '/usr/local/lib'
    169. libtool: install: /usr/bin/install -c .libs/libzookeeper_st.so.2.0.0 /usr/local/lib/libzookeeper_st.so.2.0.0
    170. 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; }; })
    171. 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; }; })
    172. libtool: install: /usr/bin/install -c .libs/libzookeeper_st.lai /usr/local/lib/libzookeeper_st.la
    173. libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.so.2.0.0 /usr/local/lib/libzookeeper_mt.so.2.0.0
    174. 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; }; })
    175. 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; }; })
    176. libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.lai /usr/local/lib/libzookeeper_mt.la
    177. libtool: install: /usr/bin/install -c .libs/libzookeeper_st.a /usr/local/lib/libzookeeper_st.a
    178. libtool: install: chmod 644 /usr/local/lib/libzookeeper_st.a
    179. libtool: install: ranlib /usr/local/lib/libzookeeper_st.a
    180. libtool: install: /usr/bin/install -c .libs/libzookeeper_mt.a /usr/local/lib/libzookeeper_mt.a
    181. libtool: install: chmod 644 /usr/local/lib/libzookeeper_mt.a
    182. ******
    183. ZooKeeper C连接库文件,存放位置
    184. [root@localhost include]# pwd
    185. /usr/local/source_code/zookeeper-release-3.4.13/src/c/include
    186. [root@localhost include]# ls -al
    187. 总用量 96
    188. drwxrwxr-x. 2 root root 127 622 2018 .
    189. drwxrwxr-x. 9 root root 4096 831 16:56 ..
    190. -rw-rw-r--. 1 root root 1361 622 2018 proto.h
    191. -rw-rw-r--. 1 root root 3077 622 2018 recordio.h
    192. -rw-rw-r--. 1 root root 355 622 2018 winconfig.h
    193. -rw-rw-r--. 1 root root 72869 622 2018 zookeeper.h
    194. -rw-rw-r--. 1 root root 1747 622 2018 zookeeper_log.h
    195. -rw-rw-r--. 1 root root 1055 622 2018 zookeeper_version.h

  • 相关阅读:
    【SpringCloud】API网关(Spring Cloud Gateway)
    BIOMOD2模型、MaxEnt模型物种分布模拟,生物多样性生境模拟,论文写作
    MFC转Winform&&C++转C#
    如何使用LoRA和PEFT微调 Mistral 7B 模型
    原生js 多用途三元表达式 点赞按钮
    编程经验:上拔if、下压for
    【2023数学建模国赛】A题定日镜场的优化设计模型建立
    【什么是高斯分布?还有什么分布?他们的用途是什么?】
    单片机和FreeRTOS上跑机器人ROS的应用
    overleaf在线编辑工具使用教程
  • 原文地址:https://blog.csdn.net/zhouzhiwengang/article/details/132640151