Skip to content

Commit

Permalink
databases/postgis33: Fix build on FreeBSD 12 by using c++14 explicitly
Browse files Browse the repository at this point in the history
The error message is as follows:
cc -std=c++11 -x c++ -I../../liblwgeom -I../../liblwgeom -I./include  -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include/json-c -I/usr/local/include -DNDEBUG -I/usr/local/include -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include   -fPIC -DPIC -c -o flatgeobuf_c.o flatgeobuf_c.cpp
In file included from flatgeobuf_c.cpp:26:
In file included from ./feature_generated.h:7:
In file included from ./include/flatbuffers/flatbuffers.h:22:
In file included from ./include/flatbuffers/array.h:20:
In file included from ./include/flatbuffers/base.h:237:
In file included from /usr/local/include/absl/strings/string_view.h:39:
In file included from /usr/local/include/absl/base/attributes.h:37:
In file included from /usr/local/include/absl/base/config.h:86:
/usr/local/include/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported."
#error "C++ versions less than C++14 are not supported."
 ^
1 error generated.
gmake[4]: *** [Makefile:56: flatgeobuf_c.o] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/databases/postgis33/work/postgis-3.3.4/deps/flatgeobuf'
gmake[3]: *** [Makefile:219: ../deps/flatgeobuf/libflatgeobuf.la] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/databases/postgis33/work/postgis-3.3.4/postgis'
gmake[2]: *** [GNUmakefile:24: all] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/databases/postgis33/work/postgis-3.3.4'
gmake[1]: *** [Makefile:7: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/databases/postgis33/work/postgis-3.3.4'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer.
*** Error code 1

Approved by:	portmgr (blanket)
  • Loading branch information
sunpoet committed Nov 1, 2023
1 parent a6509f4 commit 80c578f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion databases/postgis33/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ LIB_DEPENDS= libproj.so:graphics/proj \
libgdal.so:graphics/gdal \
libpcre2-8.so:devel/pcre2

USES= alias compiler:c++11-lang cpe gmake gnome iconv:wchar_t libtool:keepla \
USES= alias compiler:c++14-lang cpe gmake gnome iconv:wchar_t libtool:keepla \
localbase perl5 pkgconfig pgsql:11+ shebangfix
USE_GNOME= libxml2
USE_PERL5= build

GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${ICONV_CONFIGURE_BASE} NUMERICFLAGS=${PORTVERSION}
USE_CXXSTD= c++14
SHEBANG_FILES= extensions/address_standardizer/*.pl regress/run_test.pl \
utils/postgis_restore.pl.in utils/*.pl
WANT_PGSQL= server
Expand Down

0 comments on commit 80c578f

Please sign in to comment.