From 09a017d01e9aca9317210cee623d9246e65e7725 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Tue, 22 Sep 2026 20:29:41 +0100 Subject: [PATCH] fix(build): Export XRPL_ENABLE_TELEMETRY to consumers of libxrpl CMake sets the define with add_compile_definitions, which is scoped to this build, so it reached no consumer. Four public telemetry headers change class layout on it: with the define SpanGuard holds a unique_ptr and its methods are out of line in the library, without it SpanGuard is empty and all-inline. A package compiling against the installed headers therefore built a different SpanGuard than the one it linked. Exporting the define through cpp_info keeps the two in step, and it stays inside the existing telemetry option so the Conan option remains the only switch. --- conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conanfile.py b/conanfile.py index 1fd1ff842e..5a8c2318d0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -239,3 +239,7 @@ class Xrpl(ConanFile): libxrpl.requires.append("rocksdb::librocksdb") if self.options.telemetry: libxrpl.requires.append("opentelemetry-cpp::opentelemetry-cpp") + # The public telemetry headers pick their class layout on this + # define, so a consumer that does not see it compiles a different + # SpanGuard than the one inside the library it links. + libxrpl.defines.append("XRPL_ENABLE_TELEMETRY")