https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: media-libs/opencv-4.7.0-r1 fails to compile. Discovered on: amd64 (internal ref: ci)
Created attachment 868401 [details] build.log.xz build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fff547871e9a63f12b3e82b284029b7991fe0de3 commit fff547871e9a63f12b3e82b284029b7991fe0de3 Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2023-08-22 12:51:09 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2023-08-22 13:11:52 +0000 media-libs/opencv: add 4.8.0 This unfortunatly does not fix the incompatibility with protobuf-23. Bug: https://bugs.gentoo.org/912788 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> media-libs/opencv/Manifest | 2 + media-libs/opencv/opencv-4.8.0.ebuild | 584 ++++++++++++++++++++++++++++++++++ 2 files changed, 586 insertions(+)
Build passes here
(In reply to Agostino Sarubbo from comment #3) > Build passes here That's cause it depends on <dev-libs/protobuf-23:=[${MULTILIB_USEDEP}] now. The problem is still there, it just pulls in an older version now.
Like with other packages this is fixed by using the cmake config files instead of FindProtobuf.cmake. Doing so is trivial, biggest hurdle would be seeing if upstream is fine with it due to other distributions leaving them out. So for an upstreamable solution it could be case of trying first config and then non config. Or trying config and then pkgconfig.
Created attachment 868505 [details] Ebuild Ebuild that together with the patch compiles opencv with protobuf 23.3
Created attachment 868506 [details, diff] Patch to compile openCV with protobuf 23.3 Patch extracted from https://github.com/opencv/opencv/issues/23791#issuecomment-1618945069
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83451b512b473dd0484daaa6c7eff4a4f26c15b9 commit 83451b512b473dd0484daaa6c7eff4a4f26c15b9 Author: Huang Rui <vowstar@gmail.com> AuthorDate: 2023-08-24 08:01:27 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-24 22:35:40 +0000 media-libs/opencv: fix build problem with contribdnn - support tflite import with contribdnn - add dev-libs/flatbuffers RDEPEND and fix build problem - fix protobuf 23.3 build problem with contribdnn Closes: https://bugs.gentoo.org/912788 Signed-off-by: Huang Rui <vowstar@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32429 Signed-off-by: Sam James <sam@gentoo.org> .../opencv/files/opencv-4.8.0-fix-flatbuffer.patch | 31 ++ .../opencv/files/opencv-4.8.0-fix-protobuf.patch | 20 + media-libs/opencv/opencv-4.8.0-r1.ebuild | 588 +++++++++++++++++++++ 3 files changed, 639 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f11297869a4c975f5834d185547d5c33a97df661 commit f11297869a4c975f5834d185547d5c33a97df661 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-24 22:35:37 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-24 22:35:40 +0000 media-libs/opencv: re-conditionalise flatbuffers cmake option Bug: https://bugs.gentoo.org/912788 Signed-off-by: Sam James <sam@gentoo.org> media-libs/opencv/opencv-4.8.0-r1.ebuild | 1 + 1 file changed, 1 insertion(+)
*** Bug 912982 has been marked as a duplicate of this bug. ***