{"action":"closed","issue":{"url":"https://api.github.com/repos/confluentinc/bottledwater-pg/issues/48","repository_url":"https://api.github.com/repos/confluentinc/bottledwater-pg","labels_url":"https://api.github.com/repos/confluentinc/bottledwater-pg/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/confluentinc/bottledwater-pg/issues/48/comments","events_url":"https://api.github.com/repos/confluentinc/bottledwater-pg/issues/48/events","html_url":"https://github.com/confluentinc/bottledwater-pg/issues/48","id":130765364,"number":48,"title":"Docker build failing with current instructions","user":{"login":"scordeiro","id":12915479,"avatar_url":"https://avatars.githubusercontent.com/u/12915479?v=3","gravatar_id":"","url":"https://api.github.com/users/scordeiro","html_url":"https://github.com/scordeiro","followers_url":"https://api.github.com/users/scordeiro/followers","following_url":"https://api.github.com/users/scordeiro/following{/other_user}","gists_url":"https://api.github.com/users/scordeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/scordeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scordeiro/subscriptions","organizations_url":"https://api.github.com/users/scordeiro/orgs","repos_url":"https://api.github.com/users/scordeiro/repos","events_url":"https://api.github.com/users/scordeiro/events{/privacy}","received_events_url":"https://api.github.com/users/scordeiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-02T18:03:48Z","updated_at":"2016-02-16T19:32:15Z","closed_at":"2016-02-16T19:32:15Z","body":"I tried using the Dockerfile.build instructions `docker build -f build/Dockerfile.build -t bwbuild:v1 .` but it's failing when compiling the Bottled Water source code (the last one).\r\n\r\nIt seems this may have to do with the current `gcc` version used in Debian and the PostgreSQL 9.4 dev source code, respectively the `pqexpbuffer.h` header file.\r\n\r\nAre you able to reproduce and confirm this? Should I use a specific compiler version?\r\n\r\nGCC and G++ packages installed with `apt-get install`:\r\n\r\n```\r\ncpp-4.9 amd64 4.9.2-10\r\ncpp amd64 4:4.9.2-2\r\nlibgcc-4.9-dev amd64 4.9.2-10\r\ngcc-4.9 amd64 4.9.2-10\r\ngcc amd64 4:4.9.2-2\r\nlibstdc++-4.9-dev amd64 4.9.2-10\r\ng++-4.9 amd64 4.9.2-10\r\ng++ amd64 4:4.9.2-2\r\n```\r\n\r\nError below:\r\n\r\n```c\r\nStep 6 : RUN cd /root/bottledwater &&     make clean && make && make install && cd / &&     tar czf bottledwater-ext.tar.gz usr/lib/postgresql/9.4/lib/bottledwater.so usr/share/postgresql/9.4/extension/bottledwater* &&     cp /root/bottledwater/kafka/bottledwater /root/bottledwater/client/bwtest /usr/local/bin &&     tar czf bottledwater-bin.tar.gz usr/local/bin/bottledwater usr/local/bin/bwtest\r\n ---> Running in 5525be9d5f5a\r\nmake -C ext clean\r\nmake[1]: Entering directory '/root/bottledwater/ext'\r\nrm -f bottledwater.so   libbottledwater.a  libbottledwater.pc\r\nrm -f io_util.o logdecoder.o oid2avro.o schema_cache.o protocol.o protocol_server.o snapshot.o\r\nmake[1]: Leaving directory '/root/bottledwater/ext'\r\nmake -C client clean\r\nmake[1]: Entering directory '/root/bottledwater/client'\r\nrm -f replication.o protocol.o protocol_client.o connect.o bwtest.o bwtest libbottledwater.a\r\nmake[1]: Leaving directory '/root/bottledwater/client'\r\nmake -C kafka clean\r\nmake[1]: Entering directory '/root/bottledwater/kafka'\r\nrm -f bottledwater.o registry.o bottledwater\r\nmake[1]: Leaving directory '/root/bottledwater/kafka'\r\nmake -C ext all\r\nmake[1]: Entering directory '/root/bottledwater/ext'\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o io_util.o io_util.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o logdecoder.o logdecoder.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o oid2avro.o oid2avro.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o schema_cache.o schema_cache.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o protocol.o protocol.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o protocol_server.o protocol_server.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I/usr/local/include  -std=c99 -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o snapshot.o snapshot.c\r\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -shared -o bottledwater.so io_util.o logdecoder.o oid2avro.o schema_cache.o protocol.o protocol_server.o snapshot.o -L/usr/lib/x86_64-linux-gnu -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5  -Wl,--as-needed  -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu -lavro -lz  \r\nmake[1]: Leaving directory '/root/bottledwater/ext'\r\nmake -C client all\r\nmake[1]: Entering directory '/root/bottledwater/client'\r\ngcc -c -std=c99 -D_POSIX_C_SOURCE=200809L -I/usr/include/postgresql -I/usr/include/postgresql/9.4/server -I/usr/local/include  -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security replication.c -o replication.o\r\nIn file included from replication.c:13:0:\r\n/usr/include/postgresql/internal/pqexpbuffer.h:149:13: warning: no previous prototype for ‘printfPQExpBuffer’ [-Wmissing-prototypes]                                                                                                  \r\n extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);                                                                                                                                       \r\n             ^                                                                                                                                                                                                                        \r\n/usr/include/postgresql/internal/pqexpbuffer.h: In function ‘printfPQExpBuffer’:                                                                                                                                                      \r\n/usr/include/postgresql/internal/pqexpbuffer.h:149:69: error: expected declaration specifiers before ‘pg_attribute_printf’                                                                                                            \r\n extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);                                                                                                                                       \r\n                                                                     ^                                                                                                                                                                \r\n/usr/include/postgresql/internal/pqexpbuffer.h:158:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pg_attribute_printf’                                                                                           \r\n extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);                                                                                                                                       \r\n                                                                     ^                                                                                                                                                                \r\n/usr/include/postgresql/internal/pqexpbuffer.h:165:13: error: storage class specified for parameter ‘appendPQExpBufferStr’                                                                                                            \r\n extern void appendPQExpBufferStr(PQExpBuffer str, const char *data);                                                                                                                                                                 \r\n             ^                                                                                                                                                                                                                        \r\n/usr/include/postgresql/internal/pqexpbuffer.h:172:13: error: storage class specified for parameter ‘appendPQExpBufferChar’                                                                                                           \r\n extern void appendPQExpBufferChar(PQExpBuffer str, char ch);                                                                                                                                                                         \r\n             ^                                                                                                                                                                                                                        \r\n/usr/include/postgresql/internal/pqexpbuffer.h:179:13: error: storage class specified for parameter ‘appendBinaryPQExpBuffer’                                                                                                         \r\n extern void appendBinaryPQExpBuffer(PQExpBuffer str,                                                                                                                                                                                 \r\n             ^                                                                                                                                                                                                                        \r\nreplication.c:45:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token                                                                                                                                         \r\n int replication_slot_create(replication_stream_t stream) {                                                                                                                                                                           \r\n                                                          ^                                                                                                                                                                           \r\nreplication.c:97:56: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token                                                                                                                                         \r\n int replication_slot_drop(replication_stream_t stream) {\r\n                                                        ^\r\nreplication.c:116:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int replication_stream_check(replication_stream_t stream) {\r\n                                                           ^\r\nreplication.c:146:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int replication_stream_start(replication_stream_t stream) {\r\n                                                           ^\r\nreplication.c:169:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int replication_stream_finish(replication_stream_t stream) {\r\n                                                            ^\r\nreplication.c:184:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int replication_stream_poll(replication_stream_t stream) {\r\n                                                          ^\r\nreplication.c:230:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int replication_stream_keepalive(replication_stream_t stream) {\r\n                                                               ^\r\nreplication.c:252:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int parse_keepalive_message(replication_stream_t stream, char *buf, int buflen) {\r\n                                                                                 ^\r\nreplication.c:292:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int parse_xlogdata_message(replication_stream_t stream, char *buf, int buflen) {\r\n                                                                                ^\r\nreplication.c:326:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int send_checkpoint(replication_stream_t stream, int64 now) {\r\n                                                             ^\r\nreplication.c:355:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n void repl_error(replication_stream_t stream, char *fmt, ...) {\r\n                                                              ^\r\nreplication.c:364:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int64 current_time() {\r\n                      ^\r\nreplication.c:376:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n void sendint64(int64 i64, char *buf) {\r\n                                      ^\r\nreplication.c:385:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token\r\n int64 recvint64(char *buf) {\r\n                            ^\r\nIn file included from replication.c:13:0:\r\n/usr/include/postgresql/internal/pqexpbuffer.h:149:13: error: old-style parameter declarations in prototyped function definition\r\n extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);\r\n             ^\r\nreplication.c:395:1: error: expected ‘{’ at end of input\r\n }\r\n ^\r\nMakefile:31: recipe for target 'replication.o' failed\r\nmake[1]: *** [replication.o] Error 1\r\nmake[1]: Leaving directory '/root/bottledwater/client'\r\nMakefile:4: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\nThe command '/bin/sh -c cd /root/bottledwater &&     make clean && make && make install && cd / &&     tar czf bottledwater-ext.tar.gz usr/lib/postgresql/9.4/lib/bottledwater.so usr/share/postgresql/9.4/extension/bottledwater* &&     cp /root/bottledwater/kafka/bottledwater /root/bottledwater/client/bwtest /usr/local/bin &&     tar czf bottledwater-bin.tar.gz usr/local/bin/bottledwater usr/local/bin/bwtest' returned a non-zero code: 2\r\n```"}}