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
opencv and opencv4: eliminate conflict, add new variants, bring parity between both #9555
opencv and opencv4: eliminate conflict, add new variants, bring parity between both #9555
Conversation
Notifying maintainers: |
Fine for me from gerbil PoV. |
IMHO we would leave ffmpeg enabled by default, and skip the variant being added. Everyone will want that, and it's always been like thst, so why change it? Less variants = MUCH better, for 100 reasons. Ideally MP would have NO variants, but we need some for x11 vs quartz, etc. Think, always, simpler is better, more consistent for all users is better, variants are evil. There are a bunch of whitespace things (periods removed, etc) that are minor. what exactly was the the reason opencv and opencv4 conflicted, and how was that resolved? I didn't immediately see that. |
Agreed, +ffmpeg should be the default; update committed. As for the why, one of my goals was to provide more granularity, and flexibility. Indeed, one of the open issues brought up the ffmpeg case specifically.
It was primarily related to items added to The conflict was eliminated by ensuring opencv4's binaries are installed into |
so - granularity is bad, in and of itself. variants are bad. more variants are worse. They propogate down through all the dependencies, so when you have this:
and that kicks in a Many ports that have no real need for ffmpeg might then be forced to build with that variant, which makes people build everything from source who might have otherwise just installed a binary from the buildbot. And then people go down build paths that are not often actually ever tested (who on earth in macports ever even builds any of the variants, much less all of them, before committing an update --? -- answer: nobody does). So (IMHO) make the portfile simpler again, dump the ffmpeg variant, and just leave ffmpeg always enabled for opencv unless there is an actual, important use case whereby somebody might really need to install opencv WITHOUT ffmpeg. And as I think such a use case does not exist, having an added variant just increases MacPorts already excessive confusion. Variants are evil. IMO we should ideally have no variants, but as that is not possible the ones we do need to have should be absolutely minimal. Adding variants does not improve a port, it detracts from it. |
Fair enough, change committed. |
@stromnov Andrew, any thoughts relative to this pull request? Good, bad, ...? |
@mascguy Looks good, but I'm a little worried about compatibility in the dependent ports. |
That's certainly a reasonable concern, and one that I had too. My testing approach was as follows:
While it's not practical to cover all functionality, I'm confident that things are working properly overall. What do you think? |
9a88c08
to
80590e2
Compare
Squashed all changes down into a single commit, and ensured all fixed tickets referenced properly for autoclose. |
@stromnov Andrew, thoughts regarding my testing/validation approach? |
46ecd8c
to
24a9f6c
Compare
@kencu Ken, I've fixed the indentation issues. Any final thoughts? |
…s; update gerbil and py-pytorch for opencv4 changes opencv: eliminate conflict with opencv4; add variants debug, nonfree, tests opencv4: eliminate conflict with opencv; switch to shared libs; rename variant opencv_contrib to contrib, to match opencv; add variants debug, java, python35..39, qt4, qt5, tbb, tests, vtk gerbil: update for opencv4 library move py-pytorch: update for opencv4 library move Fixes: https://trac.macports.org/ticket/61912 Fixes: https://trac.macports.org/ticket/61801 Fixes: https://trac.macports.org/ticket/60118 Fixes: https://trac.macports.org/ticket/58845 Fixes: https://trac.macports.org/ticket/57640 Fixes: https://trac.macports.org/ticket/51734 Fixes: https://trac.macports.org/ticket/48218 Fixes: https://trac.macports.org/ticket/32528
24a9f6c
to
a606de1
Compare
Folks, if anyone has any final objections, please let me ASAP. Thanks! |
It's huge PR, with many changes, and many ports will break if opencv breaks. We'll have to have some time to test this, on every system. Please don't make any more changes while we do, as then we'll have to start all over again and test everything again :> This could take a week or two to get it built on all the systems. The CI system seems just useless at present, unfortunately, and I can't tell what is and what is not building with that. |
Sounds good, I'm ready to call it a day on this one. In terms of the testing, is it all automated? And is there any way for me to monitor/view the progress? |
While I'm not trying to rush this - there's no question that it needs to be well-vetted - eliminating the conflict between these two ports will also be a huge win for our users. How are the builds proceeding? |
|
LOL, fair enough... no rush. |
And let me know if there's anything I can do to help! |
10.14:
|
In terms of my testing strategy, I ran through so many port installs across my four daily drivers, that I lost count. (Those are macOS 10.12 through 10.15, all physical installs.) To elaborate a bit more, I went through the following iterations:
Of note, through all of that testing, I did encounter build failures when enabling In any case, all of the above was done numerous times, across macOS 10.12 through 10.15. As part of that, I also installed a few key dependents on these ports, in particular py-pytorch (py39-pytorch for opencv, and py38-pytorch for opencv4) and gerbil (for opencv4). And then ran tests, with both a simple python program, as well as some gerbil runs. Once I was confident with all of that (many days later), I added macOS 10.6 and 10.8 to the mix, via two Parallels VMs. So while I certainly haven't covered every conceivable testing case, I really spent mucho time on this one. But it'll be worth it in the long run, as having opencv ports that can coexist will be a huge boon for users! Thoughts? |
Oh, in terms of outstanding issues, there's just one found during my testing: opencv4 is failing to build on 10.6. But that's not a new issue, as it also exists with the existing opencv4 port. I'm not sure how feasible it is to fix. |
OK. Enough testing it seems then. |
Beautiful! Thanks as always Ken! |
I've been monitoring the build progress of opencv, opencv4, py-torch, and gerbil... and everything looks good. Still waiting for the 10.14 buildbot to catch up on its backlog, but otherwise, everything has built successfully where expected. Not surprising, but still great to see! |
Description
Goals:
Detailed Changes:
Fixed Issues:
Dependencies:
vtk
.Type(s)
Tested on
macOS 10.6.8 10K549
Xcode 3.2.2 10M2148
macOS 10.8.5 12F2560
Xcode 5.1.1 5B1008
macOS 10.12.6 16G2136
Xcode 9.2 9C40b
macOS 10.13.6 17G14019
Xcode 10.1 10B61
macOS 10.14.6 18G103
Xcode 11.3.1 11C505
macOS 10.15.6 19G2021
Xcode 12.0 12A7209
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?