[Pkg-osg-devel] Bug#718381: openwalnut: Please recompile against OpenSceneGraph 3.2

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Tue Jul 30 23:00:37 UTC 2013


2013/7/30 Yaroslav Halchenko <debian at onerussian.com>:
> Thanks for the heads up
>
> so -- is it just a matter of binNMU or there was some API breakage?

There is the removal of osg::Geometry, as I said in the initial report.

This code seems to heavily use this class in many places, so I'm not
sure if this alone will be enough, or if it will fail at run time even
if it compiles.

This package fails with:

-------------------------------------------
[ 28%] Building CXX object
core/CMakeFiles/openwalnut.dir/graphicsEngine/WGEGeodeUtils.cpp.o
cd /tmp/buildd/openwalnut-1.3.1+hg5849/build/core && /usr/bin/c++
-DBOOST_FILESYSTEM_VERSION=3 -DEIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
-DEIGEN_DONT_ALIGN -DEIGEN_DONT_VECT
ORIZE -D_FORTIFY_SOURCE=2 -Dopenwalnut_EXPORTS -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -frtti -pedantic -std=c++98 -Wall -Wno-lo
ng-long -Wextra  -O3 -fPIC -I/tmp/buildd/openwalnut-1.3.1+hg5849/src
-I/tmp/buildd/openwalnut-1.3.1+hg5849/build/versionHeader
-I/usr/include/eigen3    '-DW_LIB_PREFIX="lib
"' '-DW_LIB_SUFFIX=".so"' -o
CMakeFiles/openwalnut.dir/graphicsEngine/WGEGeodeUtils.cpp.o -c
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.cpp
In file included from
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.cpp:45:0:
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.h:
In function 'osg::ref_ptr<osg::Geode>
wge::genPointBlobs(boost::shared_ptr<X>, double, const WC
olor&)':
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.h:283:33:
error: 'BIND_PER_PRIMITIVE' is not a member of 'osg::Geometry'
     geometry->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
                                 ^
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.cpp:
In function 'osg::ref_ptr<osg::Geometry> wge::createUnitCube(const
WColor&)':
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.cpp:158:29:
error: 'BIND_PER_PRIMITIVE' is not a member of 'osg::Geometry'
     cube->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
                             ^
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.cpp:
In function 'osg::ref_ptr<WGESubdividedPlane>
wge::genUnitSubdividedPlane(std::size_t, std::size_t, double)':
/tmp/buildd/openwalnut-1.3.1+hg5849/src/core/graphicsEngine/WGEGeodeUtils.cpp:585:32:
error: 'BIND_PER_PRIMITIVE' is not a member of 'osg::Geometry'
     geometry->setColorBinding( osg::Geometry::BIND_PER_PRIMITIVE );
-------------------------------------------

I tried to apply a substitution to all files,
osg::Geometry->deprecated_osg::Geometry, but still failed to compile
later, with:

-------------------------------------------
[ 87%] Building CXX object
modules/CMakeFiles/isosurface.dir/isosurface/WMIsosurface.cpp.o
cd /tmp/buildd/openwalnut-1.3.1+hg5849/build/modules && /usr/bin/c++
-DBOOST_FILESYSTEM_VERSION=3 -DEIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
-DEIGEN_DONT_ALIGN -DEIGEN_DONT_VECTORIZE -D_FORTIFY_SOURCE=2
-Disosurface_EXPORTS -g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -frtti
-pedantic -std=c++98 -Wall -Wno-long-long -Wextra  -O3 -fPIC
-I/tmp/buildd/openwalnut-1.3.1+hg5849/src
-I/tmp/buildd/openwalnut-1.3.1+hg5849/build/versionHeader
-I/usr/include/eigen3    -o
CMakeFiles/isosurface.dir/isosurface/WMIsosurface.cpp.o -c
/tmp/buildd/openwalnut-1.3.1+hg5849/src/modules/isosurface/WMIsosurface.cpp
/tmp/buildd/openwalnut-1.3.1+hg5849/src/modules/isosurface/WMIsosurface.cpp:
In member function 'void WMIsosurface::updateGraphicsCallback()':
/tmp/buildd/openwalnut-1.3.1+hg5849/src/modules/isosurface/WMIsosurface.cpp:470:113:
error: conversion from 'osg::Geometry*' to non-scalar type
'osg::ref_ptr<deprecated_osg::Geometry>' requested
         osg::ref_ptr< deprecated_osg::Geometry > surfaceGeometry =
m_surfaceGeode->getDrawable( 0 )->asGeometry();
-------------------------------------------

I think that the new osg::Geometry also supports the next two methods
that the code calls after that line, so maybe it will compile fine
without the conversion in this case.  So maybe it's possible to
convert this:

-------------------------------------------
        osg::ref_ptr< osg::Geometry > surfaceGeometry =
m_surfaceGeode->getDrawable( 0 )->asGeometry();
        surfaceGeometry->setColorArray( colors );
        surfaceGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
-------------------------------------------

into this, and it might work -- or fail later:
-------------------------------------------
        m_surfaceGeode->getDrawable( 0 )->asGeometry()->setColorArray(
colors, osg::Geometry::BIND_OVERALL );
-------------------------------------------

I attach the NMU diff so far, didn't finish compiling yet and will
have to stop now, but will continue in the next weeks as time permits.
 I had to add --parallel to debian/rules, and even then it takes quite
a lot of time to compile.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nmu-openwalnut-openscenegraph-3.2.diff
Type: application/octet-stream
Size: 84361 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-osg-devel/attachments/20130731/604b9bf4/attachment-0001.obj>


More information about the Pkg-osg-devel mailing list