On FBSD 12-STABLE (FreeBSD 12.0-STABLE #257 r342843: Mon Jan 7 08:01:54 CET 2019 amd64) running PostgreSQL-11 server (most recent /usr/ports tree, psql server recompiled!), updating postgis22 fails with this compilation error: [...] gmake[4]: Entering directory '/usr/ports/databases/postgis22/work/postgis-2.2.6/libpgcommon' cc -I../liblwgeom -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -I/usr/local/include/postgresql/server -fPIC -DPIC -Wall -Wmissing-prototypes -c -o gserialized_gist.o gserialized_gist.c In file included from gserialized_gist.c:22: ./lwgeom_pg.h:135:5: error: token is not a valid binary operator in a preprocessor subexpression #if POSTGIS_PGSQL_VERSION >= 85 ^~~~~~~~~~~~~~~~~~~~~ ./../postgis_config.h:150:42: note: expanded from macro 'POSTGIS_PGSQL_VERSION' #define POSTGIS_PGSQL_VERSION PostgreSQL 11PostgreSQL 11 ~~~~~~~~~~ ^ gserialized_gist.c:98:25: error: use of undeclared identifier 'FLT_MAX' GIDX_SET_MIN(a,2,-1*FLT_MAX); ^ gserialized_gist.c:99:22: error: use of undeclared identifier 'FLT_MAX' GIDX_SET_MAX(a,2,FLT_MAX); ^ gserialized_gist.c:277:27: error: use of undeclared identifier 'FLT_MAX' GIDX_SET_MIN(gidx,2,-1*FLT_MAX); ^ gserialized_gist.c:278:24: error: use of undeclared identifier 'FLT_MAX' GIDX_SET_MAX(gidx,2,FLT_MAX); ^ 5 errors generated.
Hi, You try to build postgis22 with postgresql11. You can't see https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS Also postgis22 is EOL. With PG11 you can use postgis24 or postgis25 not yet in ports (https://reviews.freebsd.org/D17320)
I missed that! Thanks for the hint.
A commit references this bug: Author: crees Date: Tue Jan 15 21:50:55 UTC 2019 New revision: 490431 URL: https://svnweb.freebsd.org/changeset/ports/490431 Log: Add facility to give a range of allowable versions for postgresql PR: ports/213038 PR: ports/234813 Submitted by: lbartoletti@tuxfamily.org Differential Revision: https://reviews.freebsd.org/D18818 Changes: head/Mk/Uses/pgsql.mk