[gdal-dev] [gdal-commits] r38502 - trunk/gdal/gcore

Kurt Schwehr schwehr at gmail.com
Fri May 19 14:05:51 PDT 2017


Arg... what are those config options doing down in ogr/GNUMakefile?!?!?!?

The ifeq checks seem reasonable, everything else, not so much.

find . -name GNUmakefile | xargs grep HAVE_XERCES
./ogrsf_frmts/gmlas/GNUmakefile:CPPFLAGS := -I../mem -I../geojson
$(JSON_INCLUDE) -I.. -I../.. -I../pgdump -DHAVE_XERCES=1 \
./ogrsf_frmts/ili/GNUmakefile:CPPFLAGS := -I.. -I../.. -DHAVE_XERCES
$(XERCES_INCLUDE) $(CPPFLAGS)
./ogrsf_frmts/nas/GNUmakefile:CPPFLAGS := -I../gml -I.. -I../..
-DHAVE_XERCES=1 \
./ogrsf_frmts/GNUmakefile:SUBDIRS-$(HAVE_XERCES) += ili
./ogrsf_frmts/GNUmakefile:SUBDIRS-$(HAVE_XERCES) += gmlas
./ogrsf_frmts/generic/GNUmakefile:ifeq ($(HAVE_XERCES),yes)
./ogrsf_frmts/generic/GNUmakefile:ifeq ($(HAVE_XERCES),yes)
./ogrsf_frmts/gml/GNUmakefile:ifeq ($(HAVE_XERCES),yes)
./ogrsf_frmts/gml/GNUmakefile:CPPFLAGS +=  -DHAVE_XERCES
./GNUmakefile:ifeq ($(HAVE_XERCES),yes)
./GNUmakefile:CPPFLAGS := -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS)

This is so not cool:

gmlas/GNUmakefile

# Booby trap....
CPPFLAGS := -I../mem -I../geojson $(JSON_INCLUDE) -I.. -I../.. -I../pgdump
-DHAVE_XERCES=1 \
$(XERCES_INCLUDE) $(CPPFLAGS)



On Fri, May 19, 2017 at 1:55 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> On vendredi 19 mai 2017 13:07:08 CEST svn_gdal at osgeo.org wrote:
>
> > Author: goatbar
>
> > Date: 2017-05-19 13:07:08 -0700 (Fri, 19 May 2017)
>
> > New Revision: 38502
>
> >
>
> > Modified:
>
> > trunk/gdal/gcore/gdaldrivermanager.cpp
>
> > Log:
>
> > gdaldrivermanager.cpp: Only call OGRCleanupXercesMutex() if HAVE_XERCES
> is
>
> > set.
>
> >
>
>
>
> HAVE_XERCES is never defined by port/GNUmakefile nor port/makefile.vc
>
>
>
>
>
> $ valgrind --leak-check=full --show-reachable=yes ogrinfo poly.gml
> --config GML_PARSER XERCES --debug on -al -q
>
>
>
>
>
> ==7085== 64 bytes in 1 blocks are still reachable in loss record 4 of 13
>
> ==7085== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
>
> ==7085== by 0x5C588E3: CPLCreateMutexInternal(bool, int)
> (cpl_multiproc.cpp:1476)
>
> ==7085== by 0x5C5864A: CPLCreateOrAcquireMutexEx (cpl_multiproc.cpp:1344)
>
> ==7085== by 0x5C583C1: CPLMutexHolder::CPLMutexHolder(_CPLMutex**,
> double, char const*, int, int) (cpl_multiproc.cpp:167)
>
> ==7085== by 0x64F51C2: OGRInitializeXerces() (ogr_xerces.cpp:56)
>
> ==7085== by 0x5E677A1: GMLReader::SetupParserXerces() (gmlreader.cpp:292)
>
> ==7085== by 0x5E676AC: GMLReader::SetupParser() (gmlreader.cpp:262)
>
> ==7085== by 0x5E681BC: GMLReader::NextFeatureXerces() (gmlreader.cpp:516)
>
> ==7085== by 0x5E68748: GMLReader::NextFeature() (gmlreader.cpp:629)
>
> ==7085== by 0x60FFC13: OGRGMLLayer::GetNextFeature() (ogrgmllayer.cpp:157)
>
> ==7085== by 0x4072E4: ReportOnLayer(OGRLayer*, char const*, char const*,
> OGRGeometry*, int, int, char**, int, int) (ogrinfo.cpp:793)
>
> ==7085== by 0x40660A: main (ogrinfo.cpp:530)
>
> ==7085==
>
>
>
>
>
> >
>
> >
>
> > Modified: trunk/gdal/gcore/gdaldrivermanager.cpp
>
> > ===================================================================
>
> > --- trunk/gdal/gcore/gdaldrivermanager.cpp 2017-05-19 19:22:19 UTC (rev
>
> > 38501) +++ trunk/gdal/gcore/gdaldrivermanager.cpp 2017-05-19 20:07:08
> UTC
>
> > (rev 38502) @@ -248,7 +248,9 @@
>
> > /* --------------------------------------------------------------------
> */
>
> > OSRCleanup();
>
> >
>
> > +#ifdef HAVE_XERCES
>
> > OGRCleanupXercesMutex();
>
> > +#endif
>
> >
>
> > /* --------------------------------------------------------------------
> */
>
> > /* Cleanup VSIFileManager. */
>
> >
>
> > _______________________________________________
>
> > gdal-commits mailing list
>
> > gdal-commits at lists.osgeo.org
>
> > https://lists.osgeo.org/mailman/listinfo/gdal-commits
>
>
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>



-- 
--
http://schwehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170519/5449b202/attachment.html>


More information about the gdal-dev mailing list