Opened 3 years ago

Closed 3 years ago

#4963 closed defect (fixed)

PostGIS 2.5 compile fails DIST2DTEST

Reported by: robe Owned by: pramsey
Priority: blocker Milestone: PostGIS 2.4.10
Component: postgis Version: 2.5.x -- EOL
Keywords: Cc:

Description

I'm getting this error when trying to compile PostGIS 2.5 against PostgreSQL 12, GEOS 3.8.3

Guess it's been a while. On winnie I'm still strugglging with autoconf issues.

cu_measures.c:209:71: error: macro "DIST2DTEST" passed 4 arguments, but takes ju                                                                         st 3
   "POINT(5433865 8243495)", 2271704.2698450615, default_accepted_error);
                                                                       ^
cu_measures.c:207:2: error: 'DIST2DTEST' undeclared (first use in this function)                                                                         ; did you mean 'DISTPTS'?
  DIST2DTEST(
  ^~~~~~~~~~
  DISTPTS
cu_measures.c:207:2: note: each undeclared identifier is reported only once for                                                                          each function it appears in

Change History (7)

comment:1 by robe, 3 years ago

okay it's not just winnie. Dronie 9.6 is having the same issue:

https://dronie.osgeo.org/postgis/postgis/2041/1/2

/local/include  -I.. -c -o cu_geodetic.o cu_geodetic.c
gcc -O0 -Wall -fno-omit-frame-pointer -Werror  -Wall -Wmissing-prototypes -I/usr/local/include  -I.. -c -o cu_geos.o cu_geos.c
gcc -O0 -Wall -fno-omit-frame-pointer -Werror  -Wall -Wmissing-prototypes -I/usr/local/include  -I.. -c -o cu_geos_cluster.o cu_geos_cluster.c
gcc -O0 -Wall -fno-omit-frame-pointer -Werror  -Wall -Wmissing-prototypes -I/usr/local/include  -I.. -c -o cu_tree.o cu_tree.c
gcc -O0 -Wall -fno-omit-frame-pointer -Werror  -Wall -Wmissing-prototypes -I/usr/local/include  -I.. -c -o cu_measures.o cu_measures.c
cu_measures.c: In function 'test_mindistance2d_tolerance':
cu_measures.c:209:71: error: macro "DIST2DTEST" passed 4 arguments, but takes just 3
   "POINT(5433865 8243495)", 2271704.2698450615, default_accepted_error);
                                                                       ^
cu_measures.c:207:2: error: 'DIST2DTEST' undeclared (first use in this function)
  DIST2DTEST(
  ^
cu_measures.c:207:2: note: each undeclared identifier is reported only once for each function it appears in
Makefile:98: recipe for target 'cu_measures.o' failed
make[2]: Leaving directory '/drone/src/liblwgeom/cunit'
make[2]: *** [cu_measures.o] Error 1
Makefile:204: recipe for target 'check' failed
make[1]: Leaving directory '/drone/src/liblwgeom'
make[1]: *** [check] Error 2
make: *** [check] Error 1
Version 0, edited 3 years ago by robe (next)

comment:2 by robe, 3 years ago

Summary: PostGIS 2.5 compile fail on windows (mingw64)PostGIS 2.5 compile fail on windows (mingw64) and dronie

comment:3 by robe, 3 years ago

Summary: PostGIS 2.5 compile fail on windows (mingw64) and droniePostGIS 2.5 compile fails DIST2DTEST - GEOS < 3.9?

Okay I have a suspicion this fails on all bots running geos < 3.9

Debbie is having the same issue too:

https://debbie.postgis.net/job/PostGIS_Regress/17356/consoleFull

00:57:23  -------------- Dependencies -------------- 
00:57:23   GEOS config:          /var/lib/jenkins/workspace/geos/rel-3.7w64/bin/geos-config
00:57:23   GEOS version:         3.7.4dev
00:57:23   GDAL config:          /var/lib/jenkins/workspace/gdal/rel-2.4w64/bin/gdal-config
00:57:23   GDAL version:         2.4.4
00:57:23   SFCGAL config:        /usr/bin/sfcgal-config
00:57:23   SFCGAL version:       1.3.8
00:57:23   PostgreSQL config:    /var/lib/jenkins/workspace/pg/rel/pg9.5w64/bin/pg_config
00:57:23   PostgreSQL version:   PostgreSQL 9.5.25
00:57:23   PROJ4 version:        72
00:57:23   Libxml2 config:       /usr/bin/xml2-config
00:57:23   Libxml2 version:      2.9.12
00:57:23   JSON-C support:       yes
00:57:23   protobuf-c support:   yes
00:57:23   protobuf-c version:   1003003
00:57:23   PCRE support:         no
00:57:23   Perl:                 /usr/bin/perl
00:57:23 
00:57:23  --------------- Extensions --------------- 

01:00:07 cu_measures.c: In function ‘test_mindistance2d_tolerance’:
01:00:07 cu_measures.c:209:71: error: macro "DIST2DTEST" passed 4 arguments, but takes just 3
01:00:07   209 |   "POINT(5433865 8243495)", 2271704.2698450615, default_accepted_error);
01:00:07       |                                                                       ^
01:00:07 cu_measures.c:33: note: macro "DIST2DTEST" defined here
01:00:07    33 | #define DIST2DTEST(str1, str2, res) \
01:00:07       | 
01:00:07 cu_measures.c:207:2: error: ‘DIST2DTEST’ undeclared (first use in this function); did you mean ‘DISTPTS’?
01:00:07   207 |  DIST2DTEST(
01:00:07       |  ^~~~~~~~~~
01:00:07       |  DISTPTS
01:00:07 cu_measures.c:207:2: note: each undeclared identifier is reported only once for each function it appears in
01:00:07 make[2]: *** [Makefile:98: cu_measures.o] Error 1
01:00:07 make[2]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/2.5/liblwgeom/cunit'
01:00:07 make[1]: *** [Makefile:204: check] Error 2
01:00:07 make[1]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/2.5/liblwgeom'
01:00:07 make: *** [GNUmakefile:16: check] Error 1
01:00:07 Build step 'Execute shell' marked build as failure
01:00:07 Triggering a new build of PostgreSQL stop
01:00:07 Finished: FAILURE

comment:4 by robe, 3 years ago

this test was introduced in #4326

comment:5 by robe, 3 years ago

Milestone: PostGIS 2.5.6PostGIS 2.4.10
Summary: PostGIS 2.5 compile fails DIST2DTEST - GEOS < 3.9?PostGIS 2.5 compile fails DIST2DTEST

okay I was mistaken. This looks like it broke all 2.5s and is caused by a change in api between 2.5/3.0. The cu_unit patch was only valid for 3.0+ I think.

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

In 166721c/git:

Take out default arg in dist2dtest references #4963 , references #4326 for PostGIS 2.5

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

Resolution: fixed
Status: newclosed

In 4f4b2005/git:

Backport autogen.sh changes from 3.1 to address autoconf 2.71, closes #4968 for PostGIS 2.4.10. Fix cu_measures test Closes #4963 Closes 4326 for PostGIS 2.4.10

Note: See TracTickets for help on using tickets.