[GRASS-dev] [GRASS GIS] #3243: v.in.pdal build error: some PDAL 1.4.0 includes are not where the module expects them
GRASS GIS
trac at osgeo.org
Sun Jan 8 11:48:16 PST 2017
#3243: v.in.pdal build error: some PDAL 1.4.0 includes are not where the module
expects them
-----------------------+-------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.1
Component: Vector | Version: 7.2.0
Resolution: | Keywords:
CPU: All | Platform: All
-----------------------+-------------------------
Comment (by neteler):
I have attached a patch which solves the changes include paths.
However, I get several compilation errors with PDAL 1.4.0. Due to API
changes?
{{{
[neteler at oboe v.in.pdal]$ make
...
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but
not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but
not for C
c++ -g -Wall -I/home/neteler/software/grass72/dist.x86_64-pc-linux-
gnu/include -I/home/neteler/software/grass72/dist.x86_64-pc-linux-
gnu/include -I/usr/include/gdal -I/usr/include -O2 -g -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-
protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wextra
-Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-
align -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas
-Wno-deprecated-declarations -isystem /usr/local/include -std=c++11
-std=c++11 -DPACKAGE=\""grassmods"\" -I/usr/include/gdal -I/usr/include
-I/usr/include/gdal -I/usr/include/libxml2 -I/usr/include -I/usr/include
-I/home/neteler/software/grass72/dist.x86_64-pc-linux-gnu/include
-I/home/neteler/software/grass72/dist.x86_64-pc-linux-gnu/include
-DRELDIR=\"vector/v.in.pdal\" -o OBJ.x86_64-pc-linux-gnu/main.o -c
main.cpp
main.cpp:62:47: error: ‘pdal::Dimension::Id::Enum’ has not been declared
pdal::Dimension::Id::Enum dim_to_use_as_z)
^~~~
main.cpp: In function ‘void pdal_point_to_grass(Map_info*, line_pnts*,
line_cats*, pdal::PointViewPtr, pdal::PointId, GLidarLayers*, int, int)’:
main.cpp:67:38: error: ‘Id’ is not a namespace-name
using namespace pdal::Dimension::Id;
^~
main.cpp:67:40: error: expected namespace-name before ‘;’ token
using namespace pdal::Dimension::Id;
^
main.cpp:68:47: error: ‘X’ was not declared in this scope
double x = point_view->getFieldAs<double>(X, idx);
^
main.cpp:69:47: error: ‘Y’ was not declared in this scope
double y = point_view->getFieldAs<double>(Y, idx);
^
main.cpp:70:67: error: no matching function for call to
‘pdal::PointView::getFieldAs(int&, pdal::PointId&)’
double z = point_view->getFieldAs<double>(dim_to_use_as_z, idx);
^
In file included from main.cpp:2:0:
/usr/include/pdal/PointView.hpp:116:7: note: candidate: template<class T>
T pdal::PointView::getFieldAs(pdal::Dimension::Id, pdal::PointId) const
T getFieldAs(Dimension::Id dim, PointId pointIndex) const;
^~~~~~~~~~
/usr/include/pdal/PointView.hpp:116:7: note: template argument
deduction/substitution failed:
main.cpp:70:67: note: cannot convert ‘dim_to_use_as_z’ (type ‘int’) to
type ‘pdal::Dimension::Id’
double z = point_view->getFieldAs<double>(dim_to_use_as_z, idx);
^
main.cpp:78:52: error: ‘ReturnNumber’ was not declared in this scope
int return_n = point_view->getFieldAs<int>(ReturnNumber, idx);
^~~~~~~~~~~~
main.cpp:79:53: error: ‘NumberOfReturns’ was not declared in this scope
int n_returns = point_view->getFieldAs<int>(NumberOfReturns,
idx);
^~~~~~~~~~~~~~~
main.cpp:85:50: error: ‘Classification’ was not declared in this scope
point_view->getFieldAs<int>(Classification, idx));
^~~~~~~~~~~~~~
main.cpp:88:47: error: ‘Red’ was not declared in this scope
int red = point_view->getFieldAs<int>(Red, idx);
^~~
main.cpp:89:49: error: ‘Green’ was not declared in this scope
int green = point_view->getFieldAs<int>(Green, idx);
^~~~~
main.cpp:90:48: error: ‘Blue’ was not declared in this scope
int blue = point_view->getFieldAs<int>(Blue, idx);
^~~~
main.cpp: In function ‘int main(int, char**)’:
main.cpp:224:37: warning: ISO C++ forbids converting a string constant to
‘char*’ [-Wwrite-strings]
max_ground_window_opt->answer = "33";
^~~~
main.cpp:233:32: warning: ISO C++ forbids converting a string constant to
‘char*’ [-Wwrite-strings]
ground_slope_opt->answer = "1.0";
^~~~~
main.cpp:241:39: warning: ISO C++ forbids converting a string constant to
‘char*’ [-Wwrite-strings]
max_ground_distance_opt->answer = "2.5";
^~~~~
main.cpp:250:40: warning: ISO C++ forbids converting a string constant to
‘char*’ [-Wwrite-strings]
init_ground_distance_opt->answer = "0.15";
^~~~~~
main.cpp:259:36: warning: ISO C++ forbids converting a string constant to
‘char*’ [-Wwrite-strings]
ground_cell_size_opt->answer = "1";
^~~
main.cpp:326:5: error: ‘Enum’ is not a member of ‘pdal::Dimension::Id’
pdal::Dimension::Id::Enum dim_to_use_as_z = pdal::Dimension::Id::Z;
^~~~
main.cpp:479:20: error: ‘eHorizontalOnly’ is not a member of
‘pdal::SpatialReference’
getWKT(pdal::SpatialReference::eHorizontalOnly);
^~~~
main.cpp:541:9: error: ‘dim_to_use_as_z’ was not declared in this scope
dim_to_use_as_z = point_view->layout()->findDim("Height");
^~~~~~~~~~~~~~~
main.cpp:549:29: error: ‘dim_to_use_as_z’ was not declared in this scope
if (!point_view->hasDim(dim_to_use_as_z))
^~~~~~~~~~~~~~~
main.cpp:570:51: error: ‘dim_to_use_as_z’ was not declared in this scope
double z = point_view->getFieldAs<double>(dim_to_use_as_z, idx);
^~~~~~~~~~~~~~~
../../include/Make/Compile.make:35: recipe for target 'OBJ.x86_64-pc-
linux-gnu/main.o' failed
make: *** [OBJ.x86_64-pc-linux-gnu/main.o] Error 1
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3243#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list