From 583c9771ada0898dbd80cb38152eae326fa6360c Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 18 Mar 2021 07:00:59 +1000 Subject: [PATCH 1/3] Rebuild tf2_py with patch --- vinca_osx.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vinca_osx.yaml b/vinca_osx.yaml index c863434f6..404adec14 100644 --- a/vinca_osx.yaml +++ b/vinca_osx.yaml @@ -30,12 +30,13 @@ packages_select_by_deps: ## # TODO OSX ## - # - grid_map # fails with tbb-error, probably need to use cmake instead of pkg-config - - ros_numpy + # - grid_map # fails with tbb-error, probably need to use cmake instead of pkg-config. See grid-map-osx branch + - tf2_py ## # DONE OSX ## + # - ros_numpy # - velodyne_simulator # - rviz # - mavros From daf40896c936d30b4c552e0d5787225b3d9a3634 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 18 Mar 2021 07:01:57 +1000 Subject: [PATCH 2/3] Create ros-noetic-tf2-py.osx.patch --- patch/ros-noetic-tf2-py.osx.patch | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 patch/ros-noetic-tf2-py.osx.patch diff --git a/patch/ros-noetic-tf2-py.osx.patch b/patch/ros-noetic-tf2-py.osx.patch new file mode 100644 index 000000000..104a1b499 --- /dev/null +++ b/patch/ros-noetic-tf2-py.osx.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bb53f9d3..53f56f01 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,8 +88,9 @@ catkin_package( + + # Dynamic linking with tf worked OK, except for exception propagation, which failed in the unit test. + # so build with the objects directly instead. +- +-link_libraries(${PYTHON_LIBRARIES}) ++if(NOT APPLE) ++ link_libraries(${PYTHON_LIBRARIES}) ++endif() + add_library(tf2_py src/tf2_py.cpp) + target_link_libraries(tf2_py ${catkin_LIBRARIES}) + add_dependencies(tf2_py ${catkin_EXPORTED_TARGETS}) +@@ -101,6 +102,10 @@ else() + set_target_properties(tf2_py PROPERTIES COMPILE_FLAGS "-g -Wno-missing-field-initializers") + set_target_properties(tf2_py PROPERTIES OUTPUT_NAME tf2 PREFIX "_" SUFFIX ".so") + endif() ++if(APPLE) ++ set_target_properties(${PROJECT_NAME}_boost PROPERTIES ++ LINK_FLAGS "-undefined dynamic_lookup") ++endif() + set_target_properties(tf2_py PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION} + LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION} From 5849fb6c0d54683975f611512b514e0720da091d Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 18 Mar 2021 07:10:06 +1000 Subject: [PATCH 3/3] Update ros-noetic-tf2-py.osx.patch --- patch/ros-noetic-tf2-py.osx.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch/ros-noetic-tf2-py.osx.patch b/patch/ros-noetic-tf2-py.osx.patch index 104a1b499..6143e8563 100644 --- a/patch/ros-noetic-tf2-py.osx.patch +++ b/patch/ros-noetic-tf2-py.osx.patch @@ -19,7 +19,7 @@ index bb53f9d3..53f56f01 100644 set_target_properties(tf2_py PROPERTIES OUTPUT_NAME tf2 PREFIX "_" SUFFIX ".so") endif() +if(APPLE) -+ set_target_properties(${PROJECT_NAME}_boost PROPERTIES ++ set_target_properties(tf2_py PROPERTIES + LINK_FLAGS "-undefined dynamic_lookup") +endif() set_target_properties(tf2_py PROPERTIES