Re: [osg-users] Build problems with osgviewerFLTK (OSG 2.6.0)
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
Re: [osg-users] Build problems with osgviewerFLTK (OSG 2.6.0)
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