pg_check
pg_check copied to clipboard
Looks that pg_check doesn't compile with/for Pg 11
I tried to get it installed, but "make" fail.
System: Ubuntu Bionic, with Pg:
# dpkg -l | awk '$1=="ii" && $2 ~ /postgresql.*11/ {printf "%-35s : %s\n", $2, $3}' | sort
postgresql-11 : 11.3-1.pgdg18.04+1
postgresql-11-dbgsym : 11.3-1.pgdg18.04+1
postgresql-11-pg-collkey : 0.5.1-1insops1
postgresql-11-pglogical : 2.2.1-4.pgdg18.04+1
postgresql-11-postgis-2.5 : 2.5.2+dfsg-1~exp1.pgdg18.04+1
postgresql-11-postgis-2.5-scripts : 2.5.2+dfsg-1~exp1.pgdg18.04+1
postgresql-client-11 : 11.3-1.pgdg18.04+1
postgresql-plperl-11 : 11.3-1.pgdg18.04+1
postgresql-server-dev-11 : 11.3-1.pgdg18.04+1
got fresh clone, and tried to compile it:
# git clone https://github.com/tvondra/pg_check.git
Cloning into 'pg_check'...
remote: Enumerating objects: 308, done.
remote: Total 308 (delta 0), reused 0 (delta 0), pack-reused 308
Receiving objects: 100% (308/308), 90.32 KiB | 18.06 MiB/s, done.
Resolving deltas: 100% (188/188), done.
# cd pg_check/
# git rev-parse HEAD
db34fe20ddf5c597fe97f634a765360b022d13ab
# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o src/pg_check.o src/pg_check.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o src/common.o src/common.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o src/heap.o src/heap.c
src/heap.c: In function ‘check_heap_tuple_attributes’:
src/heap.c:292:28: error: incompatible types when initializing type ‘Form_pg_attribute {aka struct FormData_pg_attribute *}’ using type ‘FormData_pg_attribute {aka struct FormData_pg_attribute}’
Form_pg_attribute attr = rel->rd_att->attrs[j];
^~~
<builtin>: recipe for target 'src/heap.o' failed
make: *** [src/heap.o] Error 1
Does the code need some update, or did I screw something up?