romulogcerqueira / sonar_simulation-buildconf

Build system of Imaging Sonar Simulator
Apache License 2.0
33 stars 15 forks source link

error: conversion from ‘const BoundingSphere {aka const osg::BoundingSphereImpl<osg::Vec3f>}’ to non-scalar type #19

Closed 1ADZX closed 4 years ago

1ADZX commented 4 years ago

Hello, when compiling this project, I have the following information to report an error. I wonder if it's the OSG_ Ocean package updated?

for building simulation/normal_depth_map (25%) 2020-06-06 11:17:14 +0800: running make --jobserver-fds=7,8 -j in directory /home/dzx/sonar_simulation/simulation/normal_depth_map/build Scanning dependencies of target normal_depth_map [ 25%] Building CXX object src/CMakeFiles/normal_depth_map.dir/NormalDepthMap.cpp.o In file included from /home/dzx/sonar_simulation/simulation/normal_depth_map/src/NormalDepthMap.hpp:4:0, from /home/dzx/sonar_simulation/simulation/normal_depth_map/src/NormalDepthMap.cpp:1: /home/dzx/sonar_simulation/simulation/normal_depth_map/src/Tools.hpp: In member function ‘virtual void normal_depth_map::TrianglesVisitor::apply(osg::Geode&)’: /home/dzx/sonar_simulation/simulation/normal_depth_map/src/Tools.hpp:126:71: error: conversion from ‘const BoundingSphere {aka const osg::BoundingSphereImpl}’ to non-scalar type ‘osg::BoundingBox {aka osg::BoundingBoxImpl}’ requested osg::BoundingBox bb = geode.getDrawable(idx)->getBound(); ^ src/CMakeFiles/normal_depth_map.dir/build.make:62: recipe for target 'src/CMakeFiles/normal_depth_map.dir/NormalDepthMap.cpp.o' failed make[2]: [src/CMakeFiles/normal_depth_map.dir/NormalDepthMap.cpp.o] Error 1 CMakeFiles/Makefile2:149: recipe for target 'src/CMakeFiles/normal_depth_map.dir/all' failed make[1]: [src/CMakeFiles/normal_depth_map.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 Exit: pid 24398 exit 2


for building gui/osg_ocean (26%) [ 26%] Building CXX object src/osgOcean/CMakeFiles/osgOcean.dir/FFTOceanSurfaceVBO.cpp.o In file included from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/FFTOceanSurfaceVBO:21:0, from /home/dzx/sonar_simulation/gui/osg_ocean/src/osgOcean/FFTOceanSurfaceVBO.cpp:18: /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/MipmapGeometryVBO:147:26: error: invalid covariant return type for ‘virtual osg::BoundingBox osgOcean::MipmapGeometryVBO::computeBound() const’ osg::BoundingBox computeBound( void ) const; ^ In file included from /usr/local/include/osg/Geode:19:0, from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/OceanTechnique:20, from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/FFTOceanTechnique:20, from /home/dzx/sonar_simulation/gui/osg_ocean/include/osgOcean/FFTOceanSurfaceVBO:20, from /home/dzx/sonar_simulation/gui/osg_ocean/src/osgOcean/FFTOceanSurfaceVBO.cpp:18: /usr/local/include/osg/Drawable:160:32: error: overriding ‘virtual osg::BoundingSphere osg::Drawable::computeBound() const’ virtual BoundingSphere computeBound() const; ^ src/osgOcean/CMakeFiles/osgOcean.dir/build.make:158: recipe for target 'src/osgOcean/CMakeFiles/osgOcean.dir/FFTOceanSurfaceVBO.cpp.o' failed make[2]: [src/osgOcean/CMakeFiles/osgOcean.dir/FFTOceanSurfaceVBO.cpp.o] Error 1 make[2]: 正在等待未完成的任务.... CMakeFiles/Makefile2:103: recipe for target 'src/osgOcean/CMakeFiles/osgOcean.dir/all' failed make[1]: [src/osgOcean/CMakeFiles/osgOcean.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2 Exit: pid 24329 exit 2

romulogcerqueira commented 4 years ago

Hi @1ADZX,

I have never had this problem with osgOcean. Are you still have this issue?

1ADZX commented 4 years ago

Hi @1ADZX,

I have never had this problem with osgOcean. Are you still have this issue?

By not pre loading OSG, the problem has been solved