build(pixi): plugins build under conda — dependency normalization + pixi backbone#156
Draft
facontidavide wants to merge 23 commits into
Draft
build(pixi): plugins build under conda — dependency normalization + pixi backbone#156facontidavide wants to merge 23 commits into
facontidavide wants to merge 23 commits into
Conversation
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.
…buf::protobuf umbrella)
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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*_statictargets (no behavior change); under conda the shared / pkg-config equivalents. Migrated: arrow_helpers, parquet, lerobot, mcap, pj_bridge, udp, mqtt, colormap.mosaicoFlight probe extended for conda;zmqneeds no change (documented); zstd pin unified to 1.5.7.2. pixi build backbone
pixi.toml(channelsconda-forge+https://prefix.dev/plotjugglerfor the SDK; multi-env features) + the criticalsysroot_linux-64 >=2.34pin (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 intotoolbox_fft/contrib/(absent on conda-forge; C compiled as C++).Verification
plotjuggler_sdk 0.8.1from prefix.dev — json, protobuf, ros, data_tamer, csv, parquet, mcap, ulog, zmq, mqtt, udp, dummy, quaternion, colormap, fft.Notes
protobuf::protobufumbrella →libprotobuf/libprotoc; lua's conda-only builtinFindLua→pj_target_link_lua.libdatachannelrecipe, Python-embed, media, ROS2/RoboStack, mosaico Flight, self-contained bundling, osx-64/win-64.🤖 Generated with Claude Code