opencv: add new version, variant, and patch#27374
opencv: add new version, variant, and patch#27374adamjstewart merged 25 commits intospack:developfrom
Conversation
|
@bvanessen can you review this PR? This PR modifies the following package(s), for which you are listed as a maintainer:
|
adamjstewart
left a comment
There was a problem hiding this comment.
Tesseract doesn't seem to be in OpenCV proper like all other components/modules we have variants for, it seems to be in opencv_contrib. Since is the first time we've added a opencv_contrib-specific component, I'll have to think if this is the best way to do this. We'll definitely need a conflict for +tesseract when ~contrib.
var/spack/repos/builtin/packages/opencv/cmake_no-system-paths.patch
Outdated
Show resolved
Hide resolved
Yes, sorry, I completely missed that. |
@bvanessen do you have any thoughts on this? I'm thinking we might just want to make it a separate variant (not in modules or components). |
|
I just discovered that there seems to be a problem with the installation of opencv that, as far as I can tell, is independent of this PR. Looking at the installation directory, the programs are not getting installed in |
|
Actually, I think things are fine. I did not realize that literally every variant is turned off. |
|
I converted this to "draft" status as I found some components that do not build due to changed variable names. It looks like this began with version 4.5.2 but it seems like fixing those here is appropriate. |
|
The changes wound being significant but applications and contrib modules are now available as variants, while components that can not be built are no longer variants. Summary: |
|
Looks like there are some conflicts, can you resolve those? |
There was a problem hiding this comment.
The libdc1394 changes look ok for me @adamjstewart .
It looks like there were permissions changes on several files in the |
adamjstewart
left a comment
There was a problem hiding this comment.
This PR should contain:
- changes to the OpenCV package
- changes to other packages that are required as a result (i.e. removing
+core)
This PR should not contain changes to other packages that are not related to OpenCV (i.e. fixing a broken build). This makes it harder for me to review. Also, it looks like there was a bad rebase, so this PR is actually undoing many of the changes that have been made in other PRs.
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
|
|
||
| class Openvslam(CMakePackage): |
There was a problem hiding this comment.
This package should be deprecated before being removed in case someone is still using it
There was a problem hiding this comment.
By "remove" I mean deprecate first and delete in a later Spack release
There was a problem hiding this comment.
Even though there is no code, just a README?
I moved quite a few packages out of this PR into other PRs earlier, as you had requested. I agree that something seemed to have gone horribly wrong with the rebase and I wound undoing much of that. I will have to sort that out, sorry for the extra work. |
|
The problem was not the rebase per se, but a git mistake I made when I moved packages to separate PRs. After creating the other PRs I added commits to this PR to remove the packages. When I rebased, those commits replayed on top and effectively put the packages back in this PR, and reversed the desired commits from the other PRs. I suppose one could argue that doing a rebase was a mistake as I could have merged in the develop branch and resolved conflicts from there. Either way, I did not manage git properly and I apologize for the confusion and extra work. |
|
The |
|
The |
|
The |
adamjstewart
left a comment
There was a problem hiding this comment.
Testing the build and some packages I care about now
| conflicts("+v4l", when="platform=darwin", msg="Linux only") | ||
| conflicts("+win32ui", when="platform=darwin", msg="Windows only") | ||
| conflicts("+win32ui", when="platform=linux", msg="Windows only") | ||
| conflicts("+win32ui", when="platform=cray", msg="Windows only") |
There was a problem hiding this comment.
We can now make the variant conditional on the OS, although that might be difficult to do with the for-loop.
The py-torchgeo package does not need opencv+datasets.
adamjstewart
left a comment
There was a problem hiding this comment.
I haven't looked through the changes in extreme detail (like the conflicts stuff) but I tested that the package installs and works with the only project I use it for (TorchGeo). I'm fine with merging this in its current state unless there are any remaining tests or reviewers you would like to wait for.
|
I have not put openvslam back in yet. I am not really sure what it means to have a package that has no code, even deprecated packages should be buildable, I think. Otherwise, I think this is ready to go. |
|
Yeah, it's mostly for people who already have the package in their source cache. But I'm not even sure we use the source cache when downloading from |
|
This is a bit off topic but I looked into openvslam a little more. The only version in spack is So, I say let's merge this PR. We can deal with openvslam later if desired. |
* opencv: add new version, variant, and patch - added version 4.5.4 - added tesseract variant - added patch to not add system paths * Add leptonica depends and contrib conflicts * Add dependencies for 1394 support - new package: libraw1394 - add sdl dependency to libdc1394 - add conflict for openjpeg and jasper * Adjust dependencies and conflicts for opencv modules * rewrite of opencv - all prebuilt apps are now variants and can be installed - core is no longer a variant. It was always built anyway so it was not really a variant. - contrib is no longer a variant. All of the contrib modules are now available as variants. - components that can not be built with Spack are no longer variants. They are set to 'off' to prevent pulling from system. - handle the case where a module and a component have the same name - use `with when` framework - adjust dependencies and conflicts - new package: libraw1394 - have libdc1394 depend on libraw1394 - patch to find clp - patch to find onnx - patch for cvv to find Qt - format with black * Incorporate recommended changes - fix variants and dependencies on packages that depend on opencv - remove opencv-3.2 and patches - add some new patches to handle different versions - cntk needs further work - the openvslam package was markde deprecated as it is no longer an active project and the repository has no code * Remove gmake dependency. * Remove sdl support SDL is only used in an example case, but the examples are not built. * remove openvslam * Remove opencv+flann variant from 3dtk * Back out cfitsio constraint from py-astropy * remove opencv+flann variant from dlib * remove boost constraint from 3dtk * Remove non-opencv related bohrium changes * Adjustments for cntk - protobuf constraint at version 3.10 - need specific variants for opencv - improve patch * Deprecate CNTK package * variant tweaks - added appropriate conflicts for cublas - made cuda/cudev relationship explicit - moved openx to pending components as it needs an openvx package * fix isort style error * Use date version from kaldi rather than commit * Revert changes from a bad rebase * Add +flann to 3dtk and dlib * Use compression support with libtiff * remove `+datasets` from opencv dependency The py-torchgeo package does not need opencv+datasets. * fix typo zip --> zlib
* opencv: add new version, variant, and patch - added version 4.5.4 - added tesseract variant - added patch to not add system paths * Add leptonica depends and contrib conflicts * Add dependencies for 1394 support - new package: libraw1394 - add sdl dependency to libdc1394 - add conflict for openjpeg and jasper * Adjust dependencies and conflicts for opencv modules * rewrite of opencv - all prebuilt apps are now variants and can be installed - core is no longer a variant. It was always built anyway so it was not really a variant. - contrib is no longer a variant. All of the contrib modules are now available as variants. - components that can not be built with Spack are no longer variants. They are set to 'off' to prevent pulling from system. - handle the case where a module and a component have the same name - use `with when` framework - adjust dependencies and conflicts - new package: libraw1394 - have libdc1394 depend on libraw1394 - patch to find clp - patch to find onnx - patch for cvv to find Qt - format with black * Incorporate recommended changes - fix variants and dependencies on packages that depend on opencv - remove opencv-3.2 and patches - add some new patches to handle different versions - cntk needs further work - the openvslam package was markde deprecated as it is no longer an active project and the repository has no code * Remove gmake dependency. * Remove sdl support SDL is only used in an example case, but the examples are not built. * remove openvslam * Remove opencv+flann variant from 3dtk * Back out cfitsio constraint from py-astropy * remove opencv+flann variant from dlib * remove boost constraint from 3dtk * Remove non-opencv related bohrium changes * Adjustments for cntk - protobuf constraint at version 3.10 - need specific variants for opencv - improve patch * Deprecate CNTK package * variant tweaks - added appropriate conflicts for cublas - made cuda/cudev relationship explicit - moved openx to pending components as it needs an openvx package * fix isort style error * Use date version from kaldi rather than commit * Revert changes from a bad rebase * Add +flann to 3dtk and dlib * Use compression support with libtiff * remove `+datasets` from opencv dependency The py-torchgeo package does not need opencv+datasets. * fix typo zip --> zlib
* opencv: add new version, variant, and patch - added version 4.5.4 - added tesseract variant - added patch to not add system paths * Add leptonica depends and contrib conflicts * Add dependencies for 1394 support - new package: libraw1394 - add sdl dependency to libdc1394 - add conflict for openjpeg and jasper * Adjust dependencies and conflicts for opencv modules * rewrite of opencv - all prebuilt apps are now variants and can be installed - core is no longer a variant. It was always built anyway so it was not really a variant. - contrib is no longer a variant. All of the contrib modules are now available as variants. - components that can not be built with Spack are no longer variants. They are set to 'off' to prevent pulling from system. - handle the case where a module and a component have the same name - use `with when` framework - adjust dependencies and conflicts - new package: libraw1394 - have libdc1394 depend on libraw1394 - patch to find clp - patch to find onnx - patch for cvv to find Qt - format with black * Incorporate recommended changes - fix variants and dependencies on packages that depend on opencv - remove opencv-3.2 and patches - add some new patches to handle different versions - cntk needs further work - the openvslam package was markde deprecated as it is no longer an active project and the repository has no code * Remove gmake dependency. * Remove sdl support SDL is only used in an example case, but the examples are not built. * remove openvslam * Remove opencv+flann variant from 3dtk * Back out cfitsio constraint from py-astropy * remove opencv+flann variant from dlib * remove boost constraint from 3dtk * Remove non-opencv related bohrium changes * Adjustments for cntk - protobuf constraint at version 3.10 - need specific variants for opencv - improve patch * Deprecate CNTK package * variant tweaks - added appropriate conflicts for cublas - made cuda/cudev relationship explicit - moved openx to pending components as it needs an openvx package * fix isort style error * Use date version from kaldi rather than commit * Revert changes from a bad rebase * Add +flann to 3dtk and dlib * Use compression support with libtiff * remove `+datasets` from opencv dependency The py-torchgeo package does not need opencv+datasets. * fix typo zip --> zlib
|
Nice work @glennpj 🙂 I'm not in a position to update my |
Uh oh!
There was an error while loading. Please reload this page.