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

Building with gazebo11 fails due to tbb issues #1486

Closed
nkalupahana opened this issue May 28, 2021 · 2 comments
Closed

Building with gazebo11 fails due to tbb issues #1486

nkalupahana opened this issue May 28, 2021 · 2 comments

Comments

@nkalupahana
Copy link

I'm working on building navigation2 on macOS for Foxy, and I'm using the gazebo11 formula. When it goes to build the gazebo_ros package using files from Gazebo, however, some different errors involving tbb show up:

In file included from /Users/runner/ws/src/gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros_properties.cpp:23:
In file included from /usr/local/include/gazebo-11/gazebo/transport/Node.hh:30:
In file included from /usr/local/include/gazebo-11/gazebo/transport/TopicManager.hh:35:
In file included from /usr/local/include/gazebo-11/gazebo/transport/SubscriptionTransport.hh:24:
/usr/local/include/gazebo-11/gazebo/transport/Connection.hh:57:65: error: expected class name
    class GZ_TRANSPORT_VISIBLE ConnectionReadTask : public tbb::task
                                                                ^
/usr/local/include/gazebo-11/gazebo/transport/Connection.hh:73:20: error: no type named 'task' in namespace 'tbb'
      public: tbb::task *execute()
              ~~~~~^
/usr/local/include/gazebo-11/gazebo/transport/Connection.hh:313:61: error: no member named 'allocate_root' in namespace 'tbb::v1::task'
                  ConnectionReadTask *task = new(tbb::task::allocate_root())
                                                 ~~~~~~~~~~~^
/usr/local/include/gazebo-11/gazebo/transport/Connection.hh:315:19: error: no type named 'enqueue' in namespace 'tbb::v1::task'; did you mean 'ifqueue'?
                  tbb::task::enqueue(*task);
                  ^~~~~~~~~~~~~~~~~~
                  ifqueue
/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/net/if_var.h:230:9: note: 'ifqueue' declared here
struct  ifqueue {
        ^
In file included from /Users/runner/ws/src/gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros_properties.cpp:23:
/usr/local/include/gazebo-11/gazebo/transport/Node.hh:39:58: error: expected class name
    class GZ_TRANSPORT_VISIBLE PublishTask : public tbb::task
                                                         ^
/usr/local/include/gazebo-11/gazebo/transport/Node.hh:54:20: error: no type named 'task' in namespace 'tbb'
      public: tbb::task *execute()
              ~~~~~^
/usr/local/include/gazebo-11/gazebo/transport/Node.hh:162:52: error: no member named 'allocate_root' in namespace 'tbb::v1::task'
                PublishTask *task = new(tbb::task::allocate_root())
                                        ~~~~~~~~~~~^
/usr/local/include/gazebo-11/gazebo/transport/Node.hh:165:17: error: no type named 'enqueue' in namespace 'tbb::v1::task'; did you mean 'ifqueue'?
                tbb::task::enqueue(*task);
                ^~~~~~~~~~~~~~~~~~
                ifqueue
/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/net/if_var.h:230:9: note: 'ifqueue' declared here
struct  ifqueue {
        ^
8 errors generated.

Since I'm doing this on GitHub Actions, the full run logs can be viewed at https://github.com/nkalupahana/ros2-foxy-macos/runs/2691418249?check_suite_focus=true.

Any idea what's going on? I have a feeling this might have something to do with the new tbb@20202_U3 formula integration, but I'm not sure.

@scpeters
Copy link
Member

yes, we have to set some additional environment variables in our CI to compile gazebo against the proper version of tbb (gazebo-tooling/release-tools#466):

export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/usr/local/opt/tbb@2020_u3
export CPATH=${CPATH}:/usr/local/opt/tbb@2020_u3/include
export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/tbb@2020_u3/lib

@nkalupahana
Copy link
Author

It worked! Thanks so much.

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

No branches or pull requests

2 participants