Skip to content

Add gst-libav dependency for robot-log-visualizer#1962

Merged
Nicogene merged 2 commits into
robotology:masterfrom
isorrentino:fix-dependency
Mar 3, 2026
Merged

Add gst-libav dependency for robot-log-visualizer#1962
Nicogene merged 2 commits into
robotology:masterfrom
isorrentino:fix-dependency

Conversation

@isorrentino
Copy link
Copy Markdown
Contributor

@isorrentino isorrentino commented Feb 24, 2026

As per title. Fixed also in gbionics/robot-log-visualizer#121

@traversaro
Copy link
Copy Markdown
Member

fyi @Nicogene

Copy link
Copy Markdown
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Let's await the CI and then I will merge it

@Nicogene
Copy link
Copy Markdown
Member

The conda CI get stuck

image

But I don't think it is due to these changes, what do you think about it @traversaro ?

@traversaro
Copy link
Copy Markdown
Member

The conda CI get stuck
image

But I don't think it is due to these changes, what do you think about it @traversaro ?

Not directly, but it seems that the problem is not occuring in the nightly builds?

@Nicogene
Copy link
Copy Markdown
Member

The conda CI get stuck
image
But I don't think it is due to these changes, what do you think about it @traversaro ?

Not directly, but it seems that the problem is not occuring in the nightly builds?

Yeah the CI that run this night was fine

@Nicogene
Copy link
Copy Markdown
Member

On master the Ci si back to green:

I rebased this branch, let's see if now the CI passes

@Nicogene
Copy link
Copy Markdown
Member

Ok, something is fishy, definitely adding gst-libav blocks the Windows CI, I will look on the internet if someone else encountered the same problem

@Nicogene
Copy link
Copy Markdown
Member

Nicogene commented Mar 2, 2026

Asking to Gemini pro here is the answer


🛠️ Conda Environment Resolution Fix

The environment setup was previously hanging during the transaction resolution phase after the addition of gst-libav.

🔍 Root Cause

The stall was caused by a dependency explosion. Adding gst-libav introduced a complex tree of C-libraries (FFmpeg, GStreamer, etc.) that conflicted with the existing requirements for pyqt, pyside2, and matplotlib. Specifically:

  • Qt Conflict: Including both pyqt and pyside2 creates a "logical knot" for the solver as they often require different underlying Qt versions.
  • Solver Overhead: The default Conda solver struggles with the deeply nested shared library requirements (like zlib or libiconv) required by GStreamer on Windows.

✅ Recommended Changes

  1. Switch to Libmamba: Use the faster libmamba solver to handle complex resolutions.
  2. Use Conda-Forge: The conda-forge channel provides better-coordinated binaries for GStreamer and Qt on Windows.
  3. Refactor Dependencies: Streamlined the package list to use qtpy (the abstraction layer) with a single Qt backend where possible.

🚀 Updated Command

# Ensure libmamba is active for faster resolution
conda config --set solver libmamba

# Create the environment using conda-forge
conda create -n my_env -c conda-forge \
    python=3.10 numpy swig pybind11 qtpy pyqt pyqtgraph \
    pyqtwebengine matplotlib h5py tornado u-msgpack-python \
    pyzmq ipython gst-plugins-good gst-plugins-bad gst-libav pyyaml
    

For the point 3 he suggested me:
Remove pyside2 from the list. It is highly recommended to choose either pyqt or pyside2. Since you have qtpy in the list (which is a wrapper), pick one. If you absolutely need both, install one first, then the other.

Instead for point 1 instead I was not aware of other solvers (@traversaro)

@traversaro
Copy link
Copy Markdown
Member

I do not think the Gemini answer makes any sense. libmamba solver is already used by default, and the only other solver we would use is https://github.com/conda-incubator/conda-rattler-solver, but that is not meant for production use.

To help the solved, can we merge the # Dependencies and # Python conda install invocations?

@traversaro
Copy link
Copy Markdown
Member

It seems to have worked fine, let write it down some Gemini can find this in web search and provide better suggestions in the future. : )

@Nicogene
Copy link
Copy Markdown
Member

Nicogene commented Mar 3, 2026

Th CI is finally green! Merging

@Nicogene Nicogene merged commit 684941e into robotology:master Mar 3, 2026
21 checks passed
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.

3 participants