[
https://issues.apache.org/jira/browse/ZOOKEEPER-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15611643#comment-15611643
]
ASF GitHub Bot commented on ZOOKEEPER-761:
------------------------------------------
Github user fpj commented on the issue:
https://github.com/apache/zookeeper/pull/90
@breed `make check` does not compile for me:
```
g++ -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated
-DUSE_STATIC_LIB -DZKSERVER_CMD="\"./tests/zkServer.sh\"" -DZOO_IPV6_ENABLED
-g -O2 -MT zktest_st-TestReconfigServer.o -MD -MP -MF
.deps/zktest_st-TestReconfigServer.Tpo -c -o zktest_st-TestReconfigServer.o
`test -f 'tests/TestReconfigServer.cc' || echo './'`tests/TestReconfigServer.cc
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from tests/TestReconfigServer.cc:18:
tests/TestReconfigServer.cc: In member function 'void
TestReconfigServer::testRemoveFollower()':
tests/TestReconfigServer.cc:153:73: error: 'zoo_getconfig' was not declared
in this scope
CPPUNIT_ASSERT_EQUAL((int)ZOK, zoo_getconfig(zk, 0, buf, &len, &stat));
^
tests/TestReconfigServer.cc:174:32: error: 'zoo_reconfig' was not declared
in this scope
&stat);
^
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from tests/TestReconfigServer.cc:18:
tests/TestReconfigServer.cc: In member function 'void
TestReconfigServer::testNonIncremental()':
tests/TestReconfigServer.cc:221:73: error: 'zoo_getconfig' was not declared
in this scope
CPPUNIT_ASSERT_EQUAL((int)ZOK, zoo_getconfig(zk, 0, buf, &len, &stat));
^
tests/TestReconfigServer.cc:246:32: error: 'zoo_reconfig' was not declared
in this scope
&stat);
^
tests/TestReconfigServer.cc: In member function 'void
TestReconfigServer::testRemoveConnectedFollower()':
tests/TestReconfigServer.cc:313:72: error: 'zoo_reconfig' was not declared
in this scope
zoo_reconfig(zk, NULL, ss.str().c_str(), NULL, -1, buf, &len, &stat);
^
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from tests/TestReconfigServer.cc:18:
tests/TestReconfigServer.cc:314:73: error: 'zoo_getconfig' was not declared
in this scope
CPPUNIT_ASSERT_EQUAL((int)ZOK, zoo_getconfig(zk, 0, buf, &len, &stat));
```
have you tried running the C tests?
> Remove *synchronous* calls from the *single-threaded* C clieant API, since
> they are documented not to work
> ----------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-761
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-761
> Project: ZooKeeper
> Issue Type: Improvement
> Components: c client
> Affects Versions: 3.1.1, 3.2.2
> Environment: RHEL 4u8 (Linux). The issue is not OS-specific though.
> Reporter: Jozef Hatala
> Assignee: Benjamin Reed
> Priority: Minor
> Fix For: 3.5.3, 3.6.0
>
> Attachments: fix-sync-apis-in-st-adaptor.patch,
> fix-sync-apis-in-st-adaptor.v2.patch
>
>
> Since the synchronous calls are
> [known|http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#Using+the+C+Client]
> to be unimplemented in the single threaded version of the client library
> libzookeeper_st.so, I believe that it would be helpful towards users of the
> library if that information was also obvious from the header file.
> Anecdotally more than one of us here made the mistake of starting by using
> the synchronous calls with the single-threaded library, and we found
> ourselves debugging it. An early warning would have been greatly appreciated.
> 1. Could you please add warnings to the doxygen blocks of all synchronous
> calls saying that they are not available in the single-threaded API. This
> cannot be safely done with {{#ifdef THREADED}}, obviously, because the same
> header file is included whichever client library implementation one is
> compiling for.
> 2. Could you please bracket the implementation of all synchronous calls in
> zookeeper.c with {{#ifdef THREADED}} and {{#endif}}, so that those symbols
> are not present in libzookeeper_st.so?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)