Ask Your Question
0

It appears that rospack compile is broke by tinyxml.h

asked 2013-01-06 04:52:21 -0500

updated 2013-01-06 06:12:00 -0500

Lorenz gravatar image

Rospack.cpp does not compile because the tinyxml.h file contains incorrect syntax for it to build. Tinyxml does build itself on the machine but when the .h file is include in /usr/local/include then rospack compile fails. The tinyxml code is the latest from SourceForge sources for it.

Failure:

==> make cmake_check_build_system in '/opt/ros/groovy/ros_catkin_ws/build_isolated/rospack'
==> make -j1 in '/opt/ros/groovy/ros_catkin_ws/build_isolated/rospack'
[ 16%] Building CXX object CMakeFiles/rospack.dir/src/rospack.cpp.o
In file included from /usr/include/python2.7/Python.h:8:0,
                 from /opt/ros/groovy/ros_catkin_ws/src/rospack/src/rospack.cpp:59:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:163:0: note: this is the location of the previous definition
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:165:0: note: this is the location of the previous definition
/opt/ros/groovy/ros_catkin_ws/src/rospack/src/rospack.cpp: In member function ‘bool rospack::Rosstackage::exports_dry_package(rospack::Stackage*, const string&, const string&, std::vector<std::basic_string<char> >&)’:
/opt/ros/groovy/ros_catkin_ws/src/rospack/src/rospack.cpp:993:57: error: no matching function for call to ‘TiXmlElement::FirstChildElement(const string&)’
/opt/ros/groovy/ros_catkin_ws/src/rospack/src/rospack.cpp:993:57: note: candidates are:
/usr/local/include/tinyxml.h:664:22: note: const TiXmlElement* TiXmlNode::FirstChildElement() const
/usr/local/include/tinyxml.h:664:22: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/tinyxml.h:665:16: note: TiXmlElement* TiXmlNode::FirstChildElement()
/usr/local/include/tinyxml.h:665:16: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/tinyxml.h:670:22: note: const TiXmlElement* TiXmlNode::FirstChildElement(const char*) const
/usr/local/include/tinyxml.h:670:22: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
/usr/local/include/tinyxml.h:671:16: note: TiXmlElement* TiXmlNode::FirstChildElement(const char*)
/usr/local/include/tinyxml.h:671:16: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
/opt/ros/groovy/ros_catkin_ws/src/rospack/src/rospack.cpp:995:45: error: no matching function for call to ‘TiXmlElement::NextSiblingElement(const string&)’
/opt/ros/groovy/ros_catkin_ws/src/rospack/src/rospack.cpp:995:45: note: candidates are:
/usr/local/include/tinyxml.h:644:22: note: const TiXmlElement* TiXmlNode::NextSiblingElement() const
/usr/local/include/tinyxml.h:644:22: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/tinyxml.h:645:16: note: TiXmlElement* TiXmlNode::NextSiblingElement()
/usr/local/include/tinyxml.h:645:16: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/tinyxml.h:653:22: note: const TiXmlElement* TiXmlNode::NextSiblingElement(const char*) const
/usr/local/include/tinyxml.h:653:22: note:   no known conversion for argument 1 

from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
/usr/local/include/tinyxml.h:654:16: note: TiXmlElement* TiXmlNode::NextSiblingElement(const char*)
/usr/local/include/tinyxml.h ...
(more)
edit retag flag offensive close merge delete

Comments

Which OS, distro, architecture?

130s gravatar image 130s  ( 2013-01-06 10:32:14 -0500 )edit

raspbain, wheezy, armv6l This is a debian release of wheezy on the Raspberry PI with Hardware Floating Point. Using the standard gcc complier system for armhf. We have fuerte working on this platform.

bobt gravatar image bobt  ( 2013-01-06 10:45:31 -0500 )edit

I finally found from your informations the libtinyxml-dev packages that needed to be added to the machine to make it all build. Thank you for the info.

bobt gravatar image bobt  ( 2013-01-07 13:18:26 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2013-01-07 00:39:50 -0500

2_socke gravatar image

updated 2013-01-07 00:50:05 -0500

There is tinyxml with std::string and without. It has to be configured during the build procedure. In the standard tinyxml.h there is also an #ifdef for this difference. So try compiling with the define -DTIXML_USE_STL. The standard tinyxml packages for ubuntu does not have this difference it is configured for usage of std::string and has a small change in the tinyxml.h so that you do not need this flag.

cf.

http://www.grinninglizard.com/tinyxmldocs/index.html

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-06 04:52:21 -0500

Seen: 1,073 times

Last updated: Jan 07 '13