[postgis-tickets] [PostGIS] #4408: can't compile --with-wagyu under mingw64
PostGIS
trac at osgeo.org
Sat Jun 1 10:08:40 PDT 2019
#4408: can't compile --with-wagyu under mingw64
----------------------+---------------------------
Reporter: robe | Owner: Algunenano
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 3.0.0
Component: postgis | Version: trunk
Resolution: | Keywords:
----------------------+---------------------------
Comment (by Algunenano):
I think that the issue comes from the linker being gcc and not g++.
In my Linux machine this wasn't an issue (modern GCC/Clang), for OSX I
added a small detection utility so now it adds `-lstdc++` or `-lc++`, but
it looks like this isn't enough it the mingw setup.
Can you try running the last command changing gcc for g++:
{{{
g++ -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-
statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-
security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-
format-truncation -Wno-stringop-truncation -g -O2 -shared -static-libgcc
-o postgis-3.dll 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_sfcgal.o lwgeom_geos_prepared.o lwgeom_geos_clean.o
lwgeom_geos_relatematch.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
vector_tile.pb-c.o geobuf.pb-c.o mvt.o lwgeom_out_mvt.o geobuf.o
lwgeom_out_geobuf.o lwgeom_out_geojson.o postgis_legacy.o
-LC:/MING64~1/projects/POSTGR~1/rel/PG12W6~2/lib -L/projects/zlib/rel-
zlib-1.2.11w64gcc81/lib -L/projects/libxml/rel-libxml2-2.7.8w64gcc81/lib
-Wl,--allow-multiple-definition -Wl,--disable-auto-import
-L/projects/libxml/rel-libxml2-2.7.8w64gcc81/lib -Wl,--as-needed
../deps/wagyu/libwagyu.la -lstdc++ ../libpgcommon/libpgcommon.a
../liblwgeom/.libs/liblwgeom.a
-LC:/ming64gcc81/projects/geos/rel-3.8w64gcc81/lib -lgeos_c
-L/projects/proj/rel-6.0.0w64gcc81/lib -lproj
-L/projects/protobuf/rel-3.2.0w64gcc81/lib -lprotobuf-c -L/projects/libxml
/rel-libxml2-2.7.8w64gcc81/lib -lxml2 -lws2_32 -L/projects/CGAL/rel-
sfcgal-1.3.2w64gcc81/lib -lSFCGAL -Wl,--exclude-libs,ALL -L/projects/CGAL
/rel-sfcgal-1.3.2w64gcc81/lib -lSFCGAL
-LC:/MING64~1/projects/POSTGR~1/rel/PG12W6~2/lib -lpostgres -lpgcommon
-lpgport -lxml2 -lz -lws2_32 -lm -lws2_32 -Wl,--export-all-symbols -Wl
,--out-implib=libpostgis-3.a
}}}
If that works I can confirm that the aim is correct and I'll investigate
further to see what extra flags we'd need to add to link the C++ code
correctly.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4408#comment:8>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list