PostGIS 3.2 and GCC 14 & 15
Loïc Bartoletti
loic.bartoletti at oslandia.com
Mon Jun 2 05:40:07 PDT 2025
Hi Devrim,
I can not test my suggestion, but I can observe a difference between 3.3
and 3.2 which can be explain your problem.
FlatBuffer has been updated in 3.3, and `count_` is not a const anymore. [1]
Can you try to remove the const keyword at line 628. [2]
Loïc
[1] https://github.com/postgis/postgis/commit/ca08baecaaeec991fa1186fee2254e85402d7d48#diff-6b0cb54ed1f07e5f289d09649feabdee710b023d1e68b08014fbd2c1a3d2d43eL628-R469
[2] https://github.com/postgis/postgis/blob/stable-3.2/deps/flatgeobuf/include/flatbuffers/stl_emulation.h#L628
On 02/06/2025 11:07, Devrim Gündüz wrote:
>
>Hi,
>
>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:
>
>========================================================
>/usr/bin/make -C ../deps/flatgeobuf all
>make[3]: Entering directory '/Projects/repo/pgrpms/rpm/redhat/main/non-common/postgis32/main/postgis32_15-3.2.8-build/postgis-3.2.8/deps/flatgeobuf'
>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_;
> | ~~~~~~~^~~~~~~~~~~~~~
>flatgeobuf_c.cpp: In function ‘void flatgeobuf_create_index(ctx*)’:
>flatgeobuf_c.cpp:198:10: warning: unused variable ‘oldoffset’ [-Wunused-variable]
> 198 | auto oldoffset = ctx->offset;
> | ^~~~~~~~~
>make[3]: *** [Makefile:54: flatgeobuf_c.o] Error 1
>========================================================
>
>Can you please take a look?
>
>Thanks!
>
>Regards,
>--
>Devrim Gündüz
>Open Source Solution Architect, PostgreSQL Major Contributor
>BlueSky: @devrim.gunduz.org , @gunduz.org
More information about the postgis-devel
mailing list