m2-farzan / ros2-foxy-PKGBUILD

AUR Package for ROS 2 Foxy
1 stars 1 forks source link

`ros1_bridge` failed to compile #2

Closed elsuizo closed 3 years ago

elsuizo commented 3 years ago

Hi thanks for this package, i have only that error in ros1_bridge

 non-constant condition for static assertion
  100 |     (ros1_msg.covariance.size()) >= (ros2_msg.covariance.size()),
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsuizo/.cache/yay/ros2-foxy/src/build/ros1_bridge/generated/geometry_msgs__msg__AccelWithCovariance__factories.cpp:100:34: error: ‘ros2_msg’ is not a constant expression
m2-farzan commented 3 years ago

Hello, Martín

I haven't seen this error before. I'm trying to reproduce it and find the cause. In the meanwhile, you can help me by providing the following information:

  1. Did you already have an older version of ROS 1 or ROS 2 installed? Were they "sourced" when you attempted to install ros2-foxy package?
  2. Can you provide the full log for the failed package, including CMake logs? It should be stored somewhere like /home/elsuizo/.cache/yay/ros2-foxy/src/log/latest/ros1_bridge/streams.log. (If you can't find that file, even the full terminal output should be good but since terminal output is incomplete, please also specify if you have modified any special environment variables e.g. $CXX or $CMAKE_CXX_FLAGS)

BTW, thanks for the feedback!

P.S. If you're really in a rush, and you don't need ros1_bridge, here's a dirty workaround that I don't like: just to edit the PKGBUILD and change the build command from colcon build --merge-install to colcon build --merge-install --packages-skip ros1_bridge —luckily no other package depends on ros1_bridge.

elsuizo commented 3 years ago

Don't worry, I just wanted to try ROS2, I'm not in a rush.

  1. Yeah i have ROS1 installed in the system(they find correctly i think)
  2. here is the log: https://gist.github.com/elsuizo/0494d6a544f3c42b0d427eedd7e096a4

I think arch is very well suited to a rolling ROS distribution. Regards

m2-farzan commented 3 years ago

So after a few hours of head scratching, I found the upstream commit that was causing the problem. I've updated the PKGBUILD with instructions to revert that commit. I've also reported the problem to upstream devs (https://github.com/ros2/ros1_bridge/issues/313).

The package should work now, so please close the issue after you verify the error is fixed. Thanks.

m2-farzan commented 3 years ago

I think arch is very well suited to a rolling ROS distribution. Regards

Absolutely. I have in fact made two ROS 2 packages in AUR: This package (ros2-foxy) and the rolling package (ros2-git). You can install any one that fits your need —or both.