Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605466 - dev-ros/kdl_parser needs -std=c++11
Summary: dev-ros/kdl_parser needs -std=c++11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robot Operating System team
URL:
Whiteboard:
Keywords: EBUILD
: 604226 605896 605954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-12 12:13 UTC by Victor Mataré
Modified: 2017-01-28 15:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixed ebuild (kdl_parser-1.12.6-r1.ebuild,666 bytes, text/plain)
2017-01-12 12:33 UTC, Victor Mataré
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Mataré 2017-01-12 12:13:57 UTC
Build fails, for example:

[ 25%] Building CXX object CMakeFiles/kdl_parser.dir/src/kdl_parser.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++  -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"kdl_parser\" -Dkdl_parser_EXPORTS -I/var/tmp/portage/dev-ros/kdl_parser-1.12.6/work/robot_model-1.12.6/kdl_parser/include -I/usr/include/eigen3 -I//usr/include -I/usr/include/xmlrpcpp   -DNDEBUG -O2 -pipe -march=native -fPIC   -o CMakeFiles/kdl_parser.dir/src/kdl_parser.cpp.o -c /var/tmp/portage/dev-ros/kdl_parser-1.12.6/work/robot_model-1.12.6/kdl_parser/src/kdl_parser.cpp
In file included from /usr/include/urdf_model/joint.h:43:0,
                 from /usr/include/urdf_model/link.h:44,
                 from /usr/include/urdf_model/model.h:42,
                 from /var/tmp/portage/dev-ros/kdl_parser-1.12.6/work/robot_model-1.12.6/kdl_parser/include/kdl_parser/kdl_parser.hpp:42,
                 from /var/tmp/portage/dev-ros/kdl_parser-1.12.6/work/robot_model-1.12.6/kdl_parser/src/kdl_parser.cpp:37:
/usr/include/urdf_model/pose.h: In member function ‘void urdf::Vector3::init(const string&)’:
/usr/include/urdf_model/pose.h:78:25: error: ‘stod’ is not a member of ‘std’
           xyz.push_back(std::stod(pieces[i]));

There's a bunch of other errors due to C++11 dependant stuff.
Comment 1 Victor Mataré 2017-01-12 12:33:03 UTC
Created attachment 459758 [details]
fixed ebuild
Comment 2 Victor Mataré 2017-01-12 16:39:36 UTC
Since many ROS packages are affected by this problem, I think it should actually be fixed in ros-catkin.eclass. So I did this:

--- /usr/portage/eclass/ros-catkin.eclass       2016-05-11 10:45:28.000000000 +0200
+++ ros-catkin.eclass   2017-01-12 17:31:55.469531376 +0100
@@ -184,6 +184,7 @@
                "$(cmake-utils_use test CATKIN_ENABLE_TESTING)"
                "-DCATKIN_BUILD_BINARY_PACKAGE=ON"
                "-DCATKIN_PREFIX_PATH=${SYSROOT:-${EROOT}}/usr"
+               "-DCMAKE_CXX_FLAGS_INIT=-std=c++11"
                "${mycatkincmakeargs[@]}"
        )
        if [ -n "${CATKIN_DO_PYTHON_MULTIBUILD}" ] ; then
Comment 3 Victor Mataré 2017-01-13 09:50:18 UTC
Turns out that dev-ros/collada_parser uses typeof() operator, so we might want to use -std=gnu++11 instead.
Comment 4 Alexis Ballier gentoo-dev 2017-01-28 15:27:51 UTC
commit c0e7c659072809089e00cf1ce582cea58158dcb2
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Sat Jan 28 16:26:36 2017 +0100

    eclass/ros-catkin.eclass: Build all ROS packages in C++11 mode.
    
    Some of them require it, all dev-ros category should have been fixed to build in C++11 mode now.
    Suggested by Victor Mataré in bug #605466, fixing all its dupes too.





Some packages failed to build in C++11 mode but should have been fixed.
Those that require C++14/gnu++11 or whatever can still override the default in src_configure.
Comment 5 Alexis Ballier gentoo-dev 2017-01-28 15:29:09 UTC
*** Bug 604226 has been marked as a duplicate of this bug. ***
Comment 6 Alexis Ballier gentoo-dev 2017-01-28 15:29:34 UTC
*** Bug 605954 has been marked as a duplicate of this bug. ***
Comment 7 Alexis Ballier gentoo-dev 2017-01-28 15:29:39 UTC
*** Bug 605896 has been marked as a duplicate of this bug. ***
Comment 8 Alexis Ballier gentoo-dev 2017-01-28 15:30:45 UTC
*** Bug 606592 has been marked as a duplicate of this bug. ***