zc-zookeeper-static
zc-zookeeper-static copied to clipboard
Yosemite build failure: htonll conflict
https://issues.apache.org/jira/browse/ZOOKEEPER-2049
Resolving this issue is relatively easy. The bundled c.tgz in the zc-zookeeper-static egg it outdated, and most specifically, uses the htonll macro. This case can be solved by bundling a newer official zookeeper tgz, or by replacing the htonll function with zoo_htonll in 4 files within the existing tgz file:
- recordio.h
- recordio.c
- zookeeper.c
- ZKMocks.cc
Thanks @technomosh that worked! In bash speak, run the following commands:
pip install zc-zookeeper-static --no-clean
cd <to the tmp build dir>/zc-zookeeper-static
sed -i -e 's/htonll/zoo_htonll/g' c/src/recordio.c c/src/zookeeper.c c/include/recordio.h c/tests/ZKMocks.cc
rm -rf c.tgz
tar -cvzf c.tgz c
pip install <to the tmp build dir>/zc-zookeeper-static
Yup, that certainly does the trick.