Zookeeper C客戶端庫編譯
簡介
本文總結了Zookeeper C客戶端庫在Centos 7上的編譯,使用的Zookeeper版本為3.4.13。
安裝工具
安裝cppunit和ant工具:
yum install -y cppunit-devel
yum install -y ant
編譯
下載release版本的原始碼:
wget https://github.com/apache/zookeeper/archive/release-3.4.13.tar.gz
進入程式碼頂級目錄,執行:
ant clean jar
ant compile_jute
生成配置檔案,並編譯安裝
autoreconf -if
configure
make
make install
常見問題
libtool版本不匹配
[root@centos7-dev c]# make
make all-am
make[1]: Entering directory `/mnt/github/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: Version mismatch error. This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
libtool: and run autoconf again.
make[1]: *** [zookeeper.lo] Error 63
make[1]: Leaving directory `/mnt/github/zookeeper-release-3.4.13/src/c'
make: *** [all] Error 2
安裝匹配的libtool工具
conda install -c anaconda libtool=2.4.2
ant compile_jute失敗
[root@centos7-dev zookeeper-release-3.4.13]# ant compile_jute
Buildfile: /mnt/github/zookeeper-release-3.4.13/build.xml
init:
[mkdir] Created dir: /mnt/github/zookeeper-release-3.4.13/build/classes
[mkdir] Created dir: /mnt/github/zookeeper-release-3.4.13/build/lib
[mkdir] Created dir: /mnt/github/zookeeper-release-3.4.13/build/package/lib
[mkdir] Created dir: /mnt/github/zookeeper-release-3.4.13/build/test/lib
jute:
[javac] Compiling 39 source files to /mnt/github/zookeeper-release-3.4.13/build/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] /mnt/github/zookeeper-release-3.4.13/src/java/main/org/apache/jute/Record.java:21: error: package org.apache.yetus.audience does not exist
[javac] import org.apache.yetus.audience.InterfaceAudience;
[javac] ^
[javac] /mnt/github/zookeeper-release-3.4.13/src/java/main/org/apache/jute/Record.java:29: error: package InterfaceAudience does not exist
[javac] @InterfaceAudience.Public
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
[javac] 1 warning
BUILD FAILED
/mnt/github/zookeeper-release-3.4.13/build.xml:316: Compile failed; see the compiler error output for details.
Total time: 3 seconds
執行”ant clean compile-test“或“ant clean jar“,具體可參考資料1解決。
參考資料
相關文章
- C#版Nebula客戶端編譯C#客戶端編譯
- 【zookeeper之七】Zookeeper客戶端客戶端
- 【Zookeeper】zookeeper客戶端KeeperErrorCode = ConnectionLoss客戶端Error
- Zookeeper 客戶端 API客戶端API
- ZooKeeper客戶端CRUD命令客戶端
- Zookeeper Java 客戶端搭建Java客戶端
- Skywalking PHP客戶端編譯安裝PHP客戶端編譯
- zookeeper的Java客戶端APIJava客戶端API
- 如何編譯C#版本的Protocol Buffers與gRPC服務端,客戶端程式碼編譯C#ProtocolRPC服務端客戶端
- 聊一聊 Zookeeper 客戶端之 Curator客戶端
- zookeeper在Linux客戶端操作命令大全Linux客戶端
- Zookeeper客戶端使用與叢集原理客戶端
- 以太坊客戶端go-thereum本地編譯及使用客戶端Go編譯
- C# MQTT客戶端C#MQQT客戶端
- Mqtt開發筆記:windows下C++ ActiveMQ客戶端介紹、編譯和使用MQQT筆記WindowsC++客戶端編譯
- grpc套路客戶端編寫RPC客戶端
- 如何編寫一個前端框架之七-客戶端路由(譯)前端框架客戶端路由
- 在Ubuntu 18.04上編譯安裝pppoe客戶端軟體Ubuntu編譯客戶端
- Flutter 新聞客戶端 - 10 編譯釋出正式版Flutter客戶端編譯
- c# 獲取客戶端IPC#客戶端
- 從零開始仿寫一個BiliBili客戶端之編譯ijkplayer客戶端編譯
- IdentityServer4-客戶端定義-翻譯IDEServer客戶端
- C#之使用CefSharp建立客戶端C#客戶端
- CouchBase C 客戶端介面呼叫例項客戶端
- Redis 入門 - C#|.NET Core客戶端庫六種選擇RedisC#客戶端
- Google 谷歌翻譯 Mac 客戶端(Mac翻譯軟體)Go谷歌Mac客戶端
- ElasticSearch 高階 REST 客戶端翻譯 (待續......)ElasticsearchREST客戶端
- FTP客戶端c程式碼功能實現FTP客戶端C程式
- 無線1x客戶端編寫概要客戶端
- 編寫 Netty / RPC 客戶端【框架程式碼分析】NettyRPC客戶端框架
- dubbo客戶端客戶端
- Pulsar客戶端客戶端
- mqtt 客戶端MQQT客戶端
- 服務端,客戶端服務端客戶端
- 客戶端,服務端客戶端服務端
- Nacos - 客戶端心跳續約及客戶端總結客戶端
- 測試平臺系列(90) 編寫oss客戶端客戶端
- 使用 Golang 實現 appium/WebDriverAgent 的客戶端庫GolangAPPWeb客戶端