satori-com / mzbench

MZ Benchmarking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler Error in C code

zkessin opened this issue · comments

I checked out MZBench onto Ubuntu 17.04 and when I tried to run it I got a lot of compiler errors of this form. This was running the basic bin/mzbench start_server

cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -fPIC -I /usr/lib/erlang/erts-9.0/include/ -I /usr/lib/erlang/lib/erl_interface-3.10/include  -c -o /home/zkessin/Documents/Kobil/mzbench/server/_build/default/deps/hdr_histogram/c_src/hdr_histogram_log.o /home/zkessin/Documents/Kobil/mzbench/server/_build/default/deps/hdr_histogram/c_src/hdr_histogram_log.c
/home/zkessin/Documents/Kobil/mzbench/server/_build/default/deps/hdr_histogram/c_src/hdr_histogram_log.c:67:5: warning: no previous prototype for ‘realloc_buffer’ [-Wmissing-prototypes]
 int realloc_buffer(
     ^~~~~~~~~~~~~~
/home/zkessin/Documents/Kobil/mzbench/server/_build/default/deps/hdr_histogram/c_src/hdr_histogram_log.c:102:5: warning: no previous prototype for ‘null_trailing_whitespace’ [-Wmissing-prototypes]
 int null_trailing_whitespace(char* s, int len)
     ^~~~~~~~~~~~~~~~~~~~~~~~

Hi, sorry for slow reply, it does not look like an error, it is a warning, probably you have some error message below this, please check and let me know

I should say it works on my mac, but not on linux. Since the linux machine is about 20x faster so I would like to use things there

Thanks for the whole output, looks like the problem is around forward declaration of a structure. Probably it is related different gcc version, I have 4.8.5 on my linux and you probably have 6.3.0, I know that rolling back gcc is painful, so, I'll try to check and fix this problem on a newer version

we have found the similar issue in upstream hdr_histogram repository and applied the same fix, please check if it works for you, thank you!