summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Dewar2022-05-09 16:20:51 +0100
committerAlex Dewar2022-05-09 16:20:51 +0100
commit490ce228c4c82f11f48d294ef240182d6ffe6d67 (patch)
tree9e6e2eac956fff9f10bdd0f9cf78d64c5cea0cc6
parent63a935302d33e6cf1fd2ba26dfb0df65e0296184 (diff)
downloadaur-490ce228c4c82f11f48d294ef240182d6ffe6d67.tar.gz
v11.10.2
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD14
-rw-r--r--fix-for-tbb-2021.patch468
3 files changed, 7 insertions, 483 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 03167f2302f1..5b81123e52b7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gazebo
pkgdesc = A multi-robot simulator for outdoor environments
- pkgver = 11.9.1
- pkgrel = 2
+ pkgver = 11.10.2
+ pkgrel = 1
url = http://gazebosim.org/
install = gazebo.install
arch = i686
@@ -42,9 +42,7 @@ pkgbase = gazebo
optdepends = libusb: USB peripherals support
optdepends = simbody: Simbody support
optdepends = urdfdom: Load URDF files
- source = git+https://github.com/osrf/gazebo.git#tag=gazebo11_11.9.1
- source = fix-for-tbb-2021.patch
+ source = git+https://github.com/osrf/gazebo.git#tag=gazebo11_11.10.2
sha256sums = SKIP
- sha256sums = 5a185f53ad1649945c1ffcf6c61c86631bd35917547eac3b14b33ca177a4e6bb
pkgname = gazebo
diff --git a/PKGBUILD b/PKGBUILD
index 94f799d92367..570f54a46189 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,13 +7,12 @@
# Contributor: Vladimir Ermakov <vooon341@gmail.com>
pkgname=gazebo
-pkgver=11.9.1
-pkgrel=2
+pkgver=11.10.2
+pkgrel=1
pkgdesc="A multi-robot simulator for outdoor environments"
arch=('i686' 'x86_64')
url="http://gazebosim.org/"
license=('Apache')
-# See: http://www.gazebosim.org/tutorials?tut=install_from_source&cat=install
depends=('boost' 'curl' 'freeglut' 'freeimage' 'tbb' 'libccd' 'libltdl' 'graphviz'
'libtar' 'libxml2' 'ogre-1.9' 'protobuf>=2.3.0' 'sdformat-9' 'ignition-math>=6' 'ignition-transport-8'
'ignition-cmake>=2' 'ignition-common-3' 'ignition-fuel_tools-4' 'ignition-msgs-5' 'tinyxml2' 'qwt')
@@ -28,10 +27,8 @@ optdepends=('bullet: Bullet support'
'urdfdom: Load URDF files')
makedepends=('cmake' 'git' 'ninja' 'doxygen' 'ruby-ronn')
install="${pkgname}.install"
-source=("git+https://github.com/osrf/gazebo.git#tag=gazebo11_$pkgver"
- "fix-for-tbb-2021.patch")
-sha256sums=('SKIP'
- '5a185f53ad1649945c1ffcf6c61c86631bd35917547eac3b14b33ca177a4e6bb')
+source=("git+https://github.com/osrf/gazebo.git#tag=gazebo11_$pkgver")
+sha256sums=('SKIP')
prepare() {
cd "${srcdir}/${pkgname}"
@@ -42,9 +39,6 @@ prepare() {
# Gazebo's CMake package file forces projects using it to use C++11 by default
# which screws over anyone wanting to use C++14 or newer
sed -i '/-std=c++11/d' cmake/gazebo-config.cmake.in
-
- # Workaround for this issue: https://github.com/osrf/gazebo/issues/2867
- patch -p1 < ../fix-for-tbb-2021.patch
}
build() {
diff --git a/fix-for-tbb-2021.patch b/fix-for-tbb-2021.patch
deleted file mode 100644
index c0ec3f2e4791..000000000000
--- a/fix-for-tbb-2021.patch
+++ /dev/null
@@ -1,468 +0,0 @@
-diff --git a/AUTHORS b/AUTHORS
-index e8bc62efa4..31e7fedaab 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -1,2 +1,3 @@
-+Alex Dewar <alex.dewar@gmx.co.uk>
- Nate Koenig <nkoenig@osrfoundation.org>
- John Hsu <hsu@osrfoundation.org>
-diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
-index 4085b5aaeb..b57a0ad3ac 100644
---- a/cmake/SearchForStuff.cmake
-+++ b/cmake/SearchForStuff.cmake
-@@ -301,7 +301,7 @@ if (PKG_CONFIG_FOUND)
-
- #################################################
- # Find TBB
-- pkg_check_modules(TBB tbb<2021)
-+ pkg_check_modules(TBB tbb)
- set (TBB_PKG_CONFIG "tbb")
- if (NOT TBB_FOUND)
- message(STATUS "TBB not found, attempting to detect manually")
-@@ -325,6 +325,12 @@ if (PKG_CONFIG_FOUND)
- endif(tbb_library)
- endif (NOT TBB_FOUND)
- endif (NOT TBB_FOUND)
-+ set(HAVE_TBB_GREATER_OR_EQUAL_2021 OFF)
-+ if (DEFINED TBB_VERSION AND NOT ${TBB_VERSION} STREQUAL "")
-+ if (${TBB_VERSION} VERSION_GREATER_EQUAL "2021.0")
-+ set(HAVE_TBB_GREATER_OR_EQUAL_2021 ON)
-+ endif()
-+ endif()
-
- #################################################
- # Find OGRE
-diff --git a/cmake/gazebo-config.cmake.in b/cmake/gazebo-config.cmake.in
-index dccc3f2a08..c896c164de 100644
---- a/cmake/gazebo-config.cmake.in
-+++ b/cmake/gazebo-config.cmake.in
-@@ -226,3 +226,11 @@ list(APPEND @PKG_NAME@_LIBRARIES ${IGNITION-FUEL_TOOLS_LIBRARIES})
- list(APPEND @PKG_NAME@_LDFLAGS -Wl,-rpath,${GAZEBO_INSTALL_LIB_DIR}/gazebo-@GAZEBO_MAJOR_VERSION@/plugins)
- list(APPEND @PKG_NAME@_LDFLAGS -L${GAZEBO_INSTALL_LIB_DIR})
- list(APPEND @PKG_NAME@_LDFLAGS -L${GAZEBO_INSTALL_LIB_DIR}/gazebo-@GAZEBO_MAJOR_VERSION@/plugins)
-+
-+set (GAZEBO_HAS_TBB_GREATER_OR_EQUAL_2021 @HAVE_TBB_GREATER_OR_EQUAL_2021@)
-+if (GAZEBO_HAS_TBB_GREATER_OR_EQUAL_2021)
-+ find_package(TBB CONFIG)
-+ if (TARGET tbb::tbb)
-+ list(APPEND @PKG_NAME@_LIBRARIES TBB::tbb)
-+ endif ()
-+endif ()
-diff --git a/gazebo/transport/CMakeLists.txt b/gazebo/transport/CMakeLists.txt
-index 8e590207ec..a72d49ba1f 100644
---- a/gazebo/transport/CMakeLists.txt
-+++ b/gazebo/transport/CMakeLists.txt
-@@ -29,6 +29,7 @@ set (headers
- SubscribeOptions.hh
- Subscriber.hh
- SubscriptionTransport.hh
-+ TaskGroup.hh
- TopicManager.hh
- TransportIface.hh
- TransportTypes.hh
-@@ -70,6 +71,12 @@ if (WIN32)
- target_link_libraries(gazebo_transport ws2_32 Iphlpapi)
- endif()
-
-+if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
-+ link_directories(${TBB_LIBRARY_DIRS})
-+else()
-+ target_link_directories(gazebo_transport PUBLIC ${TBB_LIBRARY_DIRS})
-+endif()
-+
- if (USE_PCH)
- add_pch(gazebo_transport transport_pch.hh ${Boost_PKGCONFIG_CFLAGS} "-I${PROTOBUF_INCLUDE_DIR}" "-I${TBB_INCLUDEDIR}")
- endif()
-diff --git a/gazebo/transport/Connection.hh b/gazebo/transport/Connection.hh
-index bb48a73bfc..e36a565879 100644
---- a/gazebo/transport/Connection.hh
-+++ b/gazebo/transport/Connection.hh
-@@ -17,7 +17,16 @@
- #ifndef _CONNECTION_HH_
- #define _CONNECTION_HH_
-
-+#undef emit
- #include <tbb/task.h>
-+#define emit
-+
-+// If TBB_VERSION_MAJOR is not defined, this means that
-+// tbb >= 2021 and we can include the tbb/version.h header
-+#ifndef TBB_VERSION_MAJOR
-+#include <tbb/version.h>
-+#endif
-+
- #include <google/protobuf/message.h>
-
- #include <boost/asio.hpp>
-@@ -37,6 +46,9 @@
- #include "gazebo/common/Console.hh"
- #include "gazebo/common/Exception.hh"
- #include "gazebo/common/WeakBind.hh"
-+#if TBB_VERSION_MAJOR >= 2021
-+#include "gazebo/transport/TaskGroup.hh"
-+#endif
- #include "gazebo/util/system.hh"
-
- #define HEADER_LENGTH 8
-@@ -54,7 +66,11 @@ namespace gazebo
- /// \cond
- /// \brief A task instance that is created when data is read from
- /// a socket and used by TBB
-+#if TBB_VERSION_MAJOR < 2021
- class GZ_TRANSPORT_VISIBLE ConnectionReadTask : public tbb::task
-+#else
-+ class GZ_TRANSPORT_VISIBLE ConnectionReadTask
-+#endif
- {
- /// \brief Constructor
- /// \param[_in] _func Boost function pointer, which is the function
-@@ -68,6 +84,7 @@ namespace gazebo
- {
- }
-
-+#if TBB_VERSION_MAJOR < 2021
- /// \bried Overridden function from tbb::task that exectues the data
- /// callback.
- public: tbb::task *execute()
-@@ -75,7 +92,11 @@ namespace gazebo
- this->func(this->data);
- return NULL;
- }
--
-+#else
-+ /// \brief Execute the data callback
-+ public: void operator()() const
-+ { this->func(this->data); }
-+#endif
- /// \brief The boost function pointer
- private: boost::function<void (const std::string &)> func;
-
-@@ -310,12 +331,16 @@ namespace gazebo
-
- if (!_e && !transport::is_stopped())
- {
-+#if TBB_VERSION_MAJOR < 2021
- ConnectionReadTask *task = new(tbb::task::allocate_root())
- ConnectionReadTask(boost::get<0>(_handler), data);
- tbb::task::enqueue(*task);
-
- // Non-tbb version:
- // boost::get<0>(_handler)(data);
-+#else
-+ this->taskGroup.run<ConnectionReadTask>(boost::get<0>(_handler), data);
-+#endif
- }
- }
-
-@@ -372,7 +397,7 @@ namespace gazebo
- private: boost::asio::ip::tcp::endpoint GetRemoteEndpoint() const;
-
- /// \brief Gets hostname
-- /// \param[in] _ep The end point to get the hostename of
-+ /// \param[in] _ep The end point to get the hostname of
- private: static std::string GetHostname(
- boost::asio::ip::tcp::endpoint _ep);
-
-@@ -465,6 +490,11 @@ namespace gazebo
-
- /// \brief True if the connection is open.
- private: bool isOpen;
-+
-+#if TBB_VERSION_MAJOR >= 2021
-+ /// \brief For managing asynchronous tasks with tbb
-+ private: TaskGroup taskGroup;
-+#endif
- };
- /// \}
- }
-diff --git a/gazebo/transport/ConnectionManager.cc b/gazebo/transport/ConnectionManager.cc
-index 116c71b279..e748f892cf 100644
---- a/gazebo/transport/ConnectionManager.cc
-+++ b/gazebo/transport/ConnectionManager.cc
-@@ -27,6 +27,7 @@
- using namespace gazebo;
- using namespace transport;
-
-+#if TBB_VERSION_MAJOR < 2021
- /// TBB task to process nodes.
- class TopicManagerProcessTask : public tbb::task
- {
-@@ -37,20 +38,30 @@ class TopicManagerProcessTask : public tbb::task
- return NULL;
- }
- };
-+#endif
-
- /// TBB task to establish subscriber to publisher connection.
-+#if TBB_VERSION_MAJOR < 2021
- class TopicManagerConnectionTask : public tbb::task
-+#else
-+class TopicManagerConnectionTask
-+#endif
- {
- /// \brief Constructor.
- /// \param[in] _pub Publish message
- public: explicit TopicManagerConnectionTask(msgs::Publish _pub) : pub(_pub) {}
-
- /// Implements the necessary execute function
-+#if TBB_VERSION_MAJOR < 2021
- public: tbb::task *execute()
- {
- TopicManager::Instance()->ConnectSubToPub(pub);
- return NULL;
- }
-+#else
-+ public: void operator()() const
-+ { TopicManager::Instance()->ConnectSubToPub(pub); }
-+#endif
-
- /// \brief Publish message
- private: msgs::Publish pub;
-@@ -272,11 +283,6 @@ void ConnectionManager::RunUpdate()
- if (this->masterConn)
- this->masterConn->ProcessWriteQueue();
-
-- // Use TBB to process nodes. Need more testing to see if this makes
-- // a difference.
-- // TopicManagerProcessTask *task = new(tbb::task::allocate_root())
-- // TopicManagerProcessTask();
-- // tbb::task::enqueue(*task);
- boost::recursive_mutex::scoped_lock lock(this->connectionMutex);
-
- TopicManager::Instance()->ProcessNodes();
-@@ -401,9 +407,13 @@ void ConnectionManager::ProcessMessage(const std::string &_data)
- if (pub.host() != this->serverConn->GetLocalAddress() ||
- pub.port() != this->serverConn->GetLocalPort())
- {
-+#if TBB_VERSION_MAJOR < 2021
- TopicManagerConnectionTask *task = new(tbb::task::allocate_root())
- TopicManagerConnectionTask(pub);
- tbb::task::enqueue(*task);
-+#else
-+ this->taskGroup.run<TopicManagerConnectionTask>(pub);
-+#endif
- }
- }
- // publisher_subscribe. This occurs when we try to subscribe to a topic, and
-diff --git a/gazebo/transport/ConnectionManager.hh b/gazebo/transport/ConnectionManager.hh
-index ef80eaf876..6dc212bc13 100644
---- a/gazebo/transport/ConnectionManager.hh
-+++ b/gazebo/transport/ConnectionManager.hh
-@@ -27,8 +27,11 @@
- #include "gazebo/msgs/msgs.hh"
- #include "gazebo/common/SingletonT.hh"
-
--#include "gazebo/transport/Publisher.hh"
- #include "gazebo/transport/Connection.hh"
-+#include "gazebo/transport/Publisher.hh"
-+#if TBB_VERSION_MAJOR >= 2021
-+#include "gazebo/transport/TaskGroup.hh"
-+#endif
- #include "gazebo/util/system.hh"
-
- /// \brief Explicit instantiation for typed SingletonT.
-@@ -194,6 +197,11 @@ namespace gazebo
- /// \brief Condition used for synchronization
- private: boost::condition_variable namespaceCondition;
-
-+#if TBB_VERSION_MAJOR >= 2021
-+ /// \brief For managing asynchronous tasks with tbb
-+ private: TaskGroup taskGroup;
-+#endif
-+
- // Singleton implementation
- private: friend class SingletonT<ConnectionManager>;
- };
-diff --git a/gazebo/transport/Node.hh b/gazebo/transport/Node.hh
-index b381781fe6..7afd5f340f 100644
---- a/gazebo/transport/Node.hh
-+++ b/gazebo/transport/Node.hh
-@@ -18,14 +18,27 @@
- #ifndef GAZEBO_TRANSPORT_NODE_HH_
- #define GAZEBO_TRANSPORT_NODE_HH_
-
-+#undef emit
- #include <tbb/task.h>
-+#define emit
-+#ifndef TBB_VERSION_MAJOR
-+#include <tbb/version.h>
-+#endif
-+
-+// This fixes compiler warnings, see #3147 and #3160
-+#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
-+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
-+#endif
-+
- #include <boost/bind.hpp>
- #include <boost/enable_shared_from_this.hpp>
- #include <map>
- #include <list>
- #include <string>
- #include <vector>
--
-+#if TBB_VERSION_MAJOR >= 2021
-+#include "gazebo/transport/TaskGroup.hh"
-+#endif
- #include "gazebo/transport/TransportTypes.hh"
- #include "gazebo/transport/TopicManager.hh"
- #include "gazebo/util/system.hh"
-@@ -36,7 +49,11 @@ namespace gazebo
- {
- /// \cond
- /// \brief Task used by Node::Publish to publish on a one-time publisher
-+#if TBB_VERSION_MAJOR < 2021
- class GZ_TRANSPORT_VISIBLE PublishTask : public tbb::task
-+#else
-+ class GZ_TRANSPORT_VISIBLE PublishTask
-+#endif
- {
- /// \brief Constructor
- /// \param[in] _pub Publisher to publish the message on.
-@@ -49,16 +66,23 @@ namespace gazebo
- this->msg->CopyFrom(_message);
- }
-
-+#if TBB_VERSION_MAJOR < 2021
- /// \brief Overridden function from tbb::task that exectues the
- /// publish task.
- public: tbb::task *execute()
-+#else
-+ /// \brief Executes the publish task.
-+ public: void operator()() const
-+#endif
- {
- this->pub->WaitForConnection();
- this->pub->Publish(*this->msg, true);
- this->pub->SendMessage();
- delete this->msg;
-+#if TBB_VERSION_MAJOR < 2021
- this->pub.reset();
- return NULL;
-+#endif
- }
-
- /// \brief Pointer to the publisher.
-@@ -159,11 +183,15 @@ namespace gazebo
- const google::protobuf::Message &_message)
- {
- transport::PublisherPtr pub = this->Advertise<M>(_topic);
-+#if TBB_VERSION_MAJOR < 2021
- PublishTask *task = new(tbb::task::allocate_root())
- PublishTask(pub, _message);
-
- tbb::task::enqueue(*task);
- return;
-+#else
-+ this->taskGroup.run<PublishTask>(pub, _message);
-+#endif
- }
-
- /// \brief Advertise a topic
-@@ -419,6 +447,11 @@ namespace gazebo
- /// \brief List of newly arrive messages
- private: std::map<std::string, std::list<MessagePtr> > incomingMsgsLocal;
-
-+#if TBB_VERSION_MAJOR >= 2021
-+ /// \brief For managing asynchronous tasks with tbb
-+ private: TaskGroup taskGroup;
-+#endif
-+
- private: boost::mutex publisherMutex;
- private: boost::mutex publisherDeleteMutex;
- private: boost::recursive_mutex incomingMutex;
-diff --git a/gazebo/transport/TaskGroup.hh b/gazebo/transport/TaskGroup.hh
-new file mode 100644
-index 0000000000..b95b5d863c
---- /dev/null
-+++ b/gazebo/transport/TaskGroup.hh
-@@ -0,0 +1,47 @@
-+/*
-+ * Copyright (C) 2021 Open Source Robotics Foundation
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License.
-+ *
-+*/
-+#ifndef GAZEBO_TRANSPORT_TASKGROUP_HH_
-+#define GAZEBO_TRANSPORT_TASKGROUP_HH_
-+
-+#include <utility>
-+
-+// Emit is both a macro in Qt and a function defined by tbb
-+#undef emit
-+#include <tbb/tbb.h>
-+#define emit
-+
-+namespace gazebo {
-+ namespace transport {
-+ class TaskGroup
-+ {
-+ public: ~TaskGroup() noexcept
-+ {
-+ // Wait for running tasks to finish
-+ this->taskGroup.wait();
-+ }
-+
-+ public: template<class Functor, class... Args> void run(Args&&... args)
-+ {
-+ this->taskGroup.run(Functor(std::forward<Args>(args)...));
-+ }
-+
-+ private: tbb::task_group taskGroup;
-+ };
-+ }
-+}
-+
-+#endif
-diff --git a/gazebo/transport/transport_pch.hh b/gazebo/transport/transport_pch.hh
-index 77f4094741..22023df0b1 100644
---- a/gazebo/transport/transport_pch.hh
-+++ b/gazebo/transport/transport_pch.hh
-@@ -21,6 +21,7 @@
- * To get a starting list for this file, I use the command:
- * grep --include="*.hh" --include="*.cc" --no-filename -r "#include <" | sort -u
- */
-+
- #include <boost/algorithm/string.hpp>
- #include <boost/asio.hpp>
- #include <boost/bind.hpp>
-@@ -44,8 +45,18 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string>
-+#include <tbb/task.h>
-+#ifndef TBB_VERSION_MAJOR
-+#include <tbb/version.h>
-+#endif
-+#if TBB_VERSION_MAJOR < 2021
- #include <tbb/blocked_range.h>
- #include <tbb/parallel_for.h>
- #include <tbb/task.h>
-+#else
-+#undef emit
-+#include <tbb/tbb.h>
-+#define emit
-+#endif
- #include <utility>
- #include <vector>
-diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
-index 5f2c112105..6d09a11d0f 100644
---- a/tools/CMakeLists.txt
-+++ b/tools/CMakeLists.txt
-@@ -49,6 +49,7 @@ target_link_libraries(gz
- gazebo_gui
- gazebo_physics
- gazebo_sensors
-+ gazebo_transport
- ${Qt5Core_LIBRARIES}
- ${Qt5Widgets_LIBRARIES}
- ${Boost_LIBRARIES}