Opened 3 years ago

Closed 3 years ago

#5087 closed defect (fixed)

3.0.5 build error against PostgreSQL 14

Reported by: devrimgunduz Owned by: robe
Priority: medium Milestone: PostGIS 3.0.6
Component: documentation Version: 3.0.x
Keywords: Cc:

Description

Hi,

3.0.5 fails to build against PostgreSQL 14. I did not see any issues against other versions. Can you please take a look? Thanks!


gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -I../liblwgeom -std=gnu99 -I/usr/gdal33/include -fno-math-errno -fno-signed-zeros -I../libpgcommon -I../deps/wagyu -I../deps/uthash/include -I/usr/geos39/include -I/usr/proj82/include -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -fPIC -DPIC -I/usr/include -I. -I./ -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o gserialized_gist_nd.o gserialized_gist_nd.c In file included from /usr/pgsql-14/include/server/utils/geo_decls.h:21,

from ../libpgcommon/lwgeom_pg.h:24, from gserialized_gist_nd.c:47:

gserialized_gist_nd.c: In function 'gserialized_gist_compress': ../libpgcommon/gserialized_gist.h:68:40: warning: array subscript 'float[32][1]' is partly outside array bounds of 'char[36]' [-Warray-bounds]

68 | #define GIDX_GET_MAX(gidx, dimension) (*((_gidx_float_array *)(&(gidx)->c)))[2 * (dimension) + 1]

| ~

gserialized_gist_nd.c:916:14: note: while referencing 'gidxmem'

916 | char gidxmem[GIDX_MAX_SIZE];

|

In file included from /usr/pgsql-14/include/server/utils/geo_decls.h:21,

from ../libpgcommon/lwgeom_pg.h:24, from gserialized_gist_nd.c:47:

../libpgcommon/gserialized_gist.h:66:40: warning: array subscript 'float[32][1]' is partly outside array bounds of 'char[36]' [-Warray-bounds]

66 | #define GIDX_GET_MIN(gidx, dimension) (*((_gidx_float_array *)(&(gidx)->c)))[2 * (dimension)]

| ~

gserialized_gist_nd.c:916:14: note: while referencing 'gidxmem'

916 | char gidxmem[GIDX_MAX_SIZE];

|

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -I../liblwgeom -std=gnu99 -I/usr/gdal33/include -fno-math-errno -fno-signed-zeros -I../libpgcommon -I../deps/wagyu -I../deps/uthash/include -I/usr/geos39/include -I/usr/proj82/include -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -fPIC -DPIC -I/usr/include -I. -I./ -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o gserialized_supportfn.o gserialized_supportfn.c gserialized_supportfn.c: In function 'postgis_index_supportfn': gserialized_supportfn.c:420:75: warning: passing argument 1 of 'is_pseudo_constant_for_index' from incompatible pointer type [-Wincompatible-pointer-types]

420 | if (!is_pseudo_constant_for_index((Node*)expandexpr, req->index))

| | | | Node *

In file included from gserialized_supportfn.c:38: /usr/pgsql-14/include/server/optimizer/optimizer.h:100:55: note: expected 'PlannerInfo *' but argument is of type 'Node *'

100 | extern bool is_pseudo_constant_for_index(PlannerInfo *root, Node *expr,

| ~~

gserialized_supportfn.c:420:97: warning: passing argument 2 of 'is_pseudo_constant_for_index' from incompatible pointer type [-Wincompatible-pointer-types]

420 | if (!is_pseudo_constant_for_index((Node*)expandexpr, req->index))

| ~ | | | struct IndexOptInfo *

In file included from gserialized_supportfn.c:38: /usr/pgsql-14/include/server/optimizer/optimizer.h:100:67: note: expected 'Node *' but argument is of type 'struct IndexOptInfo *'

100 | extern bool is_pseudo_constant_for_index(PlannerInfo *root, Node *expr,

| ~

gserialized_supportfn.c:420:46: error: too few arguments to function 'is_pseudo_constant_for_index'

420 | if (!is_pseudo_constant_for_index((Node*)expandexpr, req->index))

| ~

In file included from gserialized_supportfn.c:38: /usr/pgsql-14/include/server/optimizer/optimizer.h:100:13: note: declared here

100 | extern bool is_pseudo_constant_for_index(PlannerInfo *root, Node *expr,

| ~

gserialized_supportfn.c:443:75: warning: passing argument 1 of 'is_pseudo_constant_for_index' from incompatible pointer type [-Wincompatible-pointer-types]

443 | if (!is_pseudo_constant_for_index(rightarg, req->index))

| ~ | | | Node *

In file included from gserialized_supportfn.c:38: /usr/pgsql-14/include/server/optimizer/optimizer.h:100:55: note: expected 'PlannerInfo *' but argument is of type 'Node *'

100 | extern bool is_pseudo_constant_for_index(PlannerInfo *root, Node *expr,

| ~~

gserialized_supportfn.c:443:88: warning: passing argument 2 of 'is_pseudo_constant_for_index' from incompatible pointer type [-Wincompatible-pointer-types]

443 | if (!is_pseudo_constant_for_index(rightarg, req->index))

| ~ | | | struct IndexOptInfo *

In file included from gserialized_supportfn.c:38: /usr/pgsql-14/include/server/optimizer/optimizer.h:100:67: note: expected 'Node *' but argument is of type 'struct IndexOptInfo *'

100 | extern bool is_pseudo_constant_for_index(PlannerInfo *root, Node *expr,

| ~

gserialized_supportfn.c:443:46: error: too few arguments to function 'is_pseudo_constant_for_index'

443 | if (!is_pseudo_constant_for_index(rightarg, req->index))

| ~

In file included from gserialized_supportfn.c:38: /usr/pgsql-14/include/server/optimizer/optimizer.h:100:13: note: declared here

100 | extern bool is_pseudo_constant_for_index(PlannerInfo *root, Node *expr,

| ~

make[2]: * [<builtin>: gserialized_supportfn.o] Error 1 make[2]: Leaving directory '/home/devrim/Documents/Devrim/Projects/repo/pgrpms/rpm/redhat/main/non-common/postgis30/main/postgis-3.0.5/postgis' make[1]: * [GNUmakefile:20: all] Error 1 make[1]: Leaving directory '/home/devrim/Documents/Devrim/Projects/repo/pgrpms/rpm/redhat/main/non-common/postgis30/main/postgis-3.0.5' error: Bad exit status from /var/tmp/rpm-tmp.tbL3wj (%build)


Change History (4)

comment:1 by devrimgunduz, 3 years ago

Summary: 3.0.5 build error against PostgreSQL !43.0.5 build error against PostgreSQL 14

comment:2 by robe, 3 years ago

Component: postgisdocumentation
Owner: changed from pramsey to robe

@devrim. I'll put a note in 3.0 that we don't support PG 14 on it and don't intend to.

I think 3.1 we supported because we were late to releasing 3.2.

comment:3 by robe, 3 years ago

I'll also revise the configure to prevent people from trying to build with PG14.

comment:4 by Regina Obe <lr@…>, 3 years ago

Resolution: fixed
Status: newclosed

In 22cb43b/git:

Prevent building for PostgreSQL 14 and above. Closes #5087 for PostGIS 3.0.6

Note: See TracTickets for help on using tickets.