mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-23 22:20:44 +08:00
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 <mrpollo@gmail.com>
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user