-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using opencv + python in feedstocks now requires more opengl drivers #401
Comments
cc: @conda-forge/qt-main |
conda-forge/opencv-feedstock#401 (cherry picked from commit 6d33d41)
conda-forge/opencv-feedstock#401 (cherry picked from commit 6d33d41)
conda-forge/opencv-feedstock#401 (cherry picked from commit 6d33d41) Co-authored-by: Stuart Mumford <[email protected]>
conda-forge/opencv-feedstock#401 (cherry picked from commit 6d33d41) Co-authored-by: Stuart Mumford <[email protected]>
@hmaarrfk thanks for raising this issue, this has been exactly our problem for several weeks in https://github.com/conda-forge/ultralytics-feedstock with about a dozen patch updates failing to deploy. Adding this line to tests resolves the build issues, but what about users installing our package without seeing this issue? Will their opencv installs fail without these additional opengl dependencies? |
Yeah, unfortunately i haven't had the chance to analyze this in detail. I have 2 answer to this:
If the above isn't really true, I'm happy to revisit (potentially marking linux builds with opencv+qt6 as broken, but this is somewhat drastic). We could, maybe reconsider making the Ultimately, this #293 (comment) comment is what I would like to do, but you know 3 years later and limited time has made this a nice to have. I'm very interested in hearing user stories, without them, its hard to choose the right path. |
As a followup, from a historical prospective, it seems that things like https://github.com/conda-forge/ultralytics-feedstock/blob/main/recipe/yum_requirements.txt |
What about Windows? I now have the same type of issue on Windows (to build a new version of Fluidimage for conda-forge, conda-forge/fluidimage-feedstock#21)
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=904591&view=results There is no headless version for Windows, so I cannot use this. I also tried to add the |
I guess this is a different problem, tracked in conda-forge/graphite2-feedstock#14 . Quick workaround: |
This is breaking CI systems probably all over the place. I maintain a scientific piece of software and it's not as easy a fix for me because we don't want opencv to be headless (we use it for both maths and visualisations) but we also don't necessarily have the ability to install opengl on github test systems (or other places). I'm not sure there is a good solution here, unless we can get the Qt developers to stop depending on OpenGL. |
Yes I agree, though maybe the qt6 hard dependency on opengl is best discussed in: https://github.com/conda-forge/qt-main-feedstock/
To retain the old behavior of opencv on linux (requiring qt5) you would do
However, I have to say that qt5 is somewhat hard to maintain. I've had to backport a difficult patch conda-forge/qt-main-feedstock#244 to enable modernizing it. So the qt6 transition is meant to help application like yours in the long run.... Will add the ubuntu dependency list to the top comment to help Ubuntu and WSL ubuntu users. |
I just ran into the same issue. I have updated https://github.com/conda-forge/segment-geospatial-feedstock/pull/26/files
|
Adding the following resolves the issue. test:
requires:
- libopencv *=headless* # [linux]
- ``` |
You must rerender after this addition. I added this in the instructions. |
Hello, I am encountering this issue too: conda-forge/detectree-feedstock#4 However, I am only using opencv to peform convolutions, i.e., the Thank you. Best, |
thank you for asking the question. Do not change the run requirements as it would conflict with other packages that may require opencv's GUI freature in your end user's final environment. Rather simply add a headless constraint to your test section. I made a suggestion to your feedstock. |
Thank you @hmaarrfk! I applied your suggestion, tests passed and I could already merge the PR 🚀 |
* updated v2.2.0 * MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.34.1, and conda-forge-pinning 2024.04.24.14.42.55 * Configure Azure to free disk space Xref conda-forge/cudatoolkit-feedstock#91 * Reset build number to 0 * MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.34.1, and conda-forge-pinning 2024.04.26.17.13.40 * Disable pip check because mmengine-lite is installed See #29 (comment) * Rebuild for python312 * MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.36.0, and conda-forge-pinning 2024.05.21.18.33.22 * Add mesa-libEGL et al. to yum_requirements.txt Xref conda-forge/opencv-feedstock#401 * MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.36.0, and conda-forge-pinning 2024.05.21.18.33.22 --------- Co-authored-by: Wei Ji <[email protected]> Co-authored-by: conda-forge-webservices[bot] <91080706+conda-forge-webservices[bot]@users.noreply.github.com>
This is only a message for the linux builds. All other builds should be unaffected by this change.
Comment:
Since we added qt6-main as a dependency of opencv by "default", it is causing errors for downstream projects. I'm not sure if we can make these libraries "optional" at runtime for qt6 to help downstream projects "build" what they need without adding the OpenGL stuff.
https://github.com/conda-forge/opencv-feedstock/pull/396/files#diff-e36d294fb902698a9e5c5b991fd921efb1cfb09609fc4db4f94d72759c9e011a
the following packages should be added to the yum_requirements.txt file
After adding these lines, one must rerender the recipe.
First reported in: #400 by @paugier (thank you for being patient)
Presently, I would suggest that in the test section, users that are facing this issue add:
Please do not specify a build string constraint for runtime requirements. It will override the run exports and restrict how users can use opencv in their system. Adding a requirement to the testing section is safe since it tests against the most reduced set of functionality.
For Ubuntu users and WSL+Ubuntu users:
The text was updated successfully, but these errors were encountered: