Aha, installing clang solved it
I must have missed that somewhere in the readme/doc. The error message could use some love though.
I tested it and from a first glance the outputs look surprisingly nice.
The comments are a bit out of place though, ex: https://github.com/antirez/redis/blob/unstable/src/hyperloglog.c#L182
gives
pub struct hllhdr {
pub magic: [i8; 4],
pub encoding: u8,
pub notused: [u8; 3],
pub card: [u8; 8],
pub registers: [u8], /* "HYLL" */
/* HLL_DENSE or HLL_SPARSE. */
/* Reserved for future use, must be zero. */
/* Cached cardinality, little endian. */
/* Data bytes. */
}
Macro expansion also interleaved with a function comment
pub static HLL_P_MASK: c_long =
/* Given a string element to add to the HyperLogLog, returns the length
* of the pattern 000..1 of the element hash. As a side effect 'regp' is
* set to the register index this element hashes to. */
/* Count the number of zeroes starting from bit HLL_REGISTERS
* (that is a power of two corresponding to the first bit we don't use
* as index). The max run can be 64-P+1 bits.
*
* Note that the final "1" ending the sequence of zeroes must be
* included in the count, so if we find "001" the count is 3, and
* the smallest count possible is no zeroes at all, just a 1 bit
* at the first position, that is a count of 1.
*
* This may sound like inefficient, but actually in the average case
* there are high probabilities to find a 1 after a few iterations. */
((1 << 14) - 1);
pub static HLL_REGISTERS: u64 =
/* Register index. */
/* Make sure the loop terminates. */
(1 << 14);
pub unsafe fn hllPatLen(mut ele: *mut u8, mut elesize: usize,
mut regp: &mut c_long) -> c_int {
...
}