On Fri, Jan 06, 2012 at 10:06:15AM -0600, Richard Shaw wrote:
openCOLLADA is failing to build with GCC 4.7 in rawhide and I was
hoping someone could point me in the right direction for a solution.
Below is the build log snippet.
Thanks,
Richard
---
In file included from
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/include/COLLADASWTechniqueFX.h:17:0,
from
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/src/COLLADASWTechniqueFX.cpp:12:
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/include/COLLADASWAnnotation.h:225:38:
error: no matching function for call to
'COLLADASW::Annotation::openValuesElement(const
COLLADASW::ValueType::ColladaType&) const'
^^^
It wants to call "openValuesElement() const" (which means that "this"
is
const)...
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/include/COLLADASWAnnotation.h:225:38:
note: candidate is:
In file included from
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/include/COLLADASWTechniqueFX.h:17:0,
from
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/src/COLLADASWTechniqueFX.cpp:12:
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/include/COLLADASWAnnotation.h:178:14:
note: void COLLADASW::Annotation::openValuesElement(const
COLLADASW::ValueType::ColladaType&) <near match>
... but only "openValuesElement()" is available...
/builddir/build/BUILD/openCOLLADA-svn864/COLLADAStreamWriter/include/COLLADASWAnnotation.h:178:14:
note: no known conversion for implicit 'this' parameter from 'const
COLLADASW::Annotation*' to 'COLLADASW::Annotation*'
... and there is no known conversion to get rid of the constness.
If one looks at the source, it is immediately clear where the problem
is: the Annotation::add() template is const and tries to call non-const
members. But that is nothing new in gcc 4.7--I wonder how it ever
buit before... Anyway, the attached patch should fix it.
D.