From 732be7e354d07317497bd66d5a08be023ed8fbe7 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Thu, 20 Jun 2024 21:26:26 +0200 Subject: [PATCH] Remove `SHARED` When the module is compiled with `MODULE` (the default), the proper linker flags are added on macOS (specifically `-undefined dynamic_lookup`). Otherwise, `rclpy` segfaults when linked on conda. Is the `SHARED` really necessary? The `pybind11` documentation says: > Specifying `SHARED` will create a more traditional dynamic library which can also be linked from elsewhere. Is anyone linking against this library as a "traditional dynamic library"? Signed-off-by: Wolf Vollprecht --- rclpy/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rclpy/CMakeLists.txt b/rclpy/CMakeLists.txt index 80b8a1ffc..65a88f3aa 100644 --- a/rclpy/CMakeLists.txt +++ b/rclpy/CMakeLists.txt @@ -72,7 +72,7 @@ function(configure_build_install_location _library_name) endfunction() # Split from main extension and converted to pybind11 -pybind11_add_module(_rclpy_pybind11 SHARED +pybind11_add_module(_rclpy_pybind11 src/rclpy/_rclpy_logging.cpp src/rclpy/_rclpy_pybind11.cpp src/rclpy/action_client.cpp