HI Cliff,

This type of error comes from gcc now being tighter w.r.t inclusion of
C style headers so that if you want access to the functions in these
C headers you now need to explictly include them.  It's not a bug in
gcc, and not a bug in the OSG, it just one of those moving targets
that we as developers need to keep track of - and the OSG svn/trunk is
a bit further along this path so you could try updating to svn/trunk
to see if the problem is any different.

Adding cstring as an include will break the MipsPro compile so isn't
portable enough for the OSG, but including the C header will be.  I
couldn't work out precisely where you need to add a header and don't
have Suse to test against so I'll leave it to you divine what needs to
be done, one you do could post the changes to osg-submissions.

Cheers,
Robert.

On Tue, Sep 23, 2008 at 5:57 PM, Cliff Taylor <[EMAIL PROTECTED]> wrote:
> Hey guys,
>   I moved to a new development box with openSUSE 11.0 (x86_64), so I
> had to rebuild OpenSceneGraph.  This time, I decided to use ccmake and
> edit the configuration to build the documentation and support for some
> more libraries.  I ran into some trouble when it tries to build
> osgviewerFLTK.o.  I could have removed the library paths for FLTK in
> my config, but I thought it might be a build issue you'd like to know
> about.
>
> The problem seems to stem from the include/osg/Math file.  Adding
> #include <cstring> makes it build correctly on my system, but that's
> probably not completely portable.  I am building from the stable
> release 2.6.0 (zip) from the osg project page with g++-4.3 as my CXX.
>
> I also had the same problem as this posting on osg-submission, which
> manually adding Robert's changes fixed:
> http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2008-September/002216.html
>
> I assume this issue stems from the same strictness in gcc/g++.
>
> Info for debugging follows if you need it
>
> -- Cliff T.
> ----------------------------------------------------------
>
> Here's my gcc config:
> #########################################
> Using built-in specs.
> Target: x86_64-suse-linux
> Configured with: ../configure --prefix=/usr
> --with-local-prefix=/usr/local --infodir=/usr/share/info
> --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
> --enable-languages=c,c++,objc,fortran,obj-c++,java,ada
> --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3
> --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
> --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64
> --with-system-zlib --enable-__cxa_atexit
> --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
> --program-suffix=-4.3 --enable-version-specific-runtime-libs
> --enable-linux-futex --without-system-libunwind --with-cpu=generic
> --build=x86_64-suse-linux
> Thread model: posix
> gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision
> 135036] (SUSE Linux)
> ##########################################
>
> I know it's prerelease, but I don't think it's an error in gcc.
>
> Here's the compiler output for the failed build (sorry it's so long,
> but I want to be thorough):
> ######################################################################
> [ 98%] Building CXX object
> examples/osgviewerFLTK/CMakeFiles/example_osgviewerFLTK.dir/osgviewerFLTK.o
> In file included from /home/ctaylor/lib/osg/include/osg/Vec2f:17,
>                 from /home/ctaylor/lib/osg/include/osg/Vec2:17,
>                 from /home/ctaylor/lib/osg/include/osg/Array:19,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Math: In function 'float osg::round(float)':
> /home/ctaylor/lib/osg/include/osg/Math:194: error: 'floorf' was not
> declared in this scope
> /home/ctaylor/lib/osg/include/osg/Math:194: error: 'ceilf' was not
> declared in this scope
> /home/ctaylor/lib/osg/include/osg/Math: In function 'double 
> osg::round(double)':
> /home/ctaylor/lib/osg/include/osg/Math:195: error: 'floor' was not
> declared in this scope
> /home/ctaylor/lib/osg/include/osg/Math:195: error: 'ceil' was not
> declared in this scope
> /home/ctaylor/lib/osg/include/osg/Math: In function 'bool osg::isNaN(float)':
> /home/ctaylor/lib/osg/include/osg/Math:206: error: 'isnan' was not
> declared in this scope
> /home/ctaylor/lib/osg/include/osg/Math: In function 'bool osg::isNaN(double)':
> /home/ctaylor/lib/osg/include/osg/Math:207: error: 'isnan' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Vec2:17,
>                 from /home/ctaylor/lib/osg/include/osg/Array:19,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Vec2f: In member function 'float
> osg::Vec2f::length() const':
> /home/ctaylor/lib/osg/include/osg/Vec2f:147: error: 'sqrtf' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Vec3:17,
>                 from /home/ctaylor/lib/osg/include/osg/Array:20,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Vec3f: In member function 'float
> osg::Vec3f::length() const':
> /home/ctaylor/lib/osg/include/osg/Vec3f:175: error: 'sqrtf' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Vec4:17,
>                 from /home/ctaylor/lib/osg/include/osg/Array:21,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Vec4f: In member function 'float
> osg::Vec4f::length() const':
> /home/ctaylor/lib/osg/include/osg/Vec4f:211: error: 'sqrtf' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Array:22,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Vec2d: In member function 'double
> osg::Vec2d::length() const':
> /home/ctaylor/lib/osg/include/osg/Vec2d:150: error: 'sqrt' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Array:23,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Vec3d: In member function 'double
> osg::Vec3d::length() const':
> /home/ctaylor/lib/osg/include/osg/Vec3d:180: error: 'sqrt' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Array:24,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:22,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Vec4d: In member function 'double
> osg::Vec4d::length() const':
> /home/ctaylor/lib/osg/include/osg/Vec4d:215: error: 'sqrt' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Matrixd:20,
>                 from /home/ctaylor/lib/osg/include/osg/Matrix:18,
>                 from /home/ctaylor/lib/osg/include/osg/Uniform:26,
>                 from /home/ctaylor/lib/osg/include/osg/StateSet:21,
>                 from /home/ctaylor/lib/osg/include/osg/Node:19,
>                 from /home/ctaylor/lib/osg/include/osg/NodeVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:17,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Quat: In member function 'double
> osg::Quat::length() const':
> /home/ctaylor/lib/osg/include/osg/Quat:290: error: 'sqrt' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Drawable:17,
>                 from /home/ctaylor/lib/osg/include/osg/Geode:19,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:19,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/BoundingBox: In member function
> 'float osg::BoundingBox::radius() const':
> /home/ctaylor/lib/osg/include/osg/BoundingBox:120: error: 'sqrt' was
> not declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/Shape:20,
>                 from /home/ctaylor/lib/osg/include/osg/Drawable:18,
>                 from /home/ctaylor/lib/osg/include/osg/Geode:19,
>                 from /home/ctaylor/lib/osg/include/osgGA/EventVisitor:19,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:18,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/Plane: In member function 'void
> osg::Plane::makeUnitLength()':
> /home/ctaylor/lib/osg/include/osg/Plane:107: error: 'sqrt' was not
> declared in this scope
> In file included from /home/ctaylor/lib/osg/include/osg/CullStack:17,
>                 from
> /home/ctaylor/lib/osg/include/osg/CollectOccludersVisitor:18,
>                 from /home/ctaylor/lib/osg/include/osgUtil/SceneView:22,
>                 from /home/ctaylor/lib/osg/include/osgViewer/View:22,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:21,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/CullingSet: In member function
> 'float osg::CullingSet::clampedPixelSize(const osg::Vec3&, float)
> const':
> /home/ctaylor/lib/osg/include/osg/CullingSet:178: error: 'fabs' was
> not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CullingSet: In member function
> 'float osg::CullingSet::clampedPixelSize(const osg::BoundingSphere&)
> const':
> /home/ctaylor/lib/osg/include/osg/CullingSet:181: error: 'fabs' was
> not declared in this scope
> In file included from 
> /home/ctaylor/lib/osg/include/osgGA/MatrixManipulator:19,
>                 from /home/ctaylor/lib/osg/include/osgViewer/View:24,
>                 from /home/ctaylor/lib/osg/include/osgViewer/Viewer:21,
>                 from
> /home/ctaylor/lib/osg/examples/osgviewerFLTK/osgviewerFLTK.cpp:23:
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode: In member
> function 'void osg::EllipsoidModel::convertLatLongHeightToXYZ(double,
> double, double, double&, double&, double&) const':
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:148: error:
> 'sin' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:149: error:
> 'cos' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:150: error:
> 'sqrt' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode: In member
> function 'void osg::EllipsoidModel::convertXYZToLatLongHeight(double,
> double, double, double&, double&, double&) const':
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:161: error:
> 'sqrt' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:162: error:
> 'atan2' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:166: error:
> 'sin' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:167: error:
> 'cos' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:170: error:
> 'atan' was not declared in this scope
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode: In member
> function 'void 
> osg::EllipsoidModel::computeLocalToWorldTransformFromXYZ(double,
> double, double, osg::Matrixd&) const':
> /home/ctaylor/lib/osg/include/osg/CoordinateSystemNode:192: error:
> 'sqrt' was not declared in this scope
> make[2]: *** 
> [examples/osgviewerFLTK/CMakeFiles/example_osgviewerFLTK.dir/osgviewerFLTK.o]
> Error 1
> make[1]: *** [examples/osgviewerFLTK/CMakeFiles/example_osgviewerFLTK.dir/all]
> Error 2
> make: *** [all] Error 2
> ##########################################################
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to