Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Compilation problem #42

Closed
raul-geocento opened this issue Nov 15, 2018 · 3 comments
Closed

Compilation problem #42

raul-geocento opened this issue Nov 15, 2018 · 3 comments

Comments

@raul-geocento
Copy link

Hello:

I am trying to compile the sources following the instructions on a 18.04 linux server machine with gdal 2.2.3 installed. This is the error:

[ 52%] Building CXX object CMakeFiles/tntn.dir/src/RasterIO.cpp.o
/usr/bin/c++ -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_SWIZZLE -I/mnt/data1/srtm30/tin-terrain-master/3rdparty/glm-0.9.9.0 -I/mnt/data1/srtm30/tin-terrain-master/include -I/usr/include/gdal -I/mnt/data1/srtm30/tin-terrain-master/3rdparty/fmt-5.1.0/include -O3 -DNDEBUG -std=gnu++14 -o CMakeFiles/tntn.dir/src/RasterIO.cpp.o -c /mnt/data1/srtm30/tin-terrain-master/src/RasterIO.cpp
/mnt/data1/srtm30/tin-terrain-master/src/RasterIO.cpp: In function ‘bool tntn::is_valid_projection(GDALDataset*)’:
/mnt/data1/srtm30/tin-terrain-master/src/RasterIO.cpp:290:44: error: no matching function for call to ‘OGRSpatialReference::importFromWkt(const char*&)’
raster_srs.importFromWkt(projection_wkt);
^
In file included from /mnt/data1/srtm30/tin-terrain-master/src/RasterIO.cpp:14:0:
/usr/include/gdal/ogr_spatialref.h:185:17: note: candidate: OGRErr OGRSpatialReference::importFromWkt(char**)
OGRErr importFromWkt( char ** );
^~~~~~~~~~~~~
/usr/include/gdal/ogr_spatialref.h:185:17: note: no known conversion for argument 1 from ‘const char*’ to ‘char**’
/mnt/data1/srtm30/tin-terrain-master/src/RasterIO.cpp:316:24: error: ‘class OGRSpatialReference’ has no member named ‘FindMatches’
raster_srs.FindMatches(NULL, &matches_number, NULL);
^~~~~~~~~~~
/mnt/data1/srtm30/tin-terrain-master/src/RasterIO.cpp:335:9: error: ‘OSRFreeSRSArray’ was not declared in this scope
OSRFreeSRSArray(matched_projections);
^~~~~~~~~~~~~~~
CMakeFiles/tntn.dir/build.make:470: recipe for target 'CMakeFiles/tntn.dir/src/RasterIO.cpp.o' failed
make[3]: *** [CMakeFiles/tntn.dir/src/RasterIO.cpp.o] Error 1
make[3]: Leaving directory '/mnt/data1/srtm30/tin-terrain-master/build'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tntn.dir/all' failed
make[2]: *** [CMakeFiles/tntn.dir/all] Error 2
make[2]: Leaving directory '/mnt/data1/srtm30/tin-terrain-master/build'
CMakeFiles/Makefile2:117: recipe for target 'CMakeFiles/tin-terrain.dir/rule' failed
make[1]: *** [CMakeFiles/tin-terrain.dir/rule] Error 2
make[1]: Leaving directory '/mnt/data1/srtm30/tin-terrain-master/build'
Makefile:131: recipe for target 'tin-terrain' failed
make: *** [tin-terrain] Error 2

No idea what is the problem... please help
Thanks

@fester
Copy link
Contributor

fester commented Nov 21, 2018

Thank you for reporting this issue @raul-geocento. I think I fixed the problem, but in order to verify it I'd like to ask you to build tin-terrain from a branch[*] and confirm that the issue is fixed?

[*] - https://github.com/heremaps/tin-terrain/tree/gdal-version-check.fester

@bisgroves
Copy link

I can confirm it is fixed.

@fester
Copy link
Contributor

fester commented Dec 12, 2018

Thank you!

@fester fester closed this as completed Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants