Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912788 - media-libs/opencv-4.7.0-r1 fails to compile: opencv-caffe.pb.cc:(.text.unlikely._ZNK12opencv_caffe9BlobShape18_InternalSerializeEPhPN6google8protobuf2io19EpsCopyOutputStreamE+0x20): undefined reference to absl::lts_20230802::log_internal::LogMessageFatal
Summary: media-libs/opencv-4.7.0-r1 fails to compile: opencv-caffe.pb.cc:(.text.unlike...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH, PullRequest
: 912982 (view as bug list)
Depends on:
Blocks: 912819
  Show dependency tree
 
Reported: 2023-08-21 20:09 UTC by Agostino Sarubbo
Modified: 2023-08-25 11:23 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,54.29 KB, application/x-xz)
2023-08-21 20:09 UTC, Agostino Sarubbo
Details
Ebuild (opencv-4.7.0-r1.ebuild,20.84 KB, text/plain)
2023-08-23 00:42 UTC, Alexandre Ferreira
Details
Patch to compile openCV with protobuf 23.3 (protobuf-23.patch,543 bytes, patch)
2023-08-23 00:45 UTC, Alexandre Ferreira
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-08-21 20:09:39 UTC
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)
Comment 1 Agostino Sarubbo gentoo-dev 2023-08-21 20:09:41 UTC
Created attachment 868401 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Larry the Git Cow gentoo-dev 2023-08-22 13:12:04 UTC
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(+)
Comment 3 Agostino Sarubbo gentoo-dev 2023-08-22 13:29:00 UTC
Build passes here
Comment 4 Nowa Ammerlaan gentoo-dev 2023-08-22 13:31:23 UTC
(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.
Comment 5 Alfred Wingate 2023-08-22 14:41:22 UTC
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.
Comment 6 Alexandre Ferreira 2023-08-23 00:42:52 UTC
Created attachment 868505 [details]
Ebuild

Ebuild that together with the patch compiles opencv with protobuf 23.3
Comment 7 Alexandre Ferreira 2023-08-23 00:45:13 UTC
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
Comment 8 Larry the Git Cow gentoo-dev 2023-08-24 22:37:49 UTC
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(+)
Comment 9 Andreas Sturmlechner gentoo-dev 2023-08-25 08:21:24 UTC
*** Bug 912982 has been marked as a duplicate of this bug. ***