-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于ZooKeeper C库的错误 #35
Comments
感觉是zookeeper版本不对,楼主有解决吗 |
换成3.7.0的解决了已经 |
老哥,请教一下ubuntu如何更换这个版本 |
请问一下怎么安装的3.7.0 为什么我下载后面的版本都没有src/c文件夹 |
之后的版本文件结构变了,需要的头文件在其他文件目录下:/zookeeper-client/zookeeper-client-c/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usr/bin/c++ -DDBUG_OFF -Dsylar_EXPORTS -D__FILE__="sylar/zk_client.cc" -I/home/ly/pointer/sylar-master/. -I/apps/sylar/include -I/usr/include/mysql -rdynamic -O3 -fPIC -ggdb -std=c++11 -Wall -Wno-deprecated -Werror -Wno-unused-function -Wno-builtin-macro-redefined -Wno-deprecated-declarations -fPIC -o CMakeFiles/sylar.dir/sylar/zk_client.cc.o -c /home/ly/pointer/sylar-master/sylar/zk_client.cc
/home/ly/pointer/sylar-master/sylar/zk_client.cc:21:44: error: ‘ZOO_CONTAINER’ was not declared in this scope; did you mean ‘CONTAINER’?
21 | const int ZKClient::FlagsType::CONTAINER = ZOO_CONTAINER;
| ^~~~~~~~~~~~~
| CONTAINER
/home/ly/pointer/sylar-master/sylar/zk_client.cc:28:43: error: ‘ZOO_READONLY_STATE’ was not declared in this scope
28 | const int ZKClient::StateType::READONLY = ZOO_READONLY_STATE;
| ^~~~~~~~~~~~~~~~~~
/home/ly/pointer/sylar-master/sylar/zk_client.cc:29:47: error: ‘ZOO_NOTCONNECTED_STATE’ was not declared in this scope; did you mean ‘ZOO_CONNECTED_STATE’?
29 | const int ZKClient::StateType::NOTCONNECTED = ZOO_NOTCONNECTED_STATE;
| ^~~~~~~~~~~~~~~~~~~~~~
| ZOO_CONNECTED_STATE
/home/ly/pointer/sylar-master/sylar/zk_client.cc: In member function ‘bool sylar::ZKClient::reconnect()’:
/home/ly/pointer/sylar-master/sylar/zk_client.cc:52:16: error: ‘zookeeper_init2’ was not declared in this scope; did you mean ‘zookeeper_init’?
52 | m_handle = zookeeper_init2(m_hosts.c_str(), &ZKClient::OnWatcher, m_recvTimeout, nullptr, this, 0, m_logCb);
| ^~~~~~~~~~~~~~~
| zookeeper_init
/home/ly/pointer/sylar-master/sylar/zk_client.cc: In member function ‘bool sylar::ZKClient::init(const string&, int, sylar::ZKClient::watcher_callback, sylar::ZKClient::log_callback)’:
/home/ly/pointer/sylar-master/sylar/zk_client.cc:67:16: error: ‘zookeeper_init2’ was not declared in this scope; did you mean ‘zookeeper_init’?
67 | m_handle = zookeeper_init2(hosts.c_str(), &ZKClient::OnWatcher, m_recvTimeout, nullptr, this, 0, lcb);
| ^~~~~~~~~~~~~~~
| zookeeper_init
/home/ly/pointer/sylar-master/sylar/zk_client.cc: In member function ‘int32_t sylar::ZKClient::setServers(const string&)’:
/home/ly/pointer/sylar-master/sylar/zk_client.cc:72:15: error: ‘zoo_set_servers’ was not declared in this scope
72 | auto rt = zoo_set_servers(m_handle, hosts.c_str());
| ^~~~~~~~~~~~~~~
/home/ly/pointer/sylar-master/sylar/zk_client.cc: In member function ‘int32_t sylar::ZKClient::getConfig(std::string&, bool, Stat*)’:
/home/ly/pointer/sylar-master/sylar/zk_client.cc:103:16: error: ‘ZOO_CONFIG_NODE’ was not declared in this scope
103 | return get(ZOO_CONFIG_NODE, val, watch, stat);
| ^~~~~~~~~~~~~~~
/home/ly/pointer/sylar-master/sylar/zk_client.cc: In member function ‘std::string sylar::ZKClient::getCurrentServer()’:
/home/ly/pointer/sylar-master/sylar/zk_client.cc:137:15: error: ‘zoo_get_current_server’ was not declared in this scope; did you mean ‘getCurrentServer’?
137 | auto rt = zoo_get_current_server(m_handle);
| ^~~~~~~~~~~~~~~~~~~~~~
| getCurrentServer
make[2]: *** [CMakeFiles/sylar.dir/build.make:865:CMakeFiles/sylar.dir/sylar/zk_client.cc.o] 错误 1
make[2]: 离开目录“/home/ly/pointer/sylar-master/build”
make[1]: *** [CMakeFiles/Makefile2:248:CMakeFiles/sylar.dir/all] 错误 2
make[1]: 离开目录“/home/ly/pointer/sylar-master/build”
make: *** [Makefile:87:all] 错误 2
@sylar-yin 作者大大这个问题怎么解决呀?
有大佬解释一下这个是如何解决的吗
The text was updated successfully, but these errors were encountered: