Bug 234813 - databases/postgis22: error: token is not a valid binary operator in a preprocessor subexpression
Summary: databases/postgis22: error: token is not a valid binary operator in a preproc...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-10 08:58 UTC by O. Hartmann
Modified: 2019-01-15 21:51 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (rhurlin)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2019-01-10 08:58:42 UTC
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.
Comment 1 Loïc Bartoletti freebsd_committer freebsd_triage 2019-01-10 09:29:16 UTC
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)
Comment 2 O. Hartmann 2019-01-10 18:01:10 UTC
I missed that! Thanks for the hint.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-01-15 21:51:34 UTC
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