zc-zookeeper-static icon indicating copy to clipboard operation
zc-zookeeper-static copied to clipboard

Yosemite build failure: htonll conflict

Open hungrybirder opened this issue 11 years ago • 3 comments

https://issues.apache.org/jira/browse/ZOOKEEPER-2049

hungrybirder avatar Dec 17 '14 08:12 hungrybirder

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

MosBas avatar Jan 20 '15 14:01 MosBas

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

pavanch007 avatar Dec 22 '17 00:12 pavanch007

Yup, that certainly does the trick.

MosBas avatar Dec 24 '17 14:12 MosBas