Description
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 作者大大这个问题怎么解决呀?
有大佬解释一下这个是如何解决的吗