Skip to content

Commit

Permalink
add fastrtps patch for gettid
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Jun 20, 2024
1 parent 4ea2538 commit 696aa7d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .scripts/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ export CONDA_BLD_PATH="/opt/conda/build_artifacts"

pwd

cd ${FEEDSTOCK_ROOT}

for recipe in ${CURRENT_RECIPES[@]}; do
pixi run rattler-build build \
--recipe ${FEEDSTOCK_ROOT}/recipes/${recipe} \
-m ${FEEDSTOCK_ROOT}/.ci_support/conda_forge_pinnings.yaml \
-m ${FEEDSTOCK_ROOT}/conda_build_config.yaml \
-c robostack-jazzy -c conda-forge \
--output-dir $CONDA_BLD_PATH

# -m ${FEEDSTOCK_ROOT}/.ci_support/conda_forge_pinnings.yaml \

done

anaconda -t ${ANACONDA_API_TOKEN} upload /opt/conda/build_artifacts/linux-*/*.conda --force
30 changes: 30 additions & 0 deletions patch/ros-jazzy-fastrtps.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 72ccfb186d93c3f7ba59c30fa2b05bddd31a3432 Mon Sep 17 00:00:00 2001
From: Wade Hunkapiller <wade.hunk@gmail.com>
Date: Fri, 15 Mar 2024 11:11:09 -0500
Subject: [PATCH] Add gettid() macro to address GLIBC version comptability
(#4225)

Signed-off-by: Wade Hunkapiller <wade.hunk@gmail.com>
---
src/cpp/utils/threading/threading_pthread.ipp | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/src/cpp/utils/threading/threading_pthread.ipp b/src/cpp/utils/threading/threading_pthread.ipp
index 75ad33f2d64..252f60c775a 100644
--- a/src/cpp/utils/threading/threading_pthread.ipp
+++ b/src/cpp/utils/threading/threading_pthread.ipp
@@ -25,6 +25,14 @@
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/rtps/attributes/ThreadSettings.hpp>

+#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 30)))
+ #include <sys/syscall.h>
+ #ifndef SYS_gettid
+ #error "SYS_gettid unavailable on this system"
+ #endif
+ #define gettid() ((pid_t)syscall(SYS_gettid))
+#endif
+
namespace eprosima {

template<typename... Args>

0 comments on commit 696aa7d

Please sign in to comment.