PostGIS 3.2 and GCC 14 & 15

Greg Troxel gdt at lexort.com
Mon Jun 2 02:54:59 PDT 2025


Devrim Gündüz <devrim at gunduz.org> writes:

> PostGIS 3.2 fails to build against GCC 14 and 15. The problem is that
> RHEL 10 is out and we're losing both 3.2 and 3.1 (I'll send another
> email about the problem in 3.1). This may be an upgrade problem for many
> users:

I find it really strange that a Long Term Stable GNU/Linux distribution
would choose a bleeding-edge compiler without up-to-date versions of
everything else.  If that's the case, it sounds like a bug that should
be reported to RH, separately from understanding if the code is wrong.

> gcc -std=c++11 -x c++ -I../../liblwgeom -Iinclude -I../../liblwgeom -I/include  -I/usr/geos313/include -I/usr/proj96/include  -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c  -DNDEBUG  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -fPIC -DPIC -Dflatbuffers=postgis_flatbuffers -c -o flatgeobuf_c.o flatgeobuf_c.cpp
> In file included from include/flatbuffers/flatbuffers.h:21,
>                  from feature_generated.h:7,
>                  from flatgeobuf_c.cpp:26:
> include/flatbuffers/stl_emulation.h: In member function ‘postgis_flatbuffers::span<T, Extent>& postgis_flatbuffers::span<T, Extent>::operator=(const postgis_flatbuffers::span<T, Extent>&)’:
> include/flatbuffers/stl_emulation.h:549:12: error: assignment of read-only member ‘postgis_flatbuffers::span<T, Extent>::count_’ [-Wtemplate-body]
>   549 |     count_ = other.count_;
>       |     ~~~~~~~^~~~~~~~~~~~~~

Is this actually a bug in the code, failing to conform to c++11?  In
that case, it would be good to fix it, assuming someone can explain
what's wrong.


More information about the postgis-devel mailing list