From 67cb65f237af6703270c172ff2fc906703ccfeee Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Sat, 18 Apr 2026 13:30:30 -0700 Subject: [PATCH] build(msg): disable SSL and Security in the host-side CycloneDDS build The nested CycloneDDS CMake invocation in msg/CMakeLists.txt exists only to produce the 'idlc' IDL compiler as a host-side code-gen tool. It does not need CycloneDDS's TLS transport or DDS Security features, but both default to ON in cyclonedds' upstream CMake. When ENABLE_SSL=AUTO (the default), cyclonedds finds the system OpenSSL and builds ddsi_ssl.c. On macos-latest the system OpenSSL is 3.x, which removed the deprecated SSL_get_peer_certificate() symbol used in our pinned cyclonedds revision (2023). The host build then fails at link time with: Undefined symbols for architecture arm64: "_SSL_get_peer_certificate", referenced from: _dds_report_tls_version in ddsi_ssl.c.o This broke every Zenoh-enabled board build on macOS (boards that select CONFIG_MODULES_ZENOH pull in LIB_CDRSTREAM, which is what triggers the nested build). v5 and v6x never hit it because they don't enable Zenoh. Passing -DENABLE_SSL=OFF -DENABLE_SECURITY=OFF skips compilation of ddsi_ssl.c and the security plugins entirely. idlc is unaffected (pure C code generation, no DDS runtime). Verified locally on macOS ARM64: clean distclean + make px4_fmu-v6xrt_default completes in 2090/2090 ninja steps, producing a 2.1 MB .px4 with 59% FLASH used. Signed-off-by: Ramon Roche --- msg/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msg/CMakeLists.txt b/msg/CMakeLists.txt index 3ecb1ee5976..9ad5fe512b4 100644 --- a/msg/CMakeLists.txt +++ b/msg/CMakeLists.txt @@ -455,6 +455,8 @@ if(CONFIG_LIB_CDRSTREAM) execute_process(COMMAND ${CMAKE_COMMAND} ${PX4_SOURCE_DIR}/src/lib/cdrstream/cyclonedds -DCMAKE_C_COMPILER=/usr/bin/gcc -DBUILD_EXAMPLES=OFF + -DENABLE_SSL=OFF + -DENABLE_SECURITY=OFF WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/idlc RESULT_VARIABLE CMD_ERROR OUTPUT_FILE CMD_OUTPUT )