jubatus / jubatus-installer

Install Script of Jubatus
18 stars 17 forks source link

Update zookeeper version from 3.4.13 to 3.4.14 #72

Closed bungoume closed 4 years ago

bungoume commented 4 years ago
rimms commented 4 years ago

@bungoume Thank you. I will test this patch.

rimms commented 4 years ago

I testing this patch on Ubuntu 16.04 (gcc 5.4.0).

cc1: error: -Werror=format-overflow: no option -Wformat-overflow

We want to support Ubuntu 16.04. Is -Wformat-overflow option required to build ZooKeeper?

bungoume commented 4 years ago

-Wformat-overflow option required

yes, GCC 8.3.0 (Debian buster) doesn't work without this option.

root@77f4aacb1d27:/jubatus-installer/download/zookeeper-3.4.14/zookeeper-client/zookeeper-client-c# make
make  all-am
make[1]: Entering directory '/jubatus-installer/download/zookeeper-3.4.14/zookeeper-client/zookeeper-client-c'
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I./include -I./tests -I./generated   -Wall -Werror  -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c  -fPIC -DPIC -o .libs/zookeeper.o
src/zookeeper.c: In function 'format_endpoint_info':
src/zookeeper.c:3506:21: error: '%d' directive writing between 1 and 5 bytes into a region of size between 0 and 127 [-Werror=format-overflow=]
     sprintf(buf,"%s:%d",addrstr,ntohs(port));
                     ^~
src/zookeeper.c:3506:17: note: directive argument in the range [0, 65535]
     sprintf(buf,"%s:%d",addrstr,ntohs(port));
                 ^~~~~~~
src/zookeeper.c:3506:5: note: 'sprintf' output between 3 and 134 bytes into a destination of size 128
     sprintf(buf,"%s:%d",addrstr,ntohs(port));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:947: zookeeper.lo] Error 1
make[1]: Leaving directory '/jubatus-installer/download/zookeeper-3.4.14/zookeeper-client/zookeeper-client-c'
make: *** [Makefile:622: all] Error 2
bungoume commented 4 years ago

I removed the advanced parameter settings and now it works with GCC6 (and below).

rimms commented 4 years ago

@bungoume Thank you. I raised a new Issue (https://github.com/jubatus/jubatus-installer/issues/73).