1. 程式人生 > >zookeeper C API 編譯

zookeeper C API 編譯

今天想用一下 zookeeper API,結果編譯的時候遇到以下問題。

1.問題1

問題描述

執行完 configure,然後開始編譯 make,結果丟擲一下錯誤資訊。

touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
make  all-am
make[1]: Entering directory `/home/zk/opt/zookeeper/server2/zookeeper-3.3.6/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.2 Debian-2.4.2-1ubuntu1, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6b.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1ubuntu1
libtool: and run autoconf again.
make[1]: *** [zookeeper.lo] Error 63
make[1]: Leaving directory `/home/zk/opt/zookeeper/server2/zookeeper-3.3.6/src/c'
make: *** [all] Error 2

問題原因

因為 configure 檔案不適用於當前系統環境。

問題解決

重新生成 configue 檔案

[[email protected] c]$ autoreconf -ivf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
aclocal.m4:16: warning: this file was generated for autoconf 2.68.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
autoreconf: running: libtoolize --copy --force
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.
autoreconf: running: /usr/bin/autoconf --force
aclocal.m4:16: warning: this file was generated for autoconf 2.68.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
autoreconf: running: /usr/bin/autoheader --force
aclocal.m4:16: warning: this file was generated for autoconf 2.68.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
[

[email protected] c]$ 

2.問題2

問題描述

執行configure 的時候 丟擲以下錯誤。

./configure: line 4623: ` AM_PATH_CPPUNIT(1.10.2)'

問題原因

同上 【問題1】

問題解決

同上【問題1】

相關推薦

zookeeper C API 編譯

今天想用一下 zookeeper API,結果編譯的時候遇到以下問題。 1.問題1 問題描述 執行完 configure,然後開始編譯 make,結果丟擲一下錯誤資訊。 touch config.h.in cd . && /bin/sh ./config

Zookeeper C API應用示例(3)——配置管理(非同步API

場景描述同:https://blog.csdn.net/qq_41688455/article/details/83780854 服務端程式碼如下: #include <stdio.h> #include <unistd.h> #include <std

Zookeeper C API應用示例(1)——配置管理(同步API

場景描述 服務端監控/configure目錄; 客戶端對/configure目錄讀/寫資料,建立/刪除子節點 服務端: 監控/configure目錄,有資料更新時,輸出/configure中的資料;子節點建立/刪除時,服務程式列出當前的子目錄列表。 程式碼如下: #include &

Zookeeper C API之介面描述

Zookeeper C API介面大部分以zoo_開頭,少量介面以zookeeper_開頭。 除了初始化/銷燬控制代碼、設定日誌等級/日誌流以及一些輔助功能的API外,Zookeeper C API介面分為同步介面和非同步介面:同步介面以zoo_開頭、非同步介面以zoo_a開頭。 1、初

Zookeeper C API應用準備工作

上文 https://blog.csdn.net/qq_41688455/article/details/83659876 中講述瞭如何配置Zookeeper C開發環境,本文將介紹在編譯Zookeeper C客戶端前的準備工作和注意事項。 步驟 1、配置環境變數: 按照上文

Zookeeper C API之回撥函式

監視回撥函式 原型: Typedef void (*watcher_fn)(zhandle_t *zh, int type, int state, const char *path, void *watcherCtx); 監視函式原型的各個引數說明如下:

Zookeeper C API之監視(Watch)、常量和結構體

1、監視(Watch)簡介 Zookeeper C API的宣告和描述定義在檔案include/zookeeper.h中,大部分的常量、結構體宣告也定義在這個檔案中。 Zookeeper所有的讀操作(包括:getData()、getChildren()和exists())度可以設定Watch

Zookeeper C API開發環境配置

Zookeeper C API庫分為單執行緒(zookeeper_st)和多執行緒庫(zookeeper_mt)兩種: 單執行緒庫(zookeeper_st):僅提供非同步API和回撥函式; 多執行緒庫(zookeeper_mt):支援同步API和非同步API以及回撥,包含

Zookeeper C API開發環境配置

Zookeeper C API庫分為單執行緒(zookeeper_st)和多執行緒庫(zookeeper_mt)兩種: 單執行緒庫(zookeeper_st):僅提供非同步API和回撥函式; 多執行緒庫(zookeeper_mt):支援同步API和非同步API

Zookeeper C API之監視(Watch)、常量和結構體

1、監視(Watch)簡介 Zookeeper C API的宣告和描述定義在檔案include/zookeeper.h中,大部分的常量、結構體宣告也定義在這個檔案中。 Zookeeper所有的讀操作(包括:getData()、getChildren()和exis

Zookeeper C API之回撥函式

監視回撥函式 原型: Typedef void (*watcher_fn)(zhandle_t *zh, int type, int state, const char *path, void *watcherCtx); 監視函式原型的各個引數說明如下:

Zookeeper C API應用準備工作

步驟 1、配置環境變數: 按照上文描述的步驟,在makeinstall之後,生成的庫檔案zookeeper_mt和zookeeper_st會被拷貝到/usr/local/lib目錄下,因此需要配置非標準庫路徑的環境變數:LD_LIBRARY_PATH,方法如

zookeeper c api連線管理問題

背景:使用zookeeper3.4.8   的 c api寫了一個客戶端來測試zookeeper叢集 在測試到其中一個點的時候,遇到一些困惑: 假如zookeeper叢集啟動了三個zookeeper例項,對應ip埠分別是:host1:port1,host2:port2,ho

zookeeperc API 單線程與多線程問題 cli_st和cli_mt

.lib libs tool .com tag gnu 編譯選項 watch || 同樣的程序,在centos和ubuntu上都沒有問題,在solaris上問題卻多多,據說是solaris管理更加嚴格。 zookeeper_init方法,在傳入一個錯誤的host也能初始

TensorFlow-1.11.0 原始碼編譯&C++ API使用

『寫在前面』 關於tf,一種常見的使用方式是:線上下使用TensorFlow的Python Binding搭建和訓練模型,然後利用freeze_graph工具等工具輸出*.pb檔案(或使用tf.train.Saver儲存成*.meta檔案和checkpoint

zookeeper----C/C++ client 例子在windows下編譯執行

下載ZooKeeper,我下載的是3.4.6,解壓 vs2008或者以上 在windows 環境變數中,增加ZOOKEEPER_HOME定義,指向解壓目錄 手動修改project檔案,$(ZOOKEEPER_HOME)\src\c\zookeeper.vcproj,用記事本(或者ultraedit等)開啟,

C編譯

class copy lin turn -- urn ces stdio.h std /* ============================================================================ Name

c#命令編譯解決方案和項目

con x86 sof ica desktop ide build路徑 命令行編譯 users C#調用命令行編譯項目一般是用devenv和MSBuild 編譯解決方案和項目。 具體用法如下: devenv編譯解決方案和項目 devenv C:\Users\Mr-Guo\D

c++ --程序編譯

style 可執行文件 修改 center 對象 包含 源文件 pragma 編輯 程序編譯 程序的編譯流程大體可分為編輯、預處理、編譯和鏈接4個步驟。 1. 編輯   編輯程序:將源文件輸入計算機進行修改和保存的過程就稱為“編輯”。 2.

[ c++] cmake 編譯時 undefined reference to `std::cout' 錯誤的解決方案

bin cut () cmake fin epo linking com urn cmake .. 和 make 之後,出現如下錯誤 Linking CXX executable ../../../bin/ModuleTest CMakeFiles/Modu