Page 1 of 3

Terragear build: GDAL error

Posted: Fri Nov 11, 2016 6:15 pm
by D-ECHO
Hi!
I am doing it again, on another computer. Building terragear. But there's a problem. GDAL:

Code: Select all

/
delta@triplefan:~/tg/flightgear-terragear$ make -j2 && make install
Scanning dependencies of target terragear
[ 51%] Built target HGT
[ 51%] Building CXX object src/Lib/terragear/CMakeFiles/terragear.dir/tg_shapefile.cxx.o
[ 51%] Built target Array
[ 51%] Built target DEM
[ 51%] Linking CXX executable hgtchop
[ 51%] Built target hgtchop
[ 51%] Linking CXX executable testassem
[ 51%] Built target testassem
[ 51%] Built target Terra
Scanning dependencies of target test_array
[ 51%] Building CXX object src/Lib/Array/CMakeFiles/test_array.dir/testarray.cxx.o
[ 51%] Linking CXX executable test_array
[ 51%] Built target test_array
[ 51%] Built target landcover
[ 51%] Built target srtmchop
[ 51%] Built target fillvoids
[ 51%] Built target demchop
[ 51%] Built target terra_bin
[ 51%] Built target terrafit
Scanning dependencies of target test_landcover
[ 51%] Building CXX object src/Lib/landcover/CMakeFiles/test_landcover.dir/test-landcover.cxx.o
[ 51%] Linking CXX executable test_landcover
[ 51%] Built target test_landcover
[ 51%] Linking CXX static library libterragear.a
[ 51%] Built target terragear
Scanning dependencies of target ogr-decode
[ 51%] Linking CXX executable gdalchop
[ 51%] Building CXX object src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o
[ 51%] Built target gdalchop
[ 51%] Linking CXX executable genapts850                                                                                                                                                                                                   
[ 51%] Built target genapts850                                                                                                                                                                                                             
Scanning dependencies of target tg-construct                                                                                                                                                                                               
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct.cxx.o                                                                                                                                               
/home/delta/tg/flightgear-terragear/src/Prep/OGRDecode/ogr-decode.cxx: In function ‘int main(int, char**)’:
/home/delta/tg/flightgear-terragear/src/Prep/OGRDecode/ogr-decode.cxx:655:59: error: ‘GDAL_OF_VECTOR’ was not declared in this scope
     poDS = (GDALDataset*) GDALOpenEx( datasource.c_str(), GDAL_OF_VECTOR, NULL, NULL, NULL );                                                                                                                                             
                                                           ^
/home/delta/tg/flightgear-terragear/src/Prep/OGRDecode/ogr-decode.cxx:655:92: error: ‘GDALOpenEx’ was not declared in this scope
     poDS = (GDALDataset*) GDALOpenEx( datasource.c_str(), GDAL_OF_VECTOR, NULL, NULL, NULL );                                                                                                                                             
                                                                                            ^
/home/delta/tg/flightgear-terragear/src/Prep/OGRDecode/ogr-decode.cxx:667:29: error: ‘class GDALDataset’ has no member named ‘GetLayerByName’
             poLayer = poDS->GetLayerByName( argv[i] );                                                                                                                                                                                     
                             ^
/home/delta/tg/flightgear-terragear/src/Prep/OGRDecode/ogr-decode.cxx:677:30: error: ‘class GDALDataset’ has no member named ‘GetLayerCount’
         for (int i=0;i<poDS->GetLayerCount();i++) {                                                                                                                                                                                       
                              ^
/home/delta/tg/flightgear-terragear/src/Prep/OGRDecode/ogr-decode.cxx:678:29: error: ‘class GDALDataset’ has no member named ‘GetLayer’
             poLayer = poDS->GetLayer(i);                                                                                                                                                                                                   
                             ^
src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/build.make:62: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o' failed                                                                                       
make[2]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o] Error 1                                                                                                                                                       
CMakeFiles/Makefile2:593: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all' failed                                                                                                                                       
make[1]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all] Error 2                                                                                                                                                                     
make[1]: *** Waiting for unfinished jobs....                                                                                                                                                                                               
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_cleanup.cxx.o                                                                                                                                       
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_clip.cxx.o                                                                                                                                           
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_debug.cxx.o                                                                                                                                         
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_elevation.cxx.o                                                                                                                                     
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_landclass.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_lookup.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_math.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_output.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_poly.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_shared.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_tesselate.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tgconstruct_texture.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/tglandclass.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/priorities.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/usgs.cxx.o
[ 51%] Building CXX object src/BuildTiles/Main/CMakeFiles/tg-construct.dir/main.cxx.o
[ 51%] Linking CXX executable tg-construct
CMakeFiles/tg-construct.dir/tgconstruct_output.cxx.o: In function `TGConstruct::AddCustomObjects()':
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:45: undefined reference to `SGPath::str_native[abi:cxx11]() const'
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:49: undefined reference to `SGPath::str_native[abi:cxx11]() const'
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:73: undefined reference to `SGPath::str_native[abi:cxx11]() const'
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:95: undefined reference to `SGPath::str_native[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
src/BuildTiles/Main/CMakeFiles/tg-construct.dir/build.make:538: recipe for target 'src/BuildTiles/Main/tg-construct' failed
make[2]: *** [src/BuildTiles/Main/tg-construct] Error 1
CMakeFiles/Makefile2:1125: recipe for target 'src/BuildTiles/Main/CMakeFiles/tg-construct.dir/all' failed
make[1]: *** [src/BuildTiles/Main/CMakeFiles/tg-construct.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Any ideas? ;)

Re: Terragear build: GDAL error

Posted: Fri Nov 11, 2016 6:19 pm
by IAHM-COL
what is your version of gdal?

building terragear is big hassle.

Re: Terragear build: GDAL error

Posted: Fri Nov 11, 2016 6:22 pm
by D-ECHO
libgdal-dev version (from aptitude) is 1.11.3

Re: Terragear build: GDAL error

Posted: Fri Nov 11, 2016 6:23 pm
by IAHM-COL
it wont work
needed 2.0.1

Re: Terragear build: GDAL error

Posted: Fri Nov 11, 2016 6:53 pm
by D-ECHO
Okay, felt 1000 new package installations later with gdal2.11 (hope gdal 2.0.1 was a minimum?, couldn't get it...) I have

Code: Select all

/
delta@triplefan:~/tg/flightgear-terragear$ make -j4
[ 51%] Built target HGT
[ 51%] Built target Array
[ 51%] Built target DEM
[ 51%] Built target terragear
[ 51%] Built target landcover
[ 51%] Built target Terra
[ 51%] Built target fillvoids
[ 51%] Built target srtmchop
[ 51%] Built target hgtchop
[ 51%] Built target demchop
[ 51%] Built target testassem
[ 51%] Built target terra_bin
[ 51%] Building CXX object src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o
[ 51%] Built target terrafit
[ 51%] Built target test_landcover
[ 51%] Built target test_array
Scanning dependencies of target poly2ogr
[ 51%] Built target genapts850
[ 51%] Building CXX object src/Utils/poly2ogr/CMakeFiles/poly2ogr.dir/poly2ogr.cxx.o
[ 51%] Linking CXX executable tg-construct
[ 51%] Built target gdalchop
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx: In function ‘void usage(const char*, const string&)’:
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:460:63: warning: ‘static OGRSFDriverRegistrar* OGRSFDriverRegistrar::GetRegistrar()’ is deprecated [-Wdeprecated-declarations]
         OGRSFDriverRegistrar* registrar=OGRSFDriverRegistrar::GetRegistrar();
                                                               ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:320:34: note: declared here
     static OGRSFDriverRegistrar *GetRegistrar() OGR_DEPRECATED("Use GDALDriverManager class instead");
                                  ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:460:76: warning: ‘static OGRSFDriverRegistrar* OGRSFDriverRegistrar::GetRegistrar()’ is deprecated [-Wdeprecated-declarations]
         OGRSFDriverRegistrar* registrar=OGRSFDriverRegistrar::GetRegistrar();
                                                                            ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:320:34: note: declared here
     static OGRSFDriverRegistrar *GetRegistrar() OGR_DEPRECATED("Use GDALDriverManager class instead");
                                  ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:461:50: warning: ‘int OGRSFDriverRegistrar::GetDriverCount()’ is deprecated [-Wdeprecated-declarations]
         for (int i=0;i<registrar->GetDriverCount();i++) {
                                                  ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:324:17: note: declared here
     int         GetDriverCount( void ) OGR_DEPRECATED("Use GDALDriverManager class instead");
                 ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:41:0:
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:462:84: warning: ‘GDALDriver* OGRSFDriverRegistrar::GetDriver(int)’ is deprecated [-Wdeprecated-declarations]
                 SG_LOG(SG_GENERAL, SG_INFO, "\t\t\t-f \"" << registrar->GetDriver(i)->GetDescription() << "\"");
                                                                                    ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:325:17: note: declared here
     GDALDriver *GetDriver( int iDriver ) OGR_DEPRECATED("Use GDALDriverManager class instead");
                 ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx: In function ‘int main(int, char**)’:
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:522:58: warning: ‘static OGRSFDriverRegistrar* OGRSFDriverRegistrar::GetRegistrar()’ is deprecated [-Wdeprecated-declarations]
         ogrdriver = (OGRSFDriver*) OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(format_name);
                                                          ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:320:34: note: declared here
     static OGRSFDriverRegistrar *GetRegistrar() OGR_DEPRECATED("Use GDALDriverManager class instead");
                                  ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:522:71: warning: ‘static OGRSFDriverRegistrar* OGRSFDriverRegistrar::GetRegistrar()’ is deprecated [-Wdeprecated-declarations]
         ogrdriver = (OGRSFDriver*) OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(format_name);
                                                                       ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:320:34: note: declared here
     static OGRSFDriverRegistrar *GetRegistrar() OGR_DEPRECATED("Use GDALDriverManager class instead");
                                  ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:522:101: warning: ‘GDALDriver* OGRSFDriverRegistrar::GetDriverByName(const char*)’ is deprecated [-Wdeprecated-declarations]
         ogrdriver = (OGRSFDriver*) OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(format_name);
                                                                                                     ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:326:17: note: declared here
     GDALDriver *GetDriverByName( const char * ) OGR_DEPRECATED("Use GDALDriverManager class instead");
                 ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:528:69: warning: ‘virtual OGRDataSource* OGRSFDriver::CreateDataSource(const char*, char**)’ is deprecated [-Wdeprecated-declarations]
         datasource = ogrdriver->CreateDataSource(dst_datasource,NULL);
                                                                     ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:281:28: note: declared here
     virtual OGRDataSource *CreateDataSource( const char *pszName,
                            ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:538:24: warning: ‘static void OGRDataSource::DestroyDataSource(OGRDataSource*)’ is deprecated [-Wdeprecated-declarations]
         OGRDataSource::DestroyDataSource( datasource );
                        ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:245:25: note: declared here
     static void         DestroyDataSource( OGRDataSource * ) OGR_DEPRECATED("Use GDALDataset class instead");
                         ^
/home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:538:54: warning: ‘static void OGRDataSource::DestroyDataSource(OGRDataSource*)’ is deprecated [-Wdeprecated-declarations]
         OGRDataSource::DestroyDataSource( datasource );
                                                      ^
In file included from /home/delta/tg/flightgear-terragear/src/Utils/poly2ogr/poly2ogr.cxx:39:0:
/usr/include/gdal/ogrsf_frmts.h:245:25: note: declared here
     static void         DestroyDataSource( OGRDataSource * ) OGR_DEPRECATED("Use GDALDataset class instead");
                         ^
CMakeFiles/tg-construct.dir/tgconstruct_output.cxx.o: In function `TGConstruct::AddCustomObjects()':
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:45: undefined reference to `SGPath::str_native[abi:cxx11]() const'
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:49: undefined reference to `SGPath::str_native[abi:cxx11]() const'
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:73: undefined reference to `SGPath::str_native[abi:cxx11]() const'
/home/delta/tg/flightgear-terragear/src/BuildTiles/Main/tgconstruct_output.cxx:95: undefined reference to `SGPath::str_native[abi:cxx11]() const'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::ToPolygon(void const*)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:307: undefined reference to `OGRLineString::getZ(int) const'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:313: undefined reference to `OGRPolygon::getNumInteriorRings() const'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:318: undefined reference to `OGRLineString::getZ(int) const'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromClipper(std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint> >, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:135: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:139: undefined reference to `OGRPolygon::addRingDirectly(OGRLinearRing*)'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromContour(tgContour const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:183: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:187: undefined reference to `OGRPolygon::addRingDirectly(OGRLinearRing*)'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromPolygon(tgPolygon const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:275: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:280: undefined reference to `OGRPolygon::addRingDirectly(OGRLinearRing*)'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromTriangles(tgPolygon const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:225: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
collect2: error: ld returned 1 exit status
src/BuildTiles/Main/CMakeFiles/tg-construct.dir/build.make:538: recipe for target 'src/BuildTiles/Main/tg-construct' failed
make[2]: *** [src/BuildTiles/Main/tg-construct] Error 1
CMakeFiles/Makefile2:1125: recipe for target 'src/BuildTiles/Main/CMakeFiles/tg-construct.dir/all' failed
make[1]: *** [src/BuildTiles/Main/CMakeFiles/tg-construct.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 51%] Linking CXX executable poly2ogr
[ 51%] Built target poly2ogr
[ 51%] Linking CXX executable ogr-decode
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::ToPolygon(void const*)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:307: undefined reference to `OGRLineString::getZ(int) const'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:313: undefined reference to `OGRPolygon::getNumInteriorRings() const'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:318: undefined reference to `OGRLineString::getZ(int) const'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromClipper(std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint> >, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:135: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:139: undefined reference to `OGRPolygon::addRingDirectly(OGRLinearRing*)'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromContour(tgContour const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:183: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:187: undefined reference to `OGRPolygon::addRingDirectly(OGRLinearRing*)'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromPolygon(tgPolygon const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:275: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:280: undefined reference to `OGRPolygon::addRingDirectly(OGRLinearRing*)'
../../Lib/terragear/libterragear.a(tg_shapefile.cxx.o): In function `tgShapefile::FromTriangles(tgPolygon const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx:225: undefined reference to `OGRLineString::addPoint(OGRPoint*)'
collect2: error: ld returned 1 exit status
src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/build.make:114: recipe for target 'src/Prep/OGRDecode/ogr-decode' failed
make[2]: *** [src/Prep/OGRDecode/ogr-decode] Error 1
CMakeFiles/Makefile2:593: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all' failed
make[1]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Thanks!

Re: Terragear build: GDAL error

Posted: Fri Nov 11, 2016 7:41 pm
by IAHM-COL
rm all content on the build directory

run the cmake command, send me a message what;s the output you get from the cmake

(ie --use your own options)

Code: Select all

cmake ../fligthgear-terragear 2>&1 | tee log_cmake.txt

Tell me what log_cmake.txt file contains. and your exact options.

Re: Terragear build: GDAL error

Posted: Sun Nov 13, 2016 6:10 am
by D-ECHO
Cmake output (and options:)

Code: Select all

delta@triplefan:~/tg$ git clone git://git.code.sf.net/p/flightgear/terragear/ flightgear-terragear
Cloning into 'flightgear-terragear'...

remote: Counting objects: 14748, done.
remote: Compressing objects: 100% (3884/3884), done.
remote: Total 14748 (delta 11195), reused 13903 (delta 10574)
Receiving objects: 100% (14748/14748), 6.73 MiB | 811.00 KiB/s, done.
Resolving deltas: 100% (11195/11195), done.
Checking connectivity... done.
delta@triplefan:~/tg$
delta@triplefan:~/tg$ cd flightgear-terragear/
delta@triplefan:~/tg/flightgear-terragear$ cmake . -DCMAKE_PREFIX_PATH="/home/delta/tg"
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features                                                                                                                         
-- Detecting CXX compile features - done                                                                                                                   
-- CMAKE_MODULE_PATH is /home/delta/tg/flightgear-terragear/CMakeModules;                                                                                 
-- Looking for pthread.h                                                                                                                                   
-- Looking for pthread.h - found                                                                                                                           
-- Looking for pthread_create                                                                                                                             
-- Looking for pthread_create - not found                                                                                                                 
-- Looking for pthread_create in pthreads                                                                                                                 
-- Looking for pthread_create in pthreads - not found                                                                                                                                                                                       
-- Looking for pthread_create in pthread                                                                                                                                                                                                   
-- Looking for pthread_create in pthread - found                                                                                                                                                                                           
-- Found Threads: TRUE                                                                                                                                                                                                                     
-- Boost version: 1.58.0                                                                                                                                                                                                                   
-- Found the following Boost libraries:                                                                                                                                                                                                     
--   system                                                                                                                                                                                                                                 
--   thread                                                                                                                                                                                                                                 
--   chrono                                                                                                                                                                                                                                 
--   date_time                                                                                                                                                                                                                             
--   atomic                                                                                                                                                                                                                                 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")                                                                                                                                                                   
-- SimGear include directory: /home/delta/tg/include                                                                                                                                                                                       
-- found SimGear version: 2016.4.0 (needed 3.1.0)                                                                                                                                                                                           
-- looking for static SimGear libraries                                                                                                                                                                                                     
-- Looking for clock_gettime in rt                                                                                                                                                                                                         
-- Looking for clock_gettime in rt - found                                                                                                                                                                                                 
-- found SimGear libraries                                                                                                                                                                                                                 
-- Performing Test SIMGEAR_COMPILE_TEST                                                                                                                                                                                                     
-- Performing Test SIMGEAR_COMPILE_TEST - Success                                                                                                                                                                                           
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0")                                                                                                                                                               
-- Found SimGear: optimized;/home/delta/tg/lib/libSimGearScene.a;debug;/home/delta/tg/lib/libSimGearScene.a;optimized;/home/delta/tg/lib/libSimGearCore.a;debug;/home/delta/tg/lib/libSimGearCore.a;optimized;/home/delta/tg/lib/libSimGearCore.a;debug;/home/delta/tg/lib/libSimGearCore.a (Required is at least version "3.1.0")                                                                                                                                                     
-- Found GDAL: /usr/lib/libgdal.so (Required is at least version "2.0.0")                                                                                                                                                                   
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.0.6")                                                                                                                                                                 
-- Found CGAL 4.7                                                                                                                                                                                                                           
-- Build type: Release                                                                                                                                                                                                                     
-- USING CXXFLAGS = ' -O3 -DNDEBUG'                                                                                                                                                                                                         
-- USING EXEFLAGS = ' '                                                                                                                                                                                                                     
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Requested component: Core
-- Requested component: MPFR
-- Requested component: GMP
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for rint
-- Looking for rint - not found
-- coreSources is /home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_io_debug.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_meta.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_offset_clipper.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_paths.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_sle.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_accumulator.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_chop.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_constraint.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_intersection_generator.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_intersection_edge.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_intersection_node.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_segmentnetwork.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_segmentnetwork_ars.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_cleaning.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_small_area_removal.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_spike_removal.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_project_edges.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_snap_round.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_polyhedral_surface.hxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_polyhedral_surface.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation_debug.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation_shared_edges.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/clipper.cpp;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_areas.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_arrangement.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_array.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_cgal.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_cluster.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_contour.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_misc.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_nodes.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon_clean.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon_clip.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon_tesselate.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_rectangle.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_sskel.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_surface.cxx
-- includePaths is polygon_set;vector_intersections;mesh;./
--  add include dir polygon_set
--  add include dir vector_intersections
--  add include dir mesh
--  add include dir ./
-- Configuring done
-- Generating done
-- Build files have been written to: /home/delta/tg/flightgear-terragear
delta@triplefan:~/tg/flightgear-terragear$

and log_cmake.txt:
doesn't exist :-o
Regards

Re: Terragear build: GDAL error

Posted: Sun Nov 13, 2016 6:14 am
by IAHM-COL
try compiling terragear with simgear 2016.2 instead of 2016.4

Re: Terragear build: GDAL error

Posted: Sun Nov 13, 2016 6:34 am
by IAHM-COL
you could have created the file like this


Code: Select all

cmake . -DCMAKE_PREFIX_PATH="/home/delta/tg" 2>&1 | tee log_cmake.txt

Re: Terragear build: GDAL error

Posted: Sun Nov 20, 2016 3:53 pm
by D-ECHO
What simgear do you mean? libsimgear-dev? libsimgearscene? libsimgearcore?
:D
And, btw here is the log_cmake.txt:

Code: Select all

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_MODULE_PATH is /home/delta/tg/flightgear-terragear/CMakeModules;
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- SimGear include directory: /home/delta/tg/include
-- found SimGear version: 2016.4.0 (needed 3.1.0)
-- looking for static SimGear libraries
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- found SimGear libraries
-- Performing Test SIMGEAR_COMPILE_TEST
-- Performing Test SIMGEAR_COMPILE_TEST - Success
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0")
-- Found SimGear: optimized;/home/delta/tg/lib/libSimGearScene.a;debug;/home/delta/tg/lib/libSimGearScene.a;optimized;/home/delta/tg/lib/libSimGearCore.a;debug;/home/delta/tg/lib/libSimGearCore.a;optimized;/home/delta/tg/lib/libSimGearCore.a;debug;/home/delta/tg/lib/libSimGearCore.a (Required is at least version "3.1.0")
-- Found GDAL: /usr/lib/libgdal.so (Required is at least version "2.0.0")
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.0.6")
-- Found CGAL 4.7
-- Build type: Release
-- USING CXXFLAGS = ' -O3 -DNDEBUG'
-- USING EXEFLAGS = ' '
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Requested component: Core
-- Requested component: MPFR
-- Requested component: GMP
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for rint
-- Looking for rint - not found
-- coreSources is /home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_io_debug.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_meta.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_offset_clipper.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_paths.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_set_sle.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_accumulator.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/polygon_set/tg_polygon_chop.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_constraint.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_intersection_generator.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_intersection_edge.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_intersection_node.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_segmentnetwork.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/vector_intersections/tg_segmentnetwork_ars.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_cleaning.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_small_area_removal.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_spike_removal.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_project_edges.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_snap_round.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_arrangement_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_polyhedral_surface.hxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_polyhedral_surface.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation_debug.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_triangulation_shared_edges.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/mesh/tg_mesh_io.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/clipper.cpp;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_areas.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_arrangement.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_array.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_cgal.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_cluster.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_contour.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_misc.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_nodes.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon_clean.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon_clip.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_polygon_tesselate.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_rectangle.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_shapefile.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_sskel.cxx;/home/delta/tg/flightgear-terragear/src/Lib/terragear/tg_surface.cxx
-- includePaths is polygon_set;vector_intersections;mesh;./
--  add include dir polygon_set
--  add include dir vector_intersections
--  add include dir mesh
--  add include dir ./
-- Configuring done
-- Generating done
-- Build files have been written to: /home/delta/tg/flightgear-terragear