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: 3.1.0 -> 3.2.0 (with caveats) #21552
Conversation
] ++ lib.optionals enableContrib [ | ||
"-DOPENCV_EXTRA_MODULES_PATH=${contribSrc}/modules" | ||
# the following modules are badly behaved and attempt to download 3rd party libs as part of the build process: | ||
"-DBUILD_opencv_dnn=OFF" # attempts to download protobuf src and googlenet caffe model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the Makefile script using sed
to remove the command to download neural nets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prrrrobably, I'm not 100% sure what the ramifications would be.
Digging deeper, it seems like the dnn
module does at least have some provision for not building protobuf itself (see https://github.com/opencv/opencv_contrib/blob/3.2.0/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think upstream would accept patches, which uses a flag to point to the source instead of downloading something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find cmake "syntax" fairly impossible to comprehend at the best of times and there is some odd stuff in here...
Interestingly, building with -DBUILD_PROTOBUF=OFF
seems to have the effect of disabling both the protobuf download and the googlenet model download. Which is odd. It appears the googlenet model is only used in the tests, which we seem to build but not run. This is probably because the tests require quite a large download of external data. This suggests the option of disabling the test building - it would be nice to run them, but we don't, and building them just feels like a waste of time & space.
I'm going to crawl back into bed with some paracetamol anyone who feels like having a go ad untangling this mess is most welcome.
Ok I've managed to bring back |
the caveat here is that xfeatures2d from the contrib module needs to be disabled as it has become badly behaved in 3.2.0 and attempts to perform downloads of additional components during the build phase
👍 👍 |
The caveat here is that certain parts of the contrib module need to be disabled as they have become badly behaved in 3.2.0 and attempt to perform downloads of additional components during the build phase.
This does make me wonder whether we should continue to provide 3.1.0 packages for those needing to use the
dnn
orxfeatures2d
modules.Thoughts anybody?
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)