hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.07k stars 112 forks source link

Error when building image using docs/citus/Dockerfile #1007

Closed xin-hedera closed 9 months ago

xin-hedera commented 9 months ago

Error log:

In file included from health_check_worker.c:40:
/usr/include/postgresql/internal/libpq-int.h:86:10: fatal error: common/pg_prng.h: No such file or directory
   86 | #include "common/pg_prng.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: health_check_worker.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:160: monitor] Error 2
make: *** Waiting for unfinished jobs....

The problem is the bullseye-pgdg repo for PG 14 includes libpq-dev version 16, and its internal/libpq-int.h includes common/pg_prng.h which is not present in postgresql-server-dev-14

To fix, can force install libpq5=14.9-1.pgdg110+1 libpq-dev=14.9-1.pgdg110+1

dimitri commented 9 months ago

I believe this should be fixed now on the main branch, thanks for reporting the issue.