Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation against latest YARP master branch #607

Merged
merged 7 commits into from
Jan 19, 2022
Merged

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jan 18, 2022

In robotology-superbuild CI, we have problems with the idl generated files by some old YARP version when compiling with YARP 3.7 (or what will become YARP 3.7). To avoid the problem at the root, I switched to generate the idl files at each build (instead of committing them manually) and I removed the autogenerated files that at the moment were committed in the repo. This was done by just generating the idl files in the build directory instead of the source directory.

See robotology/robotology-superbuild#1000 .

@traversaro traversaro changed the title Check if compilation works against latest YARP master branch Fix compilation against latest YARP master branch Jan 18, 2022
@traversaro
Copy link
Member Author

Indeed, the CI fails with:

[  7%] Building CXX object thrift/worldinterface/CMakeFiles/gazebo_yarp_rpc_worldinterface.dir/autogenerated/src/WorldInterfaceServer.cpp.o
/home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/thrift/worldinterface/autogenerated/src/WorldInterfaceServer.cpp: In member function ‘virtual bool GazeboYarpPlugins::WorldInterfaceServer_getList_helper::read(yarp::os::ConnectionReader&)’:
/home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/thrift/worldinterface/autogenerated/src/WorldInterfaceServer.cpp:865:41: error: cannot bind non-const lvalue reference of type ‘size_t& {aka long unsigned int&}’ to an rvalue of type ‘size_t {aka long unsigned int}’
     reader.readListBegin(_etype3, _size0);
                                         ^
In file included from /home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/install/include/yarp/os/idl/BareStyle.h:10:0,
                 from /home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/install/include/yarp/os/idl/WireTypes.h:19,
                 from /home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/thrift/worldinterface/autogenerated/include/GazeboYarpPlugins/WorldInterfaceServer.h:15,
                 from /home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/thrift/worldinterface/autogenerated/src/WorldInterfaceServer.cpp:11:
/home/runner/work/gazebo-yarp-plugins/gazebo-yarp-plugins/install/include/yarp/os/idl/WireReader.h:194:10: note:   initializing argument 2 of ‘void yarp::os::idl::WireReader::readListBegin(yarp::os::idl::WireState&, size_t&)’
     void readListBegin(yarp::os::idl::WireState& nstate, size_t& len);
          ^~~~~~~~~~~~~
make[2]: *** [thrift/worldinterface/CMakeFiles/gazebo_yarp_rpc_worldinterface.dir/autogenerated/src/WorldInterfaceServer.cpp.o] Error 1
thrift/worldinterface/CMakeFiles/gazebo_yarp_rpc_worldinterface.dir/build.make:103: recipe for target 'thrift/worldinterface/CMakeFiles/gazebo_yarp_rpc_worldinterface.dir/autogenerated/src/WorldInterfaceServer.cpp.o' failed
make[1]: *** [thrift/worldinterface/CMakeFiles/gazebo_yarp_rpc_worldinterface.dir/all] Error 2
make: *** [all] Error 2
CMakeFiles/Makefile2:766: recipe for target 'thrift/worldinterface/CMakeFiles/gazebo_yarp_rpc_worldinterface.dir/all' failed
Makefile:145: recipe for target 'all' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants