#5091 closed defect (fixed)
configure --without-protobuf broken
Reported by: | tbussmann | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.2.2 |
Component: | build | Version: | 3.2.x |
Keywords: | Cc: |
Description
When I examined #5090 I found that the --without-protobuf
configure option seem to be broken in PostGIS 3.2.0. The build fails with
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -bundle -multiply_defined suppress -o postgis-3.so postgis_module.o lwgeom_accum.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_inout.o lwgeom_functions_basic.o lwgeom_btree.o lwgeom_box.o lwgeom_box3d.o lwgeom_geos.o lwgeom_geos_prepared.o lwgeom_geos_clean.o lwgeom_geos_relatematch.o lwgeom_generate_grid.o lwgeom_export.o lwgeom_in_gml.o lwgeom_in_kml.o lwgeom_in_geohash.o lwgeom_in_geojson.o lwgeom_in_encoded_polyline.o lwgeom_triggers.o lwgeom_dump.o lwgeom_dumppoints.o lwgeom_functions_lrs.o lwgeom_functions_temporal.o lwgeom_rectree.o long_xact.o lwgeom_sqlmm.o lwgeom_rtree.o lwgeom_transform.o lwgeom_window.o gserialized_typmod.o gserialized_gist_2d.o gserialized_gist_nd.o gserialized_supportfn.o gserialized_spgist_2d.o gserialized_spgist_3d.o gserialized_spgist_nd.o brin_2d.o brin_nd.o brin_common.o gserialized_estimate.o geography_inout.o geography_btree.o geography_centroid.o geography_measurement.o geography_measurement_trees.o geometry_inout.o postgis_libprotobuf.o mvt.o lwgeom_out_mvt.o geobuf.o lwgeom_out_geobuf.o lwgeom_out_geojson.o flatgeobuf.o lwgeom_in_flatgeobuf.o lwgeom_out_flatgeobuf.o postgis_legacy.o -lm ../deps/flatgeobuf/libflatgeobuf.la ../libpgcommon/libpgcommon.a ../liblwgeom/.libs/liblwgeom.a -L/Applications/Postgres.app/Contents/Versions/14/lib -lgeos_c -L/Applications/Postgres.app/Contents/Versions/14/lib -lproj -L/Applications/Postgres.app/Contents/Versions/14/lib -ljson-c -L/Applications/Postgres.app/Contents/Versions/14/lib -lxml2 -lz -lpthread -liconv -lm -lm -bundle_loader /Applications/Postgres.app/Contents/Versions/14/bin/postgres Undefined symbols for architecture arm64: "std::__1::__shared_weak_count::__get_deleter(std::type_info const&) const", referenced from: vtable for std::__1::__shared_ptr_emplace<FeatureItem, std::__1::allocator<FeatureItem> > in libflatgeobuf.la(flatgeobuf_c.o) "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from: _flatgeobuf_encode_header in libflatgeobuf.la(flatgeobuf_c.o) _flatgeobuf_create_index in libflatgeobuf.la(flatgeobuf_c.o) FlatGeobuf::PackedRTree::generateLevelBounds(unsigned long long, unsigned short) in libflatgeobuf.la(packedrtree.o) FlatGeobuf::PackedRTree::search(double, double, double, double) const in libflatgeobuf.la(packedrtree.o) FlatGeobuf::PackedRTree::streamSearch(unsigned long long, unsigned short, FlatGeobuf::NodeItem const&, std::__1::function<void (unsigned char*, unsigned long, unsigned long)> const&) in libflatgeobuf.la(packedrtree.o) std::__1::vector<FlatGeobuf::NodeItem, std::__1::allocator<FlatGeobuf::NodeItem> >::__vallocate(unsigned long) in libflatgeobuf.la(packedrtree.o) FlatGeobuf::GeometryWriter::writePA(POINTARRAY*) in libflatgeobuf.la(geometrywriter.o) ...
as this is not the case in PostGIS 3.1.5 I assume the new FlatGeobuf format support is depending on protobuf and would need to be disabled if HAVE_PROTOBUF=no
but I haven't investigated further.
Change History (11)
comment:1 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 3 years ago
Milestone: | PostGIS 3.2.1 → PostGIS 3.2.2 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
the referenced commit does not deal with this issue, it seems to be closed in error. Verified to be still an issue against 3.2.1
comment:3 by , 3 years ago
Is the master branch not affected ? Because I can build fine after configuring —without-protobuf
comment:4 by , 3 years ago
I've actually found that make clean
is broken, with —without-protobuf, maybe the build succeeds ONLY because I actually DO have protobuf. Will attempt a fix and report here, before backporting.
comment:6 by , 3 years ago
tbussmann can you please try now, against master branch and let us know if it fixes the problem for you ?
comment:7 by , 3 years ago
I rechecked with master but no - that changes did not fix it for me.
I got it to build when completely disabling the flatgeobuf support if protobuf-c is not available. But reading on the backgrounds of it, there should be no dependency as flatgeobuf is based on flatbuffers and not like geobuf on protbuf. So this was a red herring.
Experimenting further, I found that the build succeeds if I remove the suppression of wagyu despite we don't need it w/o protobuf. As both require a C++ compiler I then carefully checked the generated LDFLAGS and found the culprit: a single 'W' character git/configure.ac@3ae2c58#L1591 slipped in from copy&pasting the configure code in the original flatgeobuf changeset [3ae2c584/git]
In ecad675/git: