ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

compiler warning: parameter passing for argument X changed in GCC 7.1 (ARM)

asked 2020-11-03 13:35:01 -0500

tbondar gravatar image

updated 2020-11-04 04:34:32 -0500

gvdhoorn gravatar image

Hi, I'm getting a few of the following warning when compiling a node using geometry_msgs::Twist. Any idea what I'm doing wrong and how to get rid of it?

EDIT: Updated warning to match the source code below.

In file included from /usr/include/boost/bind.hpp:22:0,
             from /opt/ros/melodic/include/ros/publisher.h:35,
             from /opt/ros/melodic/include/ros/node_handle.h:32,
             from /opt/ros/melodic/include/ros/ros.h:45,
             from /home/odroid/marionette-ros/src/marionette_control/src/trx2_node.cpp:1:
/usr/include/boost/bind/bind.hpp: In constructor 'boost::_bi::list1<A1>::list1(A1) [with A1 = boost::reference_wrapper<const geometry_msgs::Twist_<std::allocator<void> > >]':
/usr/include/boost/bind/bind.hpp:231:14: note: parameter passing for argument of type 'boost::reference_wrapper<const geometry_msgs::Twist_<std::allocator<void> > >' changed in GCC 7.1
    explicit list1( A1 a1 ): base_type( a1 ) {}

I get multiple warnings like this, the last line being different. Further examples:

return _bi::bind_t<R, F, list_type> (f, list_type(a1));
explicit storage1( A1 a1 ): a1_( a1 ) {}

I use melodic on Ubuntu 18.04.5 on an Odroid (ARM). My compiler version:

$ gcc --version
gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0

EDIT: Stripped down source code to reproduce the issue:

#include <ros/ros.h>
#include <geometry_msgs/Twist.h>

int main (int argc, char** argv)
    ros::init(argc, argv, "trx2_node");
    ros::NodeHandle nh("~");

    ros::Publisher pub_twist;

    pub_twist = nh.advertise<geometry_msgs::Twist>("odom_vel", 10);

    geometry_msgs::Twist t;


    ros::Rate rate(100);

    while (ros::ok())
edit retag flag offensive close merge delete


we most certainly can't if you don't show us the relevant code. Please edit your question and add the source code of your trx_node.cpp (or at least the relevant parts...

mgruhler gravatar image mgruhler  ( 2020-11-04 01:07:50 -0500 )edit

@mgruhler Thanks for your comment. I've updated my post with more information. Let me know what else to add to make it more useful.

tbondar gravatar image tbondar  ( 2020-11-04 03:32:54 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2020-11-04 04:17:16 -0500

gvdhoorn gravatar image

updated 2020-11-04 05:15:56 -0500

From what I understand from What does the gcc warning “project parameter passing for X changed in GCC 7.1” mean?, this is a warning to tell you there could be (subtle) ABI incompatibilities between code compiled with GCC 7.1 and earlier versions:

That warning is telling you that there was a subtle ABI change (actually a conformance fix) between 6 and 7.1, such that libraries built with 6.x or earlier may not work properly when called from code built with 7.x (and vice-versa). As long as all your C++ code is built with GCC 7.1 or later, you can safely ignore this warning.

If you're building everything from sources, it's possible you're not affected by this (as everything would be built using the same version of GCC).

If you're using any of the binary packages provided by the ROS buildfarm (I haven't checked whether those exist for the platform you're using), you'd have to check which compiler(s)s are used by the buildfarm. Mixing and matching different versions may not work.

For completeness:


catkin_make compilation warning

this is not something specific to Catkin, or anything ROS-specific: it's a change in GCC (the compiler) which would affect everyone, regardless of whether they're compiling sources which depend on ROS or not.


Yes, I use pre-build packages built for armhf. Does this mean that I sould use an earlier compiler to match the compiler of the build farm?

If you want to avoid the potential problems mentioned in the SO answer, then yes, I do believe that's what would be one way to do it.

How can I find out what the build farm is using

This is just a guess, but I would check the build output (ie: console logs) of a recent roscpp build for your architecture to see whether there are any clues there.

Perhaps @nuclearsandwich could add something here.

and how to tell cakin_make to use a different compiler?

This is not Catkin-specific. It's all CMake. So if you figure out how to select a different compiler for CMake, you could reuse that approach with Catkin.

edit flag offensive delete link more


Yes, I use pre-build packages built for armhf. Does this mean that I sould use an earlier compiler to match the compiler of the build farm? How can I find out what the build farm is using and how to tell cakin_make to use a different compiler?

tbondar gravatar image tbondar  ( 2020-11-04 04:41:13 -0500 )edit

Seeing as you're original question was answered, could you please mark the question as answered by ticking the checkmark (✓) to the left of the answer if you feel it has been answered?

Your follow-up questions would best be discussed in a separate post here on ROS Answers.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-04 05:17:30 -0500 )edit

@gvdhoorn I'm linking one of your previous answers here as it's related to this topic and helped me to track this a bit further.

However, I'm still clueless... The package I have installed on my system is ros-melodic-roscpp-core/bionic,now 0.6.14-1bionic.20200802.024233 armhf, I think the build log for that is this one, which suggests that GCC 7.5 was used which is the same that I use locally.

tbondar gravatar image tbondar  ( 2020-11-04 06:02:02 -0500 )edit

Looks like 7.5 is indeed used.

What is it that's unclear at this point?

Are you wondering why you still see the warning?

It's not as if your GCC checks anything regarding the libraries which will be linked (in the end) to whatever you are compiling. That's the linkers job, and the warning is emitted by the compiler. The warning is just there to warn you, the human. The compiler cannot know what you will do with whatever it is compiling, nor whether it will actually be a problem, so it does what it can: emit a warning whenever it encounters something which may result in problems later on.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-04 06:16:32 -0500 )edit

Question Tools

1 follower


Asked: 2020-11-03 13:35:01 -0500

Seen: 4,294 times

Last updated: Nov 04 '20