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

Build issue breaking motoman/fanuc/internal drivers #274

Closed
akashjinandra opened this issue Jul 14, 2021 · 4 comments · Fixed by #275
Closed

Build issue breaking motoman/fanuc/internal drivers #274

akashjinandra opened this issue Jul 14, 2021 · 4 comments · Fixed by #275

Comments

@akashjinandra
Copy link

akashjinandra commented Jul 14, 2021

Hello, I'm running Ubuntu 18.04 with ROS Melodic, I just starting seeing an issue where the simple message/industrial core is causing issues in all of my motoman, fanuc and internal arm(ros industrial driver based) drivers.

Here is my output:

In file included from /opt/ros/melodic/include/simple_message/socket/tcp_socket.h:36:0,
                 from /opt/ros/melodic/include/simple_message/socket/tcp_client.h:36,
                 from /opt/ros/melodic/include/industrial_robot_client/joint_trajectory_interface.h:44,
                 from /opt/ros/melodic/include/industrial_robot_client/joint_trajectory_streamer.h:36,
                 from /home/akash/test_ws/src/fanuc/fanuc_driver/src/fanuc_joint_streamer_node.cpp:41:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:196:3: error: ‘sockaddr_in’ does not name a type; did you mean ‘caddr_t’?
   sockaddr_in sockaddr_;
   ^~~~~~~~~~~
   caddr_t
/opt/ros/melodic/include/simple_message/socket/simple_socket.h: In constructor ‘industrial::simple_socket::SimpleSocket::SimpleSocket()’:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:19: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                   ^~~~~~~~~
                   sock_handle_
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:46: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                                              ^~~~~~~~~
                                              sock_handle_
make[2]: *** [CMakeFiles/fanuc_driver_motion_streaming_interface_bswap.dir/src/fanuc_joint_streamer_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/fanuc_driver_motion_streaming_interface_bswap.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /opt/ros/melodic/include/simple_message/socket/tcp_socket.h:36:0,
                 from /opt/ros/melodic/include/simple_message/socket/tcp_client.h:36,
                 from /opt/ros/melodic/include/industrial_robot_client/robot_state_interface.h:41,
                 from /home/akash/test_ws/src/fanuc/fanuc_driver/src/fanuc_robot_state_node.cpp:41:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:196:3: error: ‘sockaddr_in’ does not name a type; did you mean ‘caddr_t’?
   sockaddr_in sockaddr_;
   ^~~~~~~~~~~
   caddr_t
/opt/ros/melodic/include/simple_message/socket/simple_socket.h: In constructor ‘industrial::simple_socket::SimpleSocket::SimpleSocket()’:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:19: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                   ^~~~~~~~~
                   sock_handle_
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:46: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                                              ^~~~~~~~~
                                              sock_handle_
make[2]: *** [CMakeFiles/fanuc_driver_robot_state.dir/src/fanuc_robot_state_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/fanuc_driver_robot_state.dir/all] Error 2
In file included from /opt/ros/melodic/include/simple_message/socket/tcp_socket.h:36:0,
                 from /opt/ros/melodic/include/simple_message/socket/tcp_client.h:36,
                 from /opt/ros/melodic/include/industrial_robot_client/robot_state_interface.h:41,
                 from /home/akash/test_ws/src/fanuc/fanuc_driver/src/fanuc_robot_state_node.cpp:41:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:196:3: error: ‘sockaddr_in’ does not name a type; did you mean ‘caddr_t’?
   sockaddr_in sockaddr_;
   ^~~~~~~~~~~
   caddr_t
/opt/ros/melodic/include/simple_message/socket/simple_socket.h: In constructor ‘industrial::simple_socket::SimpleSocket::SimpleSocket()’:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:19: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                   ^~~~~~~~~
                   sock_handle_
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:46: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                                              ^~~~~~~~~
                                              sock_handle_
make[2]: *** [CMakeFiles/fanuc_driver_robot_state_bswap.dir/src/fanuc_robot_state_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/fanuc_driver_robot_state_bswap.dir/all] Error 2
In file included from /opt/ros/melodic/include/simple_message/socket/tcp_socket.h:36:0,
                 from /opt/ros/melodic/include/simple_message/socket/tcp_client.h:36,
                 from /opt/ros/melodic/include/industrial_robot_client/joint_trajectory_interface.h:44,
                 from /opt/ros/melodic/include/industrial_robot_client/joint_trajectory_streamer.h:36,
                 from /home/akash/test_ws/src/fanuc/fanuc_driver/src/fanuc_joint_streamer_node.cpp:41:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:196:3: error: ‘sockaddr_in’ does not name a type; did you mean ‘caddr_t’?
   sockaddr_in sockaddr_;
   ^~~~~~~~~~~
   caddr_t
/opt/ros/melodic/include/simple_message/socket/simple_socket.h: In constructor ‘industrial::simple_socket::SimpleSocket::SimpleSocket()’:
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:19: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                   ^~~~~~~~~
                   sock_handle_
/opt/ros/melodic/include/simple_message/socket/simple_socket.h:150:46: error: ‘class industrial::simple_socket::SimpleSocket’ has no member named ‘sockaddr_’; did you mean ‘sock_handle_’?
     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
                                              ^~~~~~~~~
                                              sock_handle_
make[2]: *** [CMakeFiles/fanuc_driver_motion_streaming_interface.dir/src/fanuc_joint_streamer_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/fanuc_driver_motion_streaming_interface.dir/all] Error 2

Sorry for the big file dump, I just am not sure what I could do to fix this. I tried getting ros industrial from source on melodic devel and it still fails.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Jul 15, 2021

This is caused by #262.

This requires some updates in dependents. See ros-industrial/fanuc#324 for an example PR. Specifically ros-industrial/fanuc@37a13af.

We might actually revert that PR and reintroduce it in a noetic-devel branch.


Edit: and the fanuc builds have been fixed since ros-industrial/fanuc#324 was merged, so those should succeed now. CI seems to confirm that.

@gavanderhoorn
Copy link
Member

The reason we can't just do something like add_definitions(..) in an extras file is because simple_message and industrial_core basically export three different libraries, with two variants each (swap, non-swap).

So dependents must use the correct set of defines, otherwise they would be out-of-sync with whatever version of simple_message and industrial_robot_client they are linking against.

@gavanderhoorn
Copy link
Member

Note: I've submitted ros/rosdistro#30228, which reverts the last release on Melodic.

The buildfarm will build the old version of the packages and everyone depending on the binaries will be unbroken.

Then we'll revert #262 in melodic-devel, re-release melodic without #262.

I hate branching for different ROS versions, but in this case it doesn't seem like we have a choice.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Jul 15, 2021

Ok, instead of reverting everything, I've added some bw-compatibility to the changes that were introduced in #262, which should make things build again on systems without something like ros-industrial/fanuc#324.

@akashjinandra: could you check whether #275 fixes your builds?

It would still be better to migrate to use simple_message_DEFINITIONS et al., but we shouldn't break packages not under our control any more like this in melodic.

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

Successfully merging a pull request may close this issue.

2 participants