metabrainz / musicbrainz-docker

Docker Compose project for the MusicBrainz Server with replication, search, and development setup
https://musicbrainz.org/doc/MusicBrainz_Server/Setup
284 stars 72 forks source link

Docker-compose build failing on update build #270

Closed ashprice closed 4 months ago

ashprice commented 4 months ago
$ git describe --always --broken --dirty --tags
v-2024-01-08
$ docker-compose version --short
2.24.5
$ sudo docker version -f 'Docker Client/Server: {{.Client.Version}}/{{.Server.Version}}'
Docker Client/Server: 25.0.2/25.0.2

The error I am experiencing is below. It happens regardless of building with --no-cache. Not sure how to interpret the output for further troubleshooting.

 => ERROR [db 4/4] RUN git clone https://github.com/omniti-labs/pg_amqp.git /tmp/pg_amqp     && cd /tmp/pg_amqp     && git checkout "240d477d40c5e7a579  2.2s
------
 > [db 4/4] RUN git clone https://github.com/omniti-labs/pg_amqp.git /tmp/pg_amqp     && cd /tmp/pg_amqp     && git checkout "240d477d40c5e7a579b931c98eb29cef4edda164"     && make     && make install     && rm -R /tmp/*:
0.190 Cloning into '/tmp/pg_amqp'...
0.749 Note: switching to '240d477d40c5e7a579b931c98eb29cef4edda164'.
0.749
0.749 You are in 'detached HEAD' state. You can look around, make experimental
0.749 changes and commit them, and you can discard any commits you make in this
0.749 state without impacting any branches by switching back to a branch.
0.749
0.749 If you want to create a new branch to retain commits you create, you may
0.749 do so (now or later) by using -c with the switch command. Example:
0.749
0.749   git switch -c <new-branch-name>
0.749
0.749 Or undo this operation with:
0.749
0.749   git switch -
0.749
0.749 Turn off this advice by setting config variable advice.detachedHead to false
0.749
0.749 HEAD is now at 240d477 Merge pull request #27 from vventirozos/export_issue_21_fix
0.783 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/pg_amqp.o src/pg_amqp.c
0.838 src/pg_amqp.c: In function ‘amqp_local_phase2’:
0.838 src/pg_amqp.c:99:3: warning: enumeration value ‘XACT_EVENT_PARALLEL_COMMIT’ not handled in switch [-Wswitch]
0.838    99 |   switch(event) {
0.838       |   ^~~~~~
0.838 src/pg_amqp.c:99:3: warning: enumeration value ‘XACT_EVENT_PARALLEL_ABORT’ not handled in switch [-Wswitch]
0.838 src/pg_amqp.c:99:3: warning: enumeration value ‘XACT_EVENT_PRE_COMMIT’ not handled in switch [-Wswitch]
0.838 src/pg_amqp.c:99:3: warning: enumeration value ‘XACT_EVENT_PARALLEL_PRE_COMMIT’ not handled in switch [-Wswitch]
0.838 src/pg_amqp.c:99:3: warning: enumeration value ‘XACT_EVENT_PRE_PREPARE’ not handled in switch [-Wswitch]
0.838 src/pg_amqp.c: In function ‘local_amqp_get_a_bs’:
0.838 src/pg_amqp.c:140:1: warning: type of ‘broker_id’ defaults to ‘int’ [-Wimplicit-int]
0.838   140 | local_amqp_get_a_bs(broker_id) {
0.838       | ^~~~~~~~~~~~~~~~~~~
0.838 src/pg_amqp.c: In function ‘local_amqp_get_bs’:
0.838 src/pg_amqp.c:152:1: warning: type of ‘broker_id’ defaults to ‘int’ [-Wimplicit-int]
0.838   152 | local_amqp_get_bs(broker_id) {
0.838       | ^~~~~~~~~~~~~~~~~
0.839 src/pg_amqp.c: In function ‘local_amqp_disconnect’:
0.839 src/pg_amqp.c:239:1: warning: type of ‘broker_id’ defaults to ‘int’ [-Wimplicit-int]
0.839   239 | local_amqp_disconnect(broker_id) {
0.839       | ^~~~~~~~~~~~~~~~~~~~~
0.926 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_api.o src/librabbitmq/amqp_api.c
1.015 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_connection.o src/librabbitmq/amqp_connection.c
1.108 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_debug.o src/librabbitmq/amqp_debug.c
1.123 src/librabbitmq/amqp_debug.c:44:6: warning: no previous prototype for ‘amqp_dump’ [-Wmissing-prototypes]
1.123    44 | void amqp_dump(void const *buffer, size_t len) {
1.123       |      ^~~~~~~~~
1.147 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_framing.o src/librabbitmq/amqp_framing.c
1.692 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_mem.o src/librabbitmq/amqp_mem.c
1.735 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_socket.o src/librabbitmq/amqp_socket.c
1.825 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/librabbitmq/amqp_table.o src/librabbitmq/amqp_table.c
1.888 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -shared -o pg_amqp.so src/pg_amqp.o src/librabbitmq/amqp_api.o src/librabbitmq/amqp_connection.o src/librabbitmq/amqp_debug.o src/librabbitmq/amqp_framing.o src/librabbitmq/amqp_mem.o src/librabbitmq/amqp_socket.o src/librabbitmq/amqp_table.o -L/usr/lib/x86_64-linux-gnu  -Wl,-z,relro -Wl,-z,now -L/usr/lib/llvm-16/lib  -Wl,--as-needed
1.902 cat sql/tables/tables.sql sql/functions/functions.sql > sql/amqp--0.4.2.sql
1.903 /usr/bin/clang-16 -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2  -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -flto=thin -emit-llvm -c -o src/pg_amqp.bc src/pg_amqp.c
1.993 src/pg_amqp.c:99:10: warning: 5 enumeration values not handled in switch: 'XACT_EVENT_PARALLEL_COMMIT', 'XACT_EVENT_PARALLEL_ABORT', 'XACT_EVENT_PRE_COMMIT'... [-Wswitch]
1.993   switch(event) {
1.993          ^~~~~
1.993 src/pg_amqp.c:140:21: error: parameter 'broker_id' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
1.993 local_amqp_get_a_bs(broker_id) {
1.993                     ^
1.994 src/pg_amqp.c:152:19: error: parameter 'broker_id' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
1.994 local_amqp_get_bs(broker_id) {
1.994                   ^
1.994 src/pg_amqp.c:239:23: error: parameter 'broker_id' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
1.994 local_amqp_disconnect(broker_id) {
1.994                       ^
1.997 1 warning and 3 errors generated.
2.001 make: *** [/usr/lib/postgresql/12/lib/pgxs/src/makefiles/../../src/Makefile.global:1076: src/pg_amqp.bc] Error 1
------
failed to solve: process "/bin/sh -c git clone https://github.com/omniti-labs/pg_amqp.git /tmp/pg_amqp     && cd /tmp/pg_amqp     && git checkout \"$PG_AMQP_GIT_REF\"     && make     && make install     && rm -R /tmp/*" did not complete successfully: exit code: 2

I'll take another look myself to see if I can figure anything else out later today, but I'll make the issue as is for now. Thanks as always for doing what you do & let me know if I can provide any other info.

yvanzo commented 4 months ago

Hi, thanks for reporting! This issue has been triggered after a change of base image in the official Postgres image. It has been resolved with https://github.com/metabrainz/musicbrainz-docker/pull/268 and will be fixed with the next release. In the meantime, you can safely refer to the commit:

git fetch origin && git checkout b02c61b5e0a35b7763b4d4b4fac64f47295b97b0