[geos-devel] 3.8.0 problems building on Windows
Paul Ramsey
pramsey at cleverelephant.ca
Thu Oct 24 06:43:46 PDT 2019
No objection. I’m not sure how it got bumped so high to start w/.
BTW, how do you confirm what feature set we’re using? Is there a magic test?
P
> On Oct 23, 2019, at 6:13 PM, Daniel Baston <dbaston at gmail.com> wrote:
>
> Hello Asa,
>
> Thank you for the reports. I ticketed the assertion failure issue at: https://trac.osgeo.org/geos/ticket/1002 <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 <APacker at biosonicsinc.com <mailto:APacker at biosonicsinc.com>> wrote:
> Hi,
>
>
>
> I just started working with version 3.8.0, trying to build it on Windows. I ran into two issues:
>
>
>
> 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.
> 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 at lists.osgeo.org <mailto:geos-devel at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/geos-devel <https://lists.osgeo.org/mailman/listinfo/geos-devel>_______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geos-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20191024/fb63b712/attachment-0001.html>
More information about the geos-devel
mailing list