[pdal] Building pdal 1.3.0 under Windows

Howard Butler howard at hobu.co
Wed Oct 19 12:32:12 PDT 2016


> On Oct 19, 2016, at 1:48 PM, Charles Karney <charles.karney at sri.com> wrote:
> 
> I've started investigating using pdal as a substitute for liblas for
> reading point cloud data.  I have it building under Linux OK (with
> cmake).  I having problems building under Windows (this is pdal 1.3.0):
> 
> (1) A required dependency is geos.  The seems to require Visual Studio
> 2013 or later.  This comes from
> 
>  geos/tests/xmltester/XMLTester.cpp
> 
> expecting std::round to be defined in <cmath>.  Is this right?  Or can I
> skip the tests in geos and compile with Visual Studio 2012 as well.

You should be fine to skip the tests there. I didn't realize GEOS gave up on 2012, but maybe this wasn't intentional.

> 
> (2) curl appears to be an optional dependency (cmake does not insist
> that it be found).  And yet
> 
>  pdal/src/PDALUtils.cpp
> 
> includes vendor/arbiter/arbiter.hpp and this tries to do
> 
>  #include <curl/curl.h>
> 
> (3) Installing curl (for Visual Studio 2013 this time) and building with
> cmake hits an error on line 898 or pdal/util/Utils.hpp:
> 
>  error C2144: syntax error : 'std::underlying_type<_Ty>::type' should
>  be preceded by ';'
> 
> This looks like some new-fangled C++11 stuff which perhaps Visual Studio
> 2013 doesn't recognize.

PDAL definitely has requirement for the new-fangled C++11 stuff, which was the deal with the devil we made to (almost entirely) ditch Boost (we have a small embedded copy of a few things that are about to be ditched in 1.4 or 1.5 PDAL release). That probably means 2013 *might* work, but we only auto-build stuff with 2015. We are happy to take patches to get that down to 2013 as long as they aren't too disruptive, but we can't back off of the C++11 stuff because it's sprinkled throughout the codebase now. 


I'll also note that none of the very active PDAL developers are windows-first devs, and we're happy to take patches to bolster that particular topic. The effort done on the AppVeyor builds have mostly been an attempt to prevent things from diverging so far that we could never get windows happy again, but they haven't been there to keep windows a first class operator with PDAL. 

IMO, curl should be an optional dependency, and I see that our AppVeyor builds [1] are failing because of it. AppVeyor uses MSVC 19.0.24215.1 (MSVC 2015). Run [2] to ground to see what we're doing for our windows builds. I will try to clean up the curl thing so we degrade gracefully without that library.

[1] https://ci.appveyor.com/project/hobu/pdal
[2] https://github.com/PDAL/PDAL/blob/master/appveyor.yml

> 
> I'm happy to delve into this further.  But I thought I should first
> align my expectations with those of the developer:
> 
>  With what versions of Visual Studio should I expect success?
>  I've attempting to build it with
>    gdal 2.1.1
>    LASzip 2.2.0
>    eigen 3.2.8
>    geos 3.5.0
>    curl (maybe) 7.39.0
>  Should I expect this combination to work?

PDAL embeds a copy of eigen at the moment. This may or may not be a problem for you depending on what you're doing. That should be fixable though with some CMake tweaks.

Count on any windows-specific patches getting merged as long as they don't regress our C++11 situation too much. We've been waiting on a champion for this particular topic.

Howard




More information about the pdal mailing list