> > BTW, how do you confirm what feature set we’re using? Is there a magic > test? >
Not that I'm aware of. I said we're not using anything from > 3.8 because that's what our CMakeLists claims, but I guess it could be wrong. Dan > P > > On Oct 23, 2019, at 6:13 PM, Daniel Baston <dbas...@gmail.com> wrote: > > Hello Asa, > > Thank you for the reports. I ticketed the assertion failure issue at: > https://trac.osgeo.org/geos/ticket/1002 > > I'm not sure why the CMake version check for MSVC needs to be a fatal > error, since we're not using any features from CMake > 3.8. Does anyone > object to changing this? > > Dan > > > On Mon, Oct 21, 2019 at 3:14 PM Asa Packer <apac...@biosonicsinc.com> > wrote: > >> Hi, >> >> >> >> I just started working with version 3.8.0, trying to build it on >> Windows. I ran into two issues: >> >> >> >> 1. Out of the box I can’t build geos 3.8.0 with a fully-updated >> Visual Studio 2017, because geos wants cmake 3.13 and VS2017 only has >> 3.12. If I change line 22 of the top-level CMakeLists.txt to require only >> 3.12, then I can build fine in Release mode, either 32 or 64 bit, and >> ctest >> shows no failures. >> 2. If I build in Debug mode, with either VS2017 or VS2019, I get tons >> of assertion failures when I do ctest. They all come from line 115 of >> MonotoneChainBuilder.cpp, which on the last time through the loop causes >> an >> access of an element one past the end of a std::vector. Even if I ignore >> the assertion failures, the tests show as fails because the C runtime >> considers these to be fatal errors. >> >> >> >> Below is a patch that fixes these issues. Are these reasonable >> workarounds? >> >> >> >> Thanks! >> >> >> >> Asa >> >> >> >> Index: geos-3.8.0/CMakeLists.txt >> >> =================================================================== >> >> --- geos-3.8.0/CMakeLists.txt >> >> +++ geos-3.8.0/CMakeLists.tt >> >> @@ -19,7 +19,7 @@ >> >> # Require CMake 3.13+ with VS generator for complete support of VS >> versions >> >> # and support by AppVeyor. >> >> if(${CMAKE_GENERATOR} MATCHES "Visual Studio") >> >> - cmake_minimum_required(VERSION 3.13 FATAL_ERROR) >> >> + cmake_minimum_required(VERSION 3.12 FATAL_ERROR) >> >> endif() >> >> list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") >> >> Index: geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp >> >> =================================================================== >> >> --- geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp >> >> +++ geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp >> >> @@ -111,8 +111,10 @@ >> >> } >> >> } >> >> ++last; >> >> - prev = curr; >> >> - curr = &pts[last]; >> >> + if (last < npts) { >> >> + prev = curr; >> >> + curr = &pts[last]; >> >> + } >> >> } >> >> #if GEOS_DEBUG >> >> std::cerr << "MonotoneChainBuilder::findChainEnd() returning" << >> std::endl; >> >> >> >> >> >> *Asa Packer* | Lead Systems Engineer >> >> >> >> *BioSonics, Inc.* >> >> 2356 W Commodore Way, Unit 110 >> >> Seattle WA 98199-1258 USA >> >> *tel* 206.782.2211 | *biosonicsinc.com* <http://www.biosonicsinc.com/> >> >> >> _______________________________________________ >> geos-devel mailing list >> geos-devel@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/geos-devel > > _______________________________________________ > geos-devel mailing list > geos-devel@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/geos-devel > > > _______________________________________________ > geos-devel mailing list > geos-devel@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/geos-devel
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel