ossimlabs / ossim-planet-gui

MIT License
1 stars 0 forks source link

build error on ubuntu 18.04 #2

Open epifanio opened 5 years ago

epifanio commented 5 years ago

build fails on ubuntu 18.08,

osgversion is 3.2.3

the error:

[ 92%] Building CXX object ossim-planet-gui/CMakeFiles/ossimPlanetQt.dir/src/gui/ossimPlanetQtAlertLayer.cpp.o
In file included from /home/epinux/dev/OSSIM/ossim-planet-gui/src/gui/ossimPlanetQtAlertLayer.cpp:1:0:
/home/epinux/dev/OSSIM/ossim-planet-gui/include/ossimPlanetQt/ossimPlanetQtAlertLayer.h:58:32: error: invalid covariant return type for ‘virtual osg::BoundingSphere ossimPlanetQtAlertIconCallout::computeBound() const’
    virtual osg::BoundingSphere computeBound()const;
                                ^~~~~~~~~~~~
In file included from /home/epinux/dev/OSSIM/ossim-planet-gui/include/ossimPlanetQt/ossimPlanetQtAlertLayer.h:4:0,
                 from /home/epinux/dev/OSSIM/ossim-planet-gui/src/gui/ossimPlanetQtAlertLayer.cpp:1:
/usr/include/osg/Drawable:214:29: error:   overriding ‘virtual osg::BoundingBox osg::Drawable::computeBound() const’
         virtual BoundingBox computeBound() const;
                             ^~~~~~~~~~~~
ossim-planet-gui/CMakeFiles/ossimPlanetQt.dir/build.make:378: recipe for target 'ossim-planet-gui/CMakeFiles/ossimPlanetQt.dir/src/gui/ossimPlanetQtAlertLayer.cpp.o' failed
make[2]: *** [ossim-planet-gui/CMakeFiles/ossimPlanetQt.dir/src/gui/ossimPlanetQtAlertLayer.cpp.o] Error 1
CMakeFiles/Makefile2:6813: recipe for target 'ossim-planet-gui/CMakeFiles/ossimPlanetQt.dir/all' failed
make[1]: *** [ossim-planet-gui/CMakeFiles/ossimPlanetQt.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
epifanio commented 5 years ago

I tried an upgrade to OSG 3.4 (provided by ubuntugis) but I got errors about missing osg:CameraNode a search lead to a renamed class, so I modiefied few src files from osg:CameraNode toosg:Camera but I ended up with the following error:

[ 81%] Building CXX object ossim-planet/CMakeFiles/ossim-planet.dir/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp.o
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp: In member function ‘virtual bool ossimPlanetKmlPlacemarkNode::init()’:
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:508:99: error: no matching function for call to ‘ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(ossimPlanetBillboardIcon*, osg::ClusterCullingCallback*, osg::Callback*)’
                                                                          text->getUpdateCallback()));
                                                                                                   ^
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:176:4: note: candidate: ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(ossimPlanetBillboardIcon*, osg::ClusterCullingCallback*, osg::ref_ptr<osg::Drawable::UpdateCallback>)
    ossimPlanetKmlTextShiftUpdate(ossimPlanetBillboardIcon* icon,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:176:4: note:   no known conversion for argument 3 from ‘osg::Callback*’ to ‘osg::ref_ptr<osg::Drawable::UpdateCallback>’
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note: candidate: ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(const ossimPlanetKmlTextShiftUpdate&)
 class ossimPlanetKmlTextShiftUpdate : public osg::Drawable::UpdateCallback
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note:   candidate expects 1 argument, 3 provided
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note: candidate: ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(ossimPlanetKmlTextShiftUpdate&&)
/home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note:   candidate expects 1 argument, 3 provided
ossim-planet/CMakeFiles/ossim-planet.dir/build.make:1430: recipe for target 'ossim-planet/CMakeFiles/ossim-planet.dir/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp.o' failed
make[2]: *** [ossim-planet/CMakeFiles/ossim-planet.dir/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp.o] Error 1
CMakeFiles/Makefile2:6637: recipe for target 'ossim-planet/CMakeFiles/ossim-planet.dir/all' failed
make[1]: *** [ossim-planet/CMakeFiles/ossim-planet.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
omarossim commented 5 years ago

Hello:

I have all that in the branch not merged in:

The branch is called osg-3.5.7 for ossim-planet and ossim-planet-gui

Take care

Garrett

On Jan 28, 2019, at 7:01 PM, epifanio notifications@github.com wrote:

I tried an upgrade to OSG 3.4 (provided by ubuntugis) but I got errors about missing osg:CameraNode a search lead to a renamed class, so I modiefied few src files from osg:CameraNode to osg:Camera but I ended up with the following error:

[ 81%] Building CXX object ossim-planet/CMakeFiles/ossim-planet.dir/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp.o /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp: In member function ‘virtual bool ossimPlanetKmlPlacemarkNode::init()’: /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:508:99: error: no matching function for call to ‘ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(ossimPlanetBillboardIcon, osg::ClusterCullingCallback, osg::Callback)’ text->getUpdateCallback())); ^ /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:176:4: note: candidate: ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(ossimPlanetBillboardIcon, osg::ClusterCullingCallback, osg::ref_ptr) ossimPlanetKmlTextShiftUpdate(ossimPlanetBillboardIcon icon, ^~~~~~~~~ /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:176:4: note: no known conversion for argument 3 from ‘osg::Callback*’ to ‘osg::ref_ptr’ /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note: candidate: ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(const ossimPlanetKmlTextShiftUpdate&) class ossimPlanetKmlTextShiftUpdate : public osg::Drawable::UpdateCallback ^~~~~~~~~ /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note: candidate expects 1 argument, 3 provided /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note: candidate: ossimPlanetKmlTextShiftUpdate::ossimPlanetKmlTextShiftUpdate(ossimPlanetKmlTextShiftUpdate&&) /home/epinux/dev/OSSIM/ossim-planet/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp:173:7: note: candidate expects 1 argument, 3 provided ossim-planet/CMakeFiles/ossim-planet.dir/build.make:1430: recipe for target 'ossim-planet/CMakeFiles/ossim-planet.dir/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp.o' failed make[2]: [ossim-planet/CMakeFiles/ossim-planet.dir/src/ossimPlanet/ossimPlanetKmlPlacemarkNode.cpp.o] Error 1 CMakeFiles/Makefile2:6637: recipe for target 'ossim-planet/CMakeFiles/ossim-planet.dir/all' failed make[1]: [ossim-planet/CMakeFiles/ossim-planet.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ossimlabs/ossim-planet-gui/issues/2#issuecomment-458352130, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpvyos1U1_6bfiJBbphwLN8nlo1ABVdks5vH49zgaJpZM4aW-qK.

epifanio commented 5 years ago

@omarossim Thank you! I succesfully built Ossim-planet (branch: osg-3.5.7) and ossimplanet-gui (branch: dev) I was now looking for the support files, the reference image, compass etc .. are they still in some repo? .. Last time I built planet-qt gui was from svn repo :) I think the directory was called ossim_package_support

epifanio commented 5 years ago

Hi @omarossim

Some progress :) The Qt GUI built fine, but I'm not yet ableto load images. I tried with a landsat scene but it gives me a blank globe .. (I also tried ossimplanetviewer --ad-image file.tiff, with same results)

I tried with a simple Landsat scene, it loads and displays in ossim-geocell, the cursor shows the right position for latitude - longitude, but when I try to load the planetary view ... I got the same behavior as in ossim-planet-gui and ossimplanetviewer, a blank globe.

See attached screenshot, geocell and the planetary view are in sync (the position matches) but no image is loaded into planet.

From the shell, I can see some error logs (they appear in both ossim-planet-gui and ossim-geocell). I run ossim-geocell (and ossim-planet-gui) with the following:

epinux@epinux:~$ /home/epinux/dev/OSSIM/install/bin/ossim-geocell -P '/home/epinux/dev/ossim_preference' 
libpng warning: iCCP: profile 'ICC Profile': 1000000h: invalid rendering intent
Error reading file arial.ttf: file not found
Error reading file shaders/text.vert: file not found
Error reading file shaders/text.frag: file not found
Error reading file shaders/text.vert: file not found
Error reading file shaders/text.frag: file not found

My preference file:

elevation_manager.enabled:  true

epsg_database_file1: /home/epinux/dev/OSSIM/install/share/ossim/projection/ossim_epsg_projections-v7_4.csv
epsg_database_file2: /home/epinux/dev/OSSIM/install/share/ossim/projection/ossim_harn_state_plane_epsg.csv
epsg_database_file3: /home/epinux/dev/OSSIM/install/share/ossim/projection/ossim_state_plane_spcs.csv
epsg_database_file4: /home/epinux/dev/OSSIM/install/share/ossim/projection/ossim_harn_state_plane_esri.csv
#epsg_database_file4: /home/epinux/dev/OSSIM/install/share/ossim/projection/ossim_wkt_pcs.csv

geoid_egm_96_grid: /home/epinux/dev/OSSIM/install/share/ossim/geoids/egm96.grd

font.file1: /home/epinux/dev/OSSIM/install/share/ossim/fonts/arial.ttf
font.dir1: /home/epinux/dev/OSSIM/install/share/ossim/fonts

plugin.file1: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_dem_plugin.so     
plugin.file2: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_opencv_plugin.so
plugin.file3: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_fftw3_plugin.so   
plugin.file4: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_openjpeg_plugin.so
plugin.file5: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_gdal_plugin.so    
plugin.file6: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_png_plugin.so
plugin.file7: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_geopdf_plugin.so  
plugin.file8: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_sqlite_plugin.so
plugin.file9: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_kml_plugin.so     
plugin.file10: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_web_plugin.so

statusLatLon: true
statusHeight: true
statusDatum: true
statusGSD: true
statusUpdateOnClick: true

overview_stop_dimension: 64

tile_size: 64 64

shapefile_colors_auto: false
shapefile_normalized_rgb_pen_color: 0.004 1.0 0.004
shapefile_normalized_rgb_brush_color: 0.004 1.0 0.004

autogenerate_histogram: true

The debug info looks suspicious, as not all the plugins are listed (e.g. missing gdal plugin):

export OSSIM_PREFS_FILE=/home/epinux/dev/ossim_preference
ossim-info -T ossimDynamic --plugins 
ossimDynamicLibrary:71  Loaded library:  /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_opencv_plugin.so
ossimDynamicLibrary:71  Loaded library:  /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_openjpeg_plugin.so
ossimDynamicLibrary:71  Loaded library:  /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_png_plugin.so
ossimDynamicLibrary:71  Loaded library:  /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_sqlite_plugin.so
ossimDynamicLibrary:71  Loaded library:  /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_web_plugin.so
Plugin: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_opencv_plugin.so
DESCRIPTION: 
OpenCV plugin

CLASSES SUPPORTED
     ossimTieMeasurementGenerator

Plugin: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_openjpeg_plugin.so
DESCRIPTION: 
Open JPEG (j2k) reader / writer plugin

CLASSES SUPPORTED
     ossimOpjJp2Reader
     ossimOpjNitfReader
     ossimOpjJp2Writer

Plugin: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_png_plugin.so
DESCRIPTION: 
PNG reader / writer plugin.

CLASSES SUPPORTED
     ossimPngReader
     ossimPngWriter
     ossimPngCodec
     ossimPngReader
     ossimPngWriter
     png
     pnga
     ossimPngCodec

Plugin: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_sqlite_plugin.so
DESCRIPTION: 
GeoPackage reader / writer plugin

CLASSES SUPPORTED
     ossimGpkgReader
     ossimGpkgWriter
     ossimGpkgInfo

Plugin: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_web_plugin.so
DESCRIPTION: 
Web plugin
    support http, https web protocols

CLASSES SUPPORTED
     ossimConnectableContainer

But if I try to load it individuallty, it seems to load:

ossim-info --plugin-test '/home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_gdal_plugin.so' 
Plugin loaded: /home/epinux/dev/OSSIM/install/lib/ossim/plugins/libossim_gdal_plugin.so

ossim_debug

I did one more test using the earth image available at:

http://download.osgeo.org/livedvd/data/ossim/ossim_data/bluemarble.tif

we used the same image in older version of ossimplanet for the osgeolive, so it is supposed to work. My best guess is a problem reading the geometry .. but then this should pop up the worning/error (no geom found) which is not the case.

Thanks for looking into it!

test1

Note: I got the same behaviour with ossimpanetviewer, so I guess is not a problem with Qt the version.

My OSG version is 3.5.10 built from source.

epifanio commented 5 years ago

I tried to force the creation of a .geom file with:

ossim-image-geometry-test bluemarble.tif >> bluemarble_out.geom

but same results in ossim-planet-gui (see last screenshot), the only debug info written in the shell is:

epinux@epinux:~/dev/OSSIM/install/share/ossim$ ossim-planet-gui 
libpng warning: iCCP: known incorrect sRGB profile
Error reading file shaders/text.vert: file not found
Error reading file shaders/text.frag: file not found
Error reading file shaders/text.vert: file not found
Error reading file shaders/text.frag: file not found
Error reading file shaders/text.vert: file not found
Error reading file shaders/text.frag: file not found