From 82391275dbfedbb6f289e9553dee09314fe401bb Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 08:16:40 +1000 Subject: [PATCH 01/21] Trigger windows builds --- vinca_win.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/vinca_win.yaml b/vinca_win.yaml index ce5421359..fdebdd753 100644 --- a/vinca_win.yaml +++ b/vinca_win.yaml @@ -49,3 +49,4 @@ packages_select_by_deps: - ros_workspace patch_dir: patch + From 695b5427223f94bf439e15ca03e06c88f93b7389 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 08:20:39 +1000 Subject: [PATCH 02/21] Fix --- .github/workflows/testpr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 8fac6ca91..9cca185da 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -167,5 +167,5 @@ jobs: shell: bash -l {0} if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' run: | - $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing - $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing + $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing + $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing From ca01ad27f79ab5c8ddad36583117199cdc8bcf2d Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 08:30:57 +1000 Subject: [PATCH 03/21] Use vs2019 --- conda_build_config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conda_build_config.yaml b/conda_build_config.yaml index dc3164ea5..02df9d3a3 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -15,6 +15,11 @@ python: python_impl: - cpython +c_compiler: + - ${{ "vs2019" if win }} +cxx_compiler: + - ${{ "vs2019" if win }} + c_stdlib: - ${{ "sysroot" if linux }} - ${{ "macosx_deployment_target" if osx }} From 0e278beca60a3f15df1e2ce3d645d598bede2a44 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 08:47:13 +1000 Subject: [PATCH 04/21] Fix --- patch/ros-jazzy-ros-workspace.patch | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 patch/ros-jazzy-ros-workspace.patch diff --git a/patch/ros-jazzy-ros-workspace.patch b/patch/ros-jazzy-ros-workspace.patch new file mode 100644 index 000000000..9a5a630cf --- /dev/null +++ b/patch/ros-jazzy-ros-workspace.patch @@ -0,0 +1,64 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 99c9e2d..ff702be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,18 +3,25 @@ project(ros_workspace NONE) + + find_package(ament_cmake_core REQUIRED) + +-# Collect current python 3 version +-execute_process(COMMAND python3 -c "from distutils import sysconfig; print(sysconfig.get_python_version())" OUTPUT_VARIABLE PYTHON_MAJOR_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) ++find_package (Python COMPONENTS Interpreter Development) + + # Locate ament_package template files. + if(WIN32) + set(PYTHON_INSTALL_DIR "lib/site-packages") + set(SHELL_EXT "bat") + else() +- set(PYTHON_INSTALL_DIR "lib/python${PYTHON_MAJOR_MINOR}/site-packages") ++ set(PYTHON_INSTALL_DIR "lib/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}/site-packages") + set(SHELL_EXT "sh") + endif() +-set(AMENT_PACKAGE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") ++set(AMENT_PACKAGE_DIR "${Python_SITELIB}/ament_package") ++ ++if(NOT EXISTS "${AMENT_PACKAGE_DIR}" AND "$ENV{CONDA_BUILD_CROSS_COMPILATION}" EQUAL "1") ++ message(WARNING "Could not find '${AMENT_PACKAGE_DIR}'. Replace '$ENV{PREFIX}' with '$ENV{BUILD_PREFIX}'.") ++ string(REPLACE "$ENV{PREFIX}" "$ENV{BUILD_PREFIX}" AMENT_PACKAGE_DIR_REP ${AMENT_PACKAGE_DIR}) ++ set(AMENT_PACKAGE_DIR "${AMENT_PACKAGE_DIR_REP}") ++ message(WARNING "Now try '${AMENT_PACKAGE_DIR}'.") ++endif() ++ + if(NOT EXISTS "${AMENT_PACKAGE_DIR}") + # Check for an .egg-link file and use the listed directory if it exists + get_filename_component(AMENT_PACKAGE_EGG_LINK "${AMENT_PACKAGE_DIR}" DIRECTORY) +@@ -39,28 +46,7 @@ set( + "prepend-non-duplicate;PYTHONPATH;${PYTHON_INSTALL_DIR}") + + # Set environment hooks for default environment. +-if(WIN32) +- ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") +-else() +- set(LIBRARY_PATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/library_path.${SHELL_EXT}") +- # enable C language so that a trycompile can determine what the +- # anticipated libdir will be. +- enable_language(C) +- include(GNUInstallDirs) +- if(NOT ${CMAKE_INSTALL_LIBDIR} STREQUAL "lib") +- # register multiarch information for .dsv generation +- if(APPLE) +- set(LIBRARY_PATH_ENV_VAR "DYLD_LIBRARY_PATH") +- else() +- set(LIBRARY_PATH_ENV_VAR "LD_LIBRARY_PATH") +- endif() +- set( +- AMENT_CMAKE_ENVIRONMENT_HOOKS_DESC_multiarch_library_paths +- "prepend-non-duplicate;${LIBRARY_PATH_ENV_VAR};${CMAKE_INSTALL_LIBDIR}") +- set(MULTIARCH_LIBRARY_PATH_HOOK "env-hooks/multiarch_library_paths.sh.in") +- endif() +- ament_environment_hooks("${BINARY_PATH_HOOK}" "${LIBRARY_PATH_HOOK}" "${PYTHONPATH_HOOK}" ${MULTIARCH_LIBRARY_PATH_HOOK}) +-endif() ++ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") + + # skip using ament_index/resource_index/parent_prefix_path + # if for Debian packages it is known that there are no underlays From b15d321e2dfff4e2b40602e936f48be1cbae84a3 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 08:56:27 +1000 Subject: [PATCH 05/21] Fix --- patch/ros-jazzy-ros-workspace.patch | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/patch/ros-jazzy-ros-workspace.patch b/patch/ros-jazzy-ros-workspace.patch index 9a5a630cf..548579ada 100644 --- a/patch/ros-jazzy-ros-workspace.patch +++ b/patch/ros-jazzy-ros-workspace.patch @@ -1,22 +1,18 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 99c9e2d..ff702be 100644 +index f2ed31b..50b5843 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -3,18 +3,25 @@ project(ros_workspace NONE) - +@@ -4,7 +4,7 @@ project(ros_workspace NONE) find_package(ament_cmake_core REQUIRED) --# Collect current python 3 version + # Collect current python 3 version -execute_process(COMMAND python3 -c "from distutils import sysconfig; print(sysconfig.get_python_version())" OUTPUT_VARIABLE PYTHON_MAJOR_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) +find_package (Python COMPONENTS Interpreter Development) # Locate ament_package template files. if(WIN32) - set(PYTHON_INSTALL_DIR "lib/site-packages") - set(SHELL_EXT "bat") - else() -- set(PYTHON_INSTALL_DIR "lib/python${PYTHON_MAJOR_MINOR}/site-packages") -+ set(PYTHON_INSTALL_DIR "lib/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}/site-packages") +@@ -14,7 +14,15 @@ else() + set(PYTHON_INSTALL_DIR "lib/python${PYTHON_MAJOR_MINOR}/site-packages") set(SHELL_EXT "sh") endif() -set(AMENT_PACKAGE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") @@ -32,12 +28,12 @@ index 99c9e2d..ff702be 100644 if(NOT EXISTS "${AMENT_PACKAGE_DIR}") # Check for an .egg-link file and use the listed directory if it exists get_filename_component(AMENT_PACKAGE_EGG_LINK "${AMENT_PACKAGE_DIR}" DIRECTORY) -@@ -39,28 +46,7 @@ set( +@@ -38,28 +46,7 @@ set( "prepend-non-duplicate;PYTHONPATH;${PYTHON_INSTALL_DIR}") # Set environment hooks for default environment. -if(WIN32) -- ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") +- ament_environment_hooks("${PYTHONPATH_HOOK}") -else() - set(LIBRARY_PATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/library_path.${SHELL_EXT}") - # enable C language so that a trycompile can determine what the @@ -56,9 +52,9 @@ index 99c9e2d..ff702be 100644 - "prepend-non-duplicate;${LIBRARY_PATH_ENV_VAR};${CMAKE_INSTALL_LIBDIR}") - set(MULTIARCH_LIBRARY_PATH_HOOK "env-hooks/multiarch_library_paths.sh.in") - endif() -- ament_environment_hooks("${BINARY_PATH_HOOK}" "${LIBRARY_PATH_HOOK}" "${PYTHONPATH_HOOK}" ${MULTIARCH_LIBRARY_PATH_HOOK}) +- ament_environment_hooks("${LIBRARY_PATH_HOOK}" "${PYTHONPATH_HOOK}" ${MULTIARCH_LIBRARY_PATH_HOOK}) -endif() +ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") # skip using ament_index/resource_index/parent_prefix_path - # if for Debian packages it is known that there are no underlays + # if for Debian packages it is known that there are no underlays \ No newline at end of file From 0645963f936304cb223d3efabf2e2c2890dcae4a Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 09:49:28 +1000 Subject: [PATCH 06/21] Update ros-jazzy-ros-workspace.patch --- patch/ros-jazzy-ros-workspace.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patch/ros-jazzy-ros-workspace.patch b/patch/ros-jazzy-ros-workspace.patch index 548579ada..7d05c9cad 100644 --- a/patch/ros-jazzy-ros-workspace.patch +++ b/patch/ros-jazzy-ros-workspace.patch @@ -57,4 +57,5 @@ index f2ed31b..50b5843 100644 +ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") # skip using ament_index/resource_index/parent_prefix_path - # if for Debian packages it is known that there are no underlays \ No newline at end of file + # if for Debian packages it is known that there are no underlays + From 50c50b948f8b571497732646001cd926926b6a92 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 11:38:29 +1000 Subject: [PATCH 07/21] Pull in iceoryx patches from ros-humble --- patch/ros-jazzy-iceoryx-binding-c.win.patch | 15 ++++++++++++ patch/ros-jazzy-iceoryx-dds.win.patch | 15 ++++++++++++ patch/ros-jazzy-iceoryx-hoofs.win.patch | 27 +++++++++++++++++++++ patch/ros-jazzy-iceoryx-posh.win.patch | 27 +++++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 patch/ros-jazzy-iceoryx-binding-c.win.patch create mode 100644 patch/ros-jazzy-iceoryx-dds.win.patch create mode 100644 patch/ros-jazzy-iceoryx-hoofs.win.patch create mode 100644 patch/ros-jazzy-iceoryx-posh.win.patch diff --git a/patch/ros-jazzy-iceoryx-binding-c.win.patch b/patch/ros-jazzy-iceoryx-binding-c.win.patch new file mode 100644 index 000000000..afdab9d59 --- /dev/null +++ b/patch/ros-jazzy-iceoryx-binding-c.win.patch @@ -0,0 +1,15 @@ +diff --git a/iceoryx_binding_c/CMakeLists.txt b/iceoryx_binding_c/CMakeLists.txt +index 048a6ea5a..78ff815fa 100644 +--- a/iceoryx_binding_c/CMakeLists.txt ++++ b/iceoryx_binding_c/CMakeLists.txt +@@ -16,6 +16,10 @@ + # SPDX-License-Identifier: Apache-2.0 + cmake_minimum_required(VERSION 3.16) + ++if(WIN32) ++ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) ++endif() ++ + set(IOX_VERSION_STRING "2.0.5") + + diff --git a/patch/ros-jazzy-iceoryx-dds.win.patch b/patch/ros-jazzy-iceoryx-dds.win.patch new file mode 100644 index 000000000..78ee8b6d2 --- /dev/null +++ b/patch/ros-jazzy-iceoryx-dds.win.patch @@ -0,0 +1,15 @@ +diff --git a/iceoryx_dds/CMakeLists.txt b/iceoryx_dds/CMakeLists.txt +index ae1f9f83f..e79873a72 100644 +--- a/iceoryx_dds/CMakeLists.txt ++++ b/iceoryx_dds/CMakeLists.txt +@@ -16,6 +16,10 @@ + # SPDX-License-Identifier: Apache-2.0 + cmake_minimum_required(VERSION 3.16) + ++if(WIN32) ++ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) ++endif() ++ + set(IOX_VERSION_STRING "2.0.5") + + project(iceoryx_dds VERSION ${IOX_VERSION_STRING}) diff --git a/patch/ros-jazzy-iceoryx-hoofs.win.patch b/patch/ros-jazzy-iceoryx-hoofs.win.patch new file mode 100644 index 000000000..d235dd862 --- /dev/null +++ b/patch/ros-jazzy-iceoryx-hoofs.win.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8afdbb5e8..cf66ba0ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,10 @@ + + cmake_minimum_required(VERSION 3.16) + ++if(WIN32) ++ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) ++endif() ++ + set(IOX_VERSION_STRING "2.0.5") + + project(iceoryx_hoofs VERSION ${IOX_VERSION_STRING}) + +diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in +index c03b3b564b..2229930efb 100644 +--- a/cmake/Config.cmake.in ++++ b/cmake/Config.cmake.in +@@ -19,5 +19,5 @@ + include(CMakeFindDependencyMacro) + + include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +-list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/@DESTINATION_CONFIGDIR@") ++list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + check_required_components("@PROJECT_NAME@") diff --git a/patch/ros-jazzy-iceoryx-posh.win.patch b/patch/ros-jazzy-iceoryx-posh.win.patch new file mode 100644 index 000000000..739877a0a --- /dev/null +++ b/patch/ros-jazzy-iceoryx-posh.win.patch @@ -0,0 +1,27 @@ +diff --git a/iceoryx_posh/CMakeLists.txt b/iceoryx_posh/CMakeLists.txt +index 57e84cdd0..d7781cbb9 100644 +--- a/iceoryx_posh/CMakeLists.txt ++++ b/iceoryx_posh/CMakeLists.txt +@@ -16,6 +16,10 @@ + # SPDX-License-Identifier: Apache-2.0 + cmake_minimum_required(VERSION 3.16) + ++if(WIN32) ++ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) ++endif() ++ + set(IOX_VERSION_STRING "2.0.5") + + project(iceoryx_posh VERSION ${IOX_VERSION_STRING}) + +diff --git a/iceoryx_posh/cmake/Config.cmake.in b/iceoryx_posh/cmake/Config.cmake.in +index 0f74ce4f6b..1de0093d3b 100644 +--- a/iceoryx_posh/cmake/Config.cmake.in ++++ b/iceoryx_posh/cmake/Config.cmake.in +@@ -22,5 +22,5 @@ include(CMakeFindDependencyMacro) + find_dependency(iceoryx_hoofs) + + include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +-list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/@DESTINATION_CONFIGDIR@") ++list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + check_required_components("@PROJECT_NAME@") From b613a2011f98e5da1fce1202bf86634baea58388 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 12:37:36 +1000 Subject: [PATCH 08/21] Update patches --- patch/ros-jazzy-iceoryx-binding-c.win.patch | 22 +++++++------- patch/ros-jazzy-iceoryx-dds.win.patch | 2 +- patch/ros-jazzy-iceoryx-hoofs.win.patch | 32 ++++++--------------- patch/ros-jazzy-iceoryx-posh.win.patch | 19 ++++++------ 4 files changed, 28 insertions(+), 47 deletions(-) diff --git a/patch/ros-jazzy-iceoryx-binding-c.win.patch b/patch/ros-jazzy-iceoryx-binding-c.win.patch index afdab9d59..35404a3e2 100644 --- a/patch/ros-jazzy-iceoryx-binding-c.win.patch +++ b/patch/ros-jazzy-iceoryx-binding-c.win.patch @@ -1,15 +1,13 @@ -diff --git a/iceoryx_binding_c/CMakeLists.txt b/iceoryx_binding_c/CMakeLists.txt -index 048a6ea5a..78ff815fa 100644 ---- a/iceoryx_binding_c/CMakeLists.txt -+++ b/iceoryx_binding_c/CMakeLists.txt -@@ -16,6 +16,10 @@ - # SPDX-License-Identifier: Apache-2.0 - cmake_minimum_required(VERSION 3.16) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7863ddb..5f361df 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,6 +32,8 @@ include(IceoryxPoshDeployment) -+if(WIN32) + if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin) + option(BUILD_SHARED_LIBS "Create shared libraries by default" ON) ++else() + set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) -+endif() -+ - set(IOX_VERSION_STRING "2.0.5") - + endif() + set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) diff --git a/patch/ros-jazzy-iceoryx-dds.win.patch b/patch/ros-jazzy-iceoryx-dds.win.patch index 78ee8b6d2..86453fd4f 100644 --- a/patch/ros-jazzy-iceoryx-dds.win.patch +++ b/patch/ros-jazzy-iceoryx-dds.win.patch @@ -10,6 +10,6 @@ index ae1f9f83f..e79873a72 100644 + set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) +endif() + - set(IOX_VERSION_STRING "2.0.5") + set(IOX_VERSION_STRING "2.0.6") project(iceoryx_dds VERSION ${IOX_VERSION_STRING}) diff --git a/patch/ros-jazzy-iceoryx-hoofs.win.patch b/patch/ros-jazzy-iceoryx-hoofs.win.patch index d235dd862..31439a33a 100644 --- a/patch/ros-jazzy-iceoryx-hoofs.win.patch +++ b/patch/ros-jazzy-iceoryx-hoofs.win.patch @@ -1,27 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8afdbb5e8..cf66ba0ea 100644 +index f7cb43b..115964a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,6 +17,10 @@ - - cmake_minimum_required(VERSION 3.16) - -+if(WIN32) +@@ -26,6 +26,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/cmake/IceoryxPlatform.cmake") + + if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin) + option(BUILD_SHARED_LIBS "Create shared libraries by default" ON) ++else() + set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) -+endif() -+ - set(IOX_VERSION_STRING "2.0.5") - - project(iceoryx_hoofs VERSION ${IOX_VERSION_STRING}) - -diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in -index c03b3b564b..2229930efb 100644 ---- a/cmake/Config.cmake.in -+++ b/cmake/Config.cmake.in -@@ -19,5 +19,5 @@ - include(CMakeFindDependencyMacro) - - include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") --list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/@DESTINATION_CONFIGDIR@") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") - check_required_components("@PROJECT_NAME@") + endif() + + set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) diff --git a/patch/ros-jazzy-iceoryx-posh.win.patch b/patch/ros-jazzy-iceoryx-posh.win.patch index 739877a0a..b3fe98d60 100644 --- a/patch/ros-jazzy-iceoryx-posh.win.patch +++ b/patch/ros-jazzy-iceoryx-posh.win.patch @@ -2,18 +2,15 @@ diff --git a/iceoryx_posh/CMakeLists.txt b/iceoryx_posh/CMakeLists.txt index 57e84cdd0..d7781cbb9 100644 --- a/iceoryx_posh/CMakeLists.txt +++ b/iceoryx_posh/CMakeLists.txt -@@ -16,6 +16,10 @@ - # SPDX-License-Identifier: Apache-2.0 - cmake_minimum_required(VERSION 3.16) - -+if(WIN32) +@@ -42,6 +42,8 @@ include(cmake/IceoryxPoshDeployment.cmake) + + if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin) + option(BUILD_SHARED_LIBS "Create shared libraries by default" ON) ++else() + set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) -+endif() -+ - set(IOX_VERSION_STRING "2.0.5") - - project(iceoryx_posh VERSION ${IOX_VERSION_STRING}) - + endif() + + set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) diff --git a/iceoryx_posh/cmake/Config.cmake.in b/iceoryx_posh/cmake/Config.cmake.in index 0f74ce4f6b..1de0093d3b 100644 --- a/iceoryx_posh/cmake/Config.cmake.in From e17d848fa8ed25f96bd1d5849e2f45e0e5c7c5cc Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 6 Jan 2025 21:40:12 +1000 Subject: [PATCH 09/21] Update ros-jazzy-iceoryx-posh.win.patch --- patch/ros-jazzy-iceoryx-posh.win.patch | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/patch/ros-jazzy-iceoryx-posh.win.patch b/patch/ros-jazzy-iceoryx-posh.win.patch index b3fe98d60..f6d620768 100644 --- a/patch/ros-jazzy-iceoryx-posh.win.patch +++ b/patch/ros-jazzy-iceoryx-posh.win.patch @@ -22,3 +22,45 @@ index 0f74ce4f6b..1de0093d3b 100644 -list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/@DESTINATION_CONFIGDIR@") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") check_required_components("@PROJECT_NAME@") +diff --git a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in +index f51b630473..d7f5ee7c69 100644 +--- a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in ++++ b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in +@@ -29,4 +29,6 @@ ExternalProject_Add(ext_cpptoml + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" ++ PATCH_COMMAND ++ patch -p1 --forward --ignore-whitespace --fuzz=3 --input="${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" --directory="${SOURCE_DIR}" + ) +diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt +index e770e4fdba..b3ab7c8aca 100644 +--- a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt ++++ b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt +@@ -74,26 +74,6 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE) + set(cpptoml_DIR ${cpptoml_DIR} CACHE PATH "" FORCE) + endif() + +-execute_process( +- COMMAND git apply -R -p1 --ignore-space-change --whitespace=nowarn --check +- INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" +- WORKING_DIRECTORY "${SOURCE_DIR}" +- OUTPUT_QUIET +- ERROR_QUIET +- RESULT_VARIABLE result) +-if(result) +- message(STATUS "Applying patch for minimal cmake version to cpptoml") +- +- execute_process( +- COMMAND git apply -p1 --ignore-space-change --whitespace=nowarn +- INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" +- WORKING_DIRECTORY "${SOURCE_DIR}" +- RESULT_VARIABLE result) +- if(result) +- message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!") +- endif() +-endif() +- + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "-DENABLE_LIBCXX=off" "-DCPPTOML_BUILD_EXAMPLES=off" "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" "${SOURCE_DIR}" ${CMAKE_ADDITIONAL_OPTIONS} + RESULT_VARIABLE result + WORKING_DIRECTORY ${BUILD_DIR} ) From 9c5d892af45daacfefc88963ad9dd559620b59e6 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 09:37:06 +1000 Subject: [PATCH 10/21] Update ros-jazzy-iceoryx-posh.win.patch --- patch/ros-jazzy-iceoryx-posh.win.patch | 27 +++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/patch/ros-jazzy-iceoryx-posh.win.patch b/patch/ros-jazzy-iceoryx-posh.win.patch index f6d620768..bf067686e 100644 --- a/patch/ros-jazzy-iceoryx-posh.win.patch +++ b/patch/ros-jazzy-iceoryx-posh.win.patch @@ -23,15 +23,36 @@ index 0f74ce4f6b..1de0093d3b 100644 +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") check_required_components("@PROJECT_NAME@") diff --git a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -index f51b630473..d7f5ee7c69 100644 +index f51b630473..04aa38fc72 100644 --- a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in +++ b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -@@ -29,4 +29,6 @@ ExternalProject_Add(ext_cpptoml +@@ -20,13 +20,25 @@ cmake_minimum_required(VERSION 3.16) + project(cpptoml-download NONE) + + include(ExternalProject) ++ ++# Convert paths to CMake-compatible format for cross-platform support ++file(TO_CMAKE_PATH "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src" SOURCE_DIR) ++file(TO_CMAKE_PATH "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build" BINARY_DIR) ++file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" PATCH_FILE) ++ ++message(STATUS "Source directory: ${SOURCE_DIR}") ++message(STATUS "Binary directory: ${BINARY_DIR}") ++message(STATUS "Patch file: ${PATCH_FILE}") ++ + ExternalProject_Add(ext_cpptoml + GIT_REPOSITORY https://github.com/skystrife/cpptoml.git + GIT_TAG v0.1.1 +- SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src" +- BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build" ++ SOURCE_DIR "${SOURCE_DIR}" ++ BINARY_DIR "${BINARY_DIR}" + CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" + PATCH_COMMAND -+ patch -p1 --forward --ignore-whitespace --fuzz=3 --input="${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" --directory="${SOURCE_DIR}" ++ patch -p1 --forward --ignore-whitespace --fuzz=3 --input="${PATCH_FILE}" --directory="${SOURCE_DIR}" ) diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt index e770e4fdba..b3ab7c8aca 100644 From 05e8e0ed045b1e2d0ab54b883ec6a3a3b1b1aa94 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 11:44:01 +1000 Subject: [PATCH 11/21] Update ros-jazzy-iceoryx-posh.win.patch --- patch/ros-jazzy-iceoryx-posh.win.patch | 37 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/patch/ros-jazzy-iceoryx-posh.win.patch b/patch/ros-jazzy-iceoryx-posh.win.patch index bf067686e..3c22bc6a3 100644 --- a/patch/ros-jazzy-iceoryx-posh.win.patch +++ b/patch/ros-jazzy-iceoryx-posh.win.patch @@ -23,36 +23,49 @@ index 0f74ce4f6b..1de0093d3b 100644 +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") check_required_components("@PROJECT_NAME@") diff --git a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -index f51b630473..04aa38fc72 100644 +index f51b630473..2962762734 100644 --- a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in +++ b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -@@ -20,13 +20,25 @@ cmake_minimum_required(VERSION 3.16) +@@ -20,13 +20,38 @@ cmake_minimum_required(VERSION 3.16) project(cpptoml-download NONE) include(ExternalProject) + -+# Convert paths to CMake-compatible format for cross-platform support -+file(TO_CMAKE_PATH "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src" SOURCE_DIR) -+file(TO_CMAKE_PATH "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build" BINARY_DIR) -+file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" PATCH_FILE) ++# Ensure proper paths ++set(SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src") ++set(BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build") ++set(PATCH_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch") + -+message(STATUS "Source directory: ${SOURCE_DIR}") -+message(STATUS "Binary directory: ${BINARY_DIR}") -+message(STATUS "Patch file: ${PATCH_FILE}") ++# Convert paths to forward slashes for Windows compatibility ++file(TO_CMAKE_PATH "${SOURCE_DIR}" SOURCE_DIR_FIXED) ++file(TO_CMAKE_PATH "${BINARY_DIR}" BINARY_DIR_FIXED) ++file(TO_CMAKE_PATH "${PATCH_FILE}" PATCH_FILE_FIXED) + ++# Debugging messages ++message(STATUS "Resolved source directory: ${SOURCE_DIR_FIXED}") ++message(STATUS "Resolved binary directory: ${BINARY_DIR_FIXED}") ++message(STATUS "Resolved patch file: ${PATCH_FILE_FIXED}") ++ ++# Validate paths to ensure they are correctly resolved ++if(NOT EXISTS "${PATCH_FILE_FIXED}") ++ message(FATAL_ERROR "Patch file does not exist: ${PATCH_FILE_FIXED}") ++endif() ++ ++# External project setup ExternalProject_Add(ext_cpptoml GIT_REPOSITORY https://github.com/skystrife/cpptoml.git GIT_TAG v0.1.1 - SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src" - BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build" -+ SOURCE_DIR "${SOURCE_DIR}" -+ BINARY_DIR "${BINARY_DIR}" ++ SOURCE_DIR "${SOURCE_DIR_FIXED}" ++ BINARY_DIR "${BINARY_DIR_FIXED}" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" + PATCH_COMMAND -+ patch -p1 --forward --ignore-whitespace --fuzz=3 --input="${PATCH_FILE}" --directory="${SOURCE_DIR}" ++ ${CMAKE_COMMAND} -E echo "Applying patch to cpptoml..." && ++ ${CMAKE_COMMAND} -E env bash -c "patch -p1 --forward --ignore-whitespace --fuzz=3 --input=\"${PATCH_FILE_FIXED}\" --directory=\"${SOURCE_DIR_FIXED}\"" ) diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt index e770e4fdba..b3ab7c8aca 100644 From ce225cf6f8e938cf8e3fd1e9527b28249b6e8730 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 11:56:03 +1000 Subject: [PATCH 12/21] Update ros-jazzy-iceoryx-posh.win.patch --- patch/ros-jazzy-iceoryx-posh.win.patch | 80 ++++---------------------- 1 file changed, 12 insertions(+), 68 deletions(-) diff --git a/patch/ros-jazzy-iceoryx-posh.win.patch b/patch/ros-jazzy-iceoryx-posh.win.patch index 3c22bc6a3..2a0969e5e 100644 --- a/patch/ros-jazzy-iceoryx-posh.win.patch +++ b/patch/ros-jazzy-iceoryx-posh.win.patch @@ -11,80 +11,24 @@ index 57e84cdd0..d7781cbb9 100644 endif() set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) -diff --git a/iceoryx_posh/cmake/Config.cmake.in b/iceoryx_posh/cmake/Config.cmake.in -index 0f74ce4f6b..1de0093d3b 100644 ---- a/iceoryx_posh/cmake/Config.cmake.in -+++ b/iceoryx_posh/cmake/Config.cmake.in -@@ -22,5 +22,5 @@ include(CMakeFindDependencyMacro) - find_dependency(iceoryx_hoofs) - - include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") --list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/@DESTINATION_CONFIGDIR@") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") - check_required_components("@PROJECT_NAME@") -diff --git a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -index f51b630473..2962762734 100644 ---- a/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -+++ b/iceoryx_posh/cmake/cpptoml/cpptoml.cmake.in -@@ -20,13 +20,38 @@ cmake_minimum_required(VERSION 3.16) - project(cpptoml-download NONE) - - include(ExternalProject) -+ -+# Ensure proper paths -+set(SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src") -+set(BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build") -+set(PATCH_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch") -+ -+# Convert paths to forward slashes for Windows compatibility -+file(TO_CMAKE_PATH "${SOURCE_DIR}" SOURCE_DIR_FIXED) -+file(TO_CMAKE_PATH "${BINARY_DIR}" BINARY_DIR_FIXED) -+file(TO_CMAKE_PATH "${PATCH_FILE}" PATCH_FILE_FIXED) -+ -+# Debugging messages -+message(STATUS "Resolved source directory: ${SOURCE_DIR_FIXED}") -+message(STATUS "Resolved binary directory: ${BINARY_DIR_FIXED}") -+message(STATUS "Resolved patch file: ${PATCH_FILE_FIXED}") -+ -+# Validate paths to ensure they are correctly resolved -+if(NOT EXISTS "${PATCH_FILE_FIXED}") -+ message(FATAL_ERROR "Patch file does not exist: ${PATCH_FILE_FIXED}") -+endif() -+ -+# External project setup - ExternalProject_Add(ext_cpptoml - GIT_REPOSITORY https://github.com/skystrife/cpptoml.git - GIT_TAG v0.1.1 -- SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/src" -- BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cpptoml/build" -+ SOURCE_DIR "${SOURCE_DIR_FIXED}" -+ BINARY_DIR "${BINARY_DIR_FIXED}" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -+ PATCH_COMMAND -+ ${CMAKE_COMMAND} -E echo "Applying patch to cpptoml..." && -+ ${CMAKE_COMMAND} -E env bash -c "patch -p1 --forward --ignore-whitespace --fuzz=3 --input=\"${PATCH_FILE_FIXED}\" --directory=\"${SOURCE_DIR_FIXED}\"" - ) diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt -index e770e4fdba..b3ab7c8aca 100644 +index e770e4fdba..a548376f1a 100644 --- a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt +++ b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt -@@ -74,26 +74,6 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE) - set(cpptoml_DIR ${cpptoml_DIR} CACHE PATH "" FORCE) +@@ -75,23 +75,13 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE) endif() --execute_process( + execute_process( - COMMAND git apply -R -p1 --ignore-space-change --whitespace=nowarn --check -- INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" -- WORKING_DIRECTORY "${SOURCE_DIR}" ++ COMMAND patch -p1 --forward --ignore-whitespace --fuzz=3 + INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" + WORKING_DIRECTORY "${SOURCE_DIR}" - OUTPUT_QUIET - ERROR_QUIET -- RESULT_VARIABLE result) + RESULT_VARIABLE result) -if(result) - message(STATUS "Applying patch for minimal cmake version to cpptoml") -- + - execute_process( - COMMAND git apply -p1 --ignore-space-change --whitespace=nowarn - INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" @@ -93,8 +37,8 @@ index e770e4fdba..b3ab7c8aca 100644 - if(result) - message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!") - endif() --endif() -- ++if(result) ++ message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!") + endif() + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "-DENABLE_LIBCXX=off" "-DCPPTOML_BUILD_EXAMPLES=off" "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" "${SOURCE_DIR}" ${CMAKE_ADDITIONAL_OPTIONS} - RESULT_VARIABLE result - WORKING_DIRECTORY ${BUILD_DIR} ) From 4bf283194a3d921aa036ff9b26226e09fbdf1b62 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 11:58:06 +1000 Subject: [PATCH 13/21] Faster debug --- .github/workflows/testpr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 9cca185da..2d1c8284a 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -168,4 +168,4 @@ jobs: if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' run: | $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing - $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing + $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 --up-to ros-jazzy-iceoryx-posh -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing From 88975794cb67eb79896701dbce754152a8f7040f Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 12:04:47 +1000 Subject: [PATCH 14/21] Full rebuild --- .github/workflows/testpr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 2d1c8284a..9cca185da 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -168,4 +168,4 @@ jobs: if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' run: | $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing - $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 --up-to ros-jazzy-iceoryx-posh -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing + $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing From bb4d43be38bf521f9d858628cd3a6fb7f5291d12 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 15:08:53 +1000 Subject: [PATCH 15/21] Update ros-jazzy-fastrtps.patch --- patch/ros-jazzy-fastrtps.patch | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/patch/ros-jazzy-fastrtps.patch b/patch/ros-jazzy-fastrtps.patch index 329888be5..0a014c8e6 100644 --- a/patch/ros-jazzy-fastrtps.patch +++ b/patch/ros-jazzy-fastrtps.patch @@ -27,4 +27,17 @@ index 75ad33f2d64..252f60c775a 100644 + namespace eprosima { - template \ No newline at end of file + template +diff --git a/tools/fds/CMakeLists.txt b/tools/fds/CMakeLists.txt +index 899fe693..f1e7e37d 100644 +--- a/tools/fds/CMakeLists.txt ++++ b/tools/fds/CMakeLists.txt +@@ -116,7 +116,7 @@ install(EXPORT ${PROJECT_NAME}-targets + if( WIN32 ) + # Use powershell to generate the link + install( +- CODE "execute_process( COMMAND PowerShell -Command \"if( test-path ${PROJECT_NAME}.exe -PathType Leaf ) { rm ${PROJECT_NAME}.exe } ; New-Item -ItemType SymbolicLink -Target $ -Path ${PROJECT_NAME}.exe \" ERROR_QUIET RESULTS_VARIABLE SYMLINK_FAILED WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}\") \n if( SYMLINK_FAILED ) \n message(STATUS \"Windows requires admin installation rights to create symlinks. A bat script will be provided instead.\") \n set(FAST_SERVER_BINARY_NAME $) \n configure_file(${CMAKE_CURRENT_LIST_DIR}/fast-discovery-server.bat.in ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION}/${PROJECT_NAME}.bat @ONLY) \n endif()" ++ CODE "execute_process( COMMAND PowerShell -Command \"if( test-path ${PROJECT_NAME}.exe -PathType Leaf ) { rm ${PROJECT_NAME}.exe } ; New-Item -ItemType HardLink -Target $ -Path ${PROJECT_NAME}.exe \" ERROR_QUIET RESULTS_VARIABLE SYMLINK_FAILED WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}\") \n if( SYMLINK_FAILED ) \n message(STATUS \"Windows requires admin installation rights to create symlinks. A bat script will be provided instead.\") \n set(FAST_SERVER_BINARY_NAME $) \n configure_file(${CMAKE_CURRENT_LIST_DIR}/fast-discovery-server.bat.in ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION}/${PROJECT_NAME}.bat @ONLY) \n endif()" + COMPONENT discovery) + else() + # Use ln to create the symbolic link. We remove the version from the file name but keep the debug suffix From 4739a52302e3f7af39b0e3c963ae9cad57ae7e7e Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 15:09:29 +1000 Subject: [PATCH 16/21] debug --- .github/workflows/testpr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 9cca185da..4209d91bd 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -168,4 +168,4 @@ jobs: if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' run: | $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing - $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing + $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 --up-to ros-jazzy-fastrtps -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing From 757633995ede63187ede4f30223a93acdc081148 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 15:33:38 +1000 Subject: [PATCH 17/21] Whole pipeline --- .github/workflows/testpr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 4209d91bd..9cca185da 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -168,4 +168,4 @@ jobs: if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' run: | $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing - $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 --up-to ros-jazzy-fastrtps -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing + $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing From cdb08c25fce65ea19e125316a8182fca25450b30 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 7 Jan 2025 20:01:24 +1000 Subject: [PATCH 18/21] Sync with humble --- robostack.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/robostack.yaml b/robostack.yaml index fa258d7a6..717abd15d 100644 --- a/robostack.yaml +++ b/robostack.yaml @@ -87,8 +87,15 @@ festival: linux: [festival, festvox-kallpc16k] osx: [] win64: [] +# This is not available on Windows, and it is only +# required by libcurl_vendor (see https://index.ros.org/d/file/) +# but it is not actually used if libcurl is not compiled, +# so we can just ignore it on Windows. file: - robostack: [file] + robostack: + linux: [file] + osx: [file] + win64: [] ffmpeg: robostack: [ffmpeg] ffmpeg-dev: From ab488ea0032b10a7651946f1ebda2aa8e67c8416 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 7 Jan 2025 16:49:38 +0100 Subject: [PATCH 19/21] Align with humble --- conda_build_config.yaml | 13 ++++++++----- patch/dependencies.yaml | 2 +- pixi.toml | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/conda_build_config.yaml b/conda_build_config.yaml index 02df9d3a3..cdb780d86 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -15,11 +15,6 @@ python: python_impl: - cpython -c_compiler: - - ${{ "vs2019" if win }} -cxx_compiler: - - ${{ "vs2019" if win }} - c_stdlib: - ${{ "sysroot" if linux }} - ${{ "macosx_deployment_target" if osx }} @@ -28,3 +23,11 @@ c_stdlib_version: - ${{ "2.17" if linux }} - ${{ "10.14" if osx and x86_64 }} - ${{ "11.0" if osx and arm64 }} +c_compiler: + - ${{ "gcc" if linux }} + - ${{ "clang" if osx }} + - ${{ "vs2019" if win }} +cxx_compiler: + - ${{ "gxx" if linux }} + - ${{ "clangxx" if osx }} + - ${{ "vs2019" if win }} diff --git a/patch/dependencies.yaml b/patch/dependencies.yaml index ca3e3cf77..8f44cb430 100644 --- a/patch/dependencies.yaml +++ b/patch/dependencies.yaml @@ -34,7 +34,7 @@ intra_process_demo: add_host: ["REQUIRE_OPENGL"] rviz_ogre_vendor: add_host: ["zlib", "freeimage", "freetype", "assimp", "zziplib", "pugixml", "${{ 'libglu' if linux }}"] - add_build: ["vcstool", "patch"] + add_build: ["vcstool"] add_run: ["assimp"] pcl_conversions: add_host: ["REQUIRE_OPENGL", "libboost-devel"] diff --git a/pixi.toml b/pixi.toml index 12818830c..9a5e8ec4e 100644 --- a/pixi.toml +++ b/pixi.toml @@ -16,7 +16,7 @@ upload = "anaconda -t $ANACONDA_API_TOKEN upload" [dependencies] python = ">=3.11.0,<3.12" -rattler-build = ">=0.33" +rattler-build = ">=0.33.2" anaconda-client = ">=1.12" [target.win-64.dependencies] From 66cd8e00a0101e8b4b2d9c31c76442129ebadf89 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 8 Jan 2025 12:26:08 +1000 Subject: [PATCH 20/21] Copy theora-image-transport.win.patch from humble --- ...ros-jazzy-theora-image-transport.win.patch | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 patch/ros-jazzy-theora-image-transport.win.patch diff --git a/patch/ros-jazzy-theora-image-transport.win.patch b/patch/ros-jazzy-theora-image-transport.win.patch new file mode 100644 index 000000000..66fd581c5 --- /dev/null +++ b/patch/ros-jazzy-theora-image-transport.win.patch @@ -0,0 +1,170 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 67612f0..355d45e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,10 +23,10 @@ find_package(std_msgs REQUIRED) + + find_package(OpenCV REQUIRED imgproc) + find_package(PkgConfig) +-pkg_check_modules(PC_OGG REQUIRED ogg) +-pkg_check_modules(PC_THEORA REQUIRED theora) +-pkg_check_modules(PC_THEORAENC REQUIRED theoraenc) +-pkg_check_modules(PC_THEORADEC REQUIRED theoradec) ++list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) ++ ++find_package(OGG REQUIRED) ++find_package(THEORA REQUIRED) + + rosidl_generate_interfaces(${PROJECT_NAME} + "msg/Packet.msg" +@@ -55,13 +55,13 @@ target_compile_definitions(${LIBRARY_NAME} PRIVATE + target_include_directories(${LIBRARY_NAME} PRIVATE + "$" + "$" +-) ++ ${THEORA_INCLUDE_DIRS} ++ ${OGG_INCLUDE_DIRS}) ++ + target_link_libraries(${LIBRARY_NAME} + opencv_imgproc +- ${PC_OGG_LIBRARIES} +- ${PC_THEORA_LIBRARIES} +- ${PC_THEORAENC_LIBRARIES} +- ${PC_THEORADEC_LIBRARIES} ++ ${OGG_LIBRARIES} ++ ${THEORA_LIBRARIES} + "${cpp_typesupport_target}" + ${sensor_msgs_TARGETS} + cv_bridge::cv_bridge +@@ -71,20 +71,13 @@ target_link_libraries(${LIBRARY_NAME} + ) + + add_executable(ogg_saver src/ogg_saver.cpp) +-target_compile_definitions(ogg_saver PRIVATE +- ${PC_OGG_CFLAGS_OTHER} +- ${PC_THEORA_CFLAGS_OTHER} +- ${PC_THEORAENC_CFLAGS_OTHER} +- ${PC_THEORADEC_CFLAGS_OTHER} +-) +-target_link_libraries(ogg_saver +- ${PC_THEORA_LIBRARY} +- ${PC_OGG_LIBRARY} +- ${PC_THEORAENC_LIBRARIES} +- ${PC_THEORADEC_LIBRARIES} +- "${cpp_typesupport_target}" +- rclcpp::rclcpp +- rcutils::rcutils ++ ++target_link_libraries(ogg_saver ${THEORA_LIBRARIES} ++ ${OGG_LIBRARIES} ++ ${OpenCV_LIBRARIES} ++ "${cpp_typesupport_target}" ++ rclcpp::rclcpp ++ rcutils::rcutils + ) + + ament_export_dependencies( +diff --git a/cmake/FindOGG.cmake b/cmake/FindOGG.cmake +new file mode 100644 +index 0000000..3121d17 +--- /dev/null ++++ b/cmake/FindOGG.cmake +@@ -0,0 +1,26 @@ ++find_path(OGG_INCLUDE_DIR ++ NAMES ++ ogg/ogg.h ++ DOC "ogg include directory") ++mark_as_advanced(OGG_INCLUDE_DIR) ++ ++find_library(OGG_LIBRARY ++ NAMES ++ ogg ++ DOC "ogg library") ++mark_as_advanced(OGG_LIBRARY) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(OGG REQUIRED_VARS OGG_LIBRARY OGG_INCLUDE_DIR) ++ ++if (OGG_FOUND) ++ set(OGG_LIBRARIES "${OGG_LIBRARY}") ++ set(OGG_INCLUDE_DIRS "${OGG_INCLUDE_DIR}") ++ ++ if (NOT TARGET OGG::OGG) ++ add_library(OGG::OGG UNKNOWN IMPORTED) ++ set_target_properties(OGG::OGG PROPERTIES ++ IMPORTED_LOCATION "${OGG_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}") ++ endif () ++endif () +diff --git a/cmake/FindTHEORA.cmake b/cmake/FindTHEORA.cmake +new file mode 100644 +index 0000000..b69dd2c +--- /dev/null ++++ b/cmake/FindTHEORA.cmake +@@ -0,0 +1,66 @@ ++include(CMakeFindDependencyMacro) ++ ++find_path(THEORA_INCLUDE_DIR ++ NAMES ++ theora/theora.h ++ DOC "theora include directory") ++mark_as_advanced(THEORA_INCLUDE_DIR) ++ ++get_filename_component(computed_theora_root "${THEORA_INCLUDE_DIR}" DIRECTORY) ++ ++find_library(THEORA_LIBRARY ++ NAMES ++ theora ++ HINTS ++ "${computed_theora_root}/lib" ++ "${computed_theora_root}/lib64" ++ DOC "theora library") ++mark_as_advanced(THEORA_LIBRARY) ++ ++find_library(THEORA_enc_LIBRARY ++ NAMES ++ theoraenc ++ HINTS ++ "${computed_theora_root}/lib" ++ "${computed_theora_root}/lib64" ++ DOC "theora encoding library") ++mark_as_advanced(THEORA_enc_LIBRARY) ++ ++find_library(THEORA_dec_LIBRARY ++ NAMES ++ theoradec ++ HINTS ++ "${computed_theora_root}/lib" ++ "${computed_theora_root}/lib64" ++ DOC "theora decoding library") ++mark_as_advanced(THEORA_dec_LIBRARY) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(THEORA ++ REQUIRED_VARS THEORA_LIBRARY THEORA_enc_LIBRARY THEORA_dec_LIBRARY THEORA_INCLUDE_DIR) ++ ++if (THEORA_FOUND) ++ set(THEORA_LIBRARIES "${THEORA_LIBRARY}" "${THEORA_enc_LIBRARY}" "${THEORA_dec_LIBRARY}") ++ set(THEORA_INCLUDE_DIRS "${THEORA_INCLUDE_DIR}") ++ ++ if (NOT TARGET THEORA::THEORA) ++ add_library(THEORA::THEORA UNKNOWN IMPORTED) ++ set_target_properties(THEORA::THEORA PROPERTIES ++ IMPORTED_LOCATION "${THEORA_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) ++ endif () ++ ++ if (NOT TARGET THEORA::ENC) ++ add_library(THEORA::ENC UNKNOWN IMPORTED) ++ set_target_properties(THEORA::ENC PROPERTIES ++ IMPORTED_LOCATION "${THEORA_enc_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) ++ endif() ++ ++ if (NOT TARGET THEORA::DEC) ++ add_library(THEORA::DEC UNKNOWN IMPORTED) ++ set_target_properties(THEORA::DEC PROPERTIES ++ IMPORTED_LOCATION "${THEORA_dec_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) ++ endif() ++endif () From e7f7d954fd8ff935abfe46c9797180cdd0855ae8 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 9 Jan 2025 14:36:01 +0100 Subject: [PATCH 21/21] Add patches for Windows support --- patch/ros-jazzy-ros-gz-bridge.win.patch | 12 ++++++++++++ patch/ros-jazzy-ros-gz-sim.win.patch | 9 +++++++++ patch/ros-jazzy-zstd-image-transport.win.patch | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 patch/ros-jazzy-ros-gz-bridge.win.patch create mode 100644 patch/ros-jazzy-ros-gz-sim.win.patch create mode 100644 patch/ros-jazzy-zstd-image-transport.win.patch diff --git a/patch/ros-jazzy-ros-gz-bridge.win.patch b/patch/ros-jazzy-ros-gz-bridge.win.patch new file mode 100644 index 000000000..13fe9f4e0 --- /dev/null +++ b/patch/ros-jazzy-ros-gz-bridge.win.patch @@ -0,0 +1,12 @@ +diff --git a/ros_gz_bridge/CMakeLists.txt b/ros_gz_bridge/CMakeLists.txt +index 44911577..76779457 100644 +--- a/ros_gz_bridge/CMakeLists.txt ++++ b/ros_gz_bridge/CMakeLists.txt +@@ -11,4 +11,7 @@ if(NOT CMAKE_CXX_STANDARD) ++elseif(MSVC) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + endif() ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + find_package(ament_cmake REQUIRED) + find_package(rclcpp REQUIRED) diff --git a/patch/ros-jazzy-ros-gz-sim.win.patch b/patch/ros-jazzy-ros-gz-sim.win.patch new file mode 100644 index 000000000..8467b23a7 --- /dev/null +++ b/patch/ros-jazzy-ros-gz-sim.win.patch @@ -0,0 +1,9 @@ +diff --git a/ros_gz_sim/CMakeLists.txt b/ros_gz_sim/CMakeLists.txt +index dc8deb03..ec6ac678 100644 +--- a/ros_gz_sim/CMakeLists.txt ++++ b/ros_gz_sim/CMakeLists.txt +@@ -12,3 +12,4 @@ endif() ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + find_package(ament_cmake REQUIRED) + find_package(rclcpp REQUIRED) diff --git a/patch/ros-jazzy-zstd-image-transport.win.patch b/patch/ros-jazzy-zstd-image-transport.win.patch new file mode 100644 index 000000000..db9428079 --- /dev/null +++ b/patch/ros-jazzy-zstd-image-transport.win.patch @@ -0,0 +1,10 @@ +diff --git a/zstd_image_transport/src/zstd_publisher.cpp b/zstd_image_transport/src/zstd_publisher.cpp +index b215930..301a58c 100644 +--- a/zstd_image_transport/src/zstd_publisher.cpp ++++ b/zstd_image_transport/src/zstd_publisher.cpp +@@ -86,4 +86,4 @@ void ZstdPublisher::advertiseImpl( +- uint ns_len = node->get_effective_namespace().length(); ++ unsigned int ns_len = node->get_effective_namespace().length(); + std::string param_base_name = base_topic.substr(ns_len); + std::replace(param_base_name.begin(), param_base_name.end(), '/', '.'); +