Skip to content

build(pixi): plugins build under conda — dependency normalization + pixi backbone#156

Draft
facontidavide wants to merge 23 commits into
mainfrom
phase2-dep-normalization
Draft

build(pixi): plugins build under conda — dependency normalization + pixi backbone#156
facontidavide wants to merge 23 commits into
mainfrom
phase2-dep-normalization

Conversation

@facontidavide

@facontidavide facontidavide commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings the plugin collection onto pixi/conda-forge while keeping the Conan build green during the transition. Two layers:

1. Dependency-target normalization (cmake/PjDependencyTargets.cmake)

pj_target_link_<dep>(target visibility) helpers route the deps whose CMake target differs between providers (Conan static vs conda shared/pkg-config): arrow, parquet, zstd, lz4, asio, paho_mqtt, lua + pj_arrow_available. Under Conan they select the existing *_static targets (no behavior change); under conda the shared / pkg-config equivalents. Migrated: arrow_helpers, parquet, lerobot, mcap, pj_bridge, udp, mqtt, colormap. mosaico Flight probe extended for conda; zmq needs no change (documented); zstd pin unified to 1.5.7.

2. pixi build backbone

pixi.toml (channels conda-forge + https://prefix.dev/plotjuggler for the SDK; multi-env features) + the critical sysroot_linux-64 >=2.34 pin (conda's libstdcxx 15 references __libc_single_threaded, a glibc-2.32 symbol the default sysroot 2.28 lacks → message-parser plugins fail to link without it). kissfft vendored into toolbox_fft/contrib/ (absent on conda-forge; C compiled as C++).

Verification

  • Conan stays green — every changed plugin builds + tests under Conan (incl. parser_protobuf, toolbox_colormap, toolbox_fft re-verified after the Phase 3 additions).
  • conda: all 15 backbone plugins build + test green on linux-64 against the published plotjuggler_sdk 0.8.1 from prefix.dev — json, protobuf, ros, data_tamer, csv, parquet, mcap, ulog, zmq, mqtt, udp, dummy, quaternion, colormap, fft.

Notes

  • Two normalization gaps were exposed only by the conda build (Conan has both targets): protobuf::protobuf umbrella → libprotobuf/libprotoc; lua's conda-only builtin FindLuapj_target_link_lua.
  • Scope is linux-64 + conda-forge-available, non-Qt, non-Python-embed plugins. Follow-ons: Qt, the libdatachannel recipe, Python-embed, media, ROS2/RoboStack, mosaico Flight, self-contained bundling, osx-64/win-64.

🤖 Generated with Claude Code

facontidavide and others added 18 commits June 18, 2026 18:58
Introduces cmake/PjDependencyTargets.cmake with pj_target_link_{arrow,
parquet,zstd,lz4,asio,paho_mqtt} and pj_arrow_available helpers that
resolve the correct CMake target regardless of whether the provider is
Conan (static targets) or conda-forge (shared / pkg-config targets).
Included at the root so all plugin subdirectories inherit the functions
with no behavior change under the existing Conan build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…review)

pkg_check_modules(... IMPORTED_TARGET) re-creates PkgConfig::PJ_LZ4/PJ_ASIO on
each call; mcap links lz4 three times in one CMakeLists. Guard with
if(NOT TARGET ...) so repeated/cross-subdir calls are idempotent. Validated under
conda with a second lz4/asio consumer.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Unlike the arrow/zstd/paho helpers, lz4/asio only checked for the target. After
plugins drop their find_package(lz4/asio), nothing created the Conan target, so
the helper fell to pkg-config — failing (asio) or silently linking system liblz4
instead of Conan's static (mcap). Add find_package(... QUIET CONFIG) first.
Verified: mcap now links .conan2/.../liblz4.a; conda pkg-config path intact.
Compile its C sources as C++ (root project is CXX-only; kissfft headers have
extern "C" guards so linkage stays correct). kissfft::kissfft ALIAS keeps the
plugin link unchanged; Conan kissfft dep dropped. Builds+tests pass under both
Conan and conda.
@facontidavide facontidavide changed the title build(cmake): dependency-target normalization layer (Conan↔conda-forge) build(pixi): plugins build under conda — dependency normalization + pixi backbone Jun 18, 2026
Builds libdatachannel 0.24.0 shared (OpenSSL, bundled libjuice ICE, websocket +
media) -> LibDataChannel::LibDataChannel, for data_stream_webrtc under conda.
Validated: package builds + the webrtc plugin builds+tests against it + the
published SDK 0.8.1. Pre-clone+path source (rattler git source doesn't recurse
submodules); openssl pinned <4 (cmake 4.x needs openssl 3.x).
Both 'Qt' stream plugins need no Qt at build: the port replaced the original's
Qt WebSockets with ixwebsocket, and pj_embed_ui bakes the .ui into a constexpr
char[]. conda-forge ships ixwebsocket 11.4.6 with the same ixwebsocket::ixwebsocket
target Conan uses -> no normalization helper needed; a 'bridge' pixi feature wires
it into the default env. Both plugins build + 3/3 tests pass under conda gcc-14.

Also reserve() the frame buffer in pj_bridge_protocol_test to the exact final size:
silences a GCC-14 -O3 -Wstringop-overflow false positive on the incrementally
grown vector (test-only; the shipped plugin .o already compiled clean).
Mosaico was EXILED from the Conan build: arrow:with_flight_rpc dragged in
protobuf 3.21, colliding with the repo's 6.33. conda-forge resolves the whole
Flight/gRPC/Arrow graph against a SINGLE libprotobuf 6.33.5, so mosaico rejoins
the unified build. Validated: plugin .so builds + all 20 tests pass under conda.

- pixi 'mosaico' feature: libarrow-flight 23 (pulls libgrpc + the same protobuf
  already in the protobuf feature) + fmt; wired into the default env.
- find_package(ArrowFlight): conda ships Flight as a separate config package, so
  the target must be found explicitly before the existing probe (no-op on Conan).
- lua via pj_target_link_lua (plugin + 2 query tests): conda lua has no lua::lua
  config target, only the builtin FindLua — same gap Phase 3a fixed for colormap.
- Alias conda's ArrowFlight::arrow_flight_shared -> arrow::arrow_flight so the
  CPM-fetched mosaico-cpp-sdk's (shared-unaware) internal probe configures.
  Guarded; no-op under Conan and once that SDK's probe learns the shared name.
- plugin task: -DBUILD_TESTING=ON (only mosaico gates its tests on it).
… 3d)

Default build (PJ_REACTIVE_ENABLE_PYTHON=OFF, the shipping Linux artifact) needed
only the lua fix: drop find_package(lua) + link via pj_target_link_lua (conda lua
has no lua::lua config target, only builtin FindLua — same gap as colormap/mosaico).
Builds + 2/2 tests under conda, links liblua, NO libpython (as intended). The
opt-in Python path (pybind11 + cpython, shared libpython) ties into D11 bundling
and is validated separately.
…se 3e)

FFmpeg is the last normalization gap: Conan ships an ffmpeg CMake config
(ffmpeg::avformat/avcodec/avutil) but conda-forge ffmpeg ships pkg-config (.pc)
ONLY. Add pj_target_link_ffmpeg(tgt vis <components...>) — Conan targets when
present, else IMPORTED targets from the libav* pkg-config modules (GLOBAL +
per-component guard so mp4 and pj_video_demux can both link avformat in one build)
— plus a pj_ffmpeg_available probe so pj_video_demux's graceful-skip detects
ffmpeg under BOTH providers (not just the CMake config).

The probe's pkg-config fallback is gated on DEFINED ENV{CONDA_PREFIX} so the Conan
aggregate build (no ffmpeg dep) keeps SKIPPING pj_video_demux and never silently
links a SYSTEM ffmpeg from the host pkg-config. Verified: video_demux.cpp compiles
under conda (CONDA_PREFIX set) and is skipped without it.

- common/pj_video_demux + data_load_mp4 migrated to the helper.
- data_load_lerobot reaches ffmpeg transitively via pj_video_demux (no change).
- 'media' pixi feature (ffmpeg + pkg-config) wired into the default env.
- Both plugins build + tests pass under conda ffmpeg 8.1.2 (mp4 4/4, lerobot 8/8).

This completes linux-64: all ~21 plugins now build under conda.
@facontidavide facontidavide marked this pull request as draft June 24, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant