Bug 255968 - graphics/opencv: missing symbols from libglog
Summary: graphics/opencv: missing symbols from libglog
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-18 09:36 UTC by Thierry Thomas
Modified: 2021-05-20 17:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2021-05-18 09:36:24 UTC
OpenCV depends on libglog from devel/glog, but trying to link with libopencv_sfm.so produces this error:

/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to `google::LogMessageFatal::LogMessageFatal(char const*, int)'
/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to
`google::LogMessage::LogMessage(char const*, int)'
/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to
`fLI::FLAGS_v'
/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to
`google::InitVLOG3__(int**, int*, char const*, int)'
/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to
`google::LogMessageFatal::~LogMessageFatal()'
/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to
`google::LogMessage::~LogMessage()'
/usr/local/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to
`google::LogMessage::stream()'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2021-05-19 14:15:15 UTC
Actually, it seems related to a problem with devel/glog:
see https://lists.freebsd.org/pipermail/dev-commits-ports-all/2021-May/006433.html

(Adding sunpoet)
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-05-20 04:03:09 UTC
(In reply to Thierry Thomas from comment #0)

I could fix this by adding "LDFLAGS+=-lglog" to opencv/Makefile.

(In reply to Thierry Thomas from comment #2)

I do not have IPv6 connection. I'll try check this later.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-05-20 16:16:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2cdaceb379244e0f304927e09d40061c67dc573d

commit 2cdaceb379244e0f304927e09d40061c67dc573d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-05-20 16:14:20 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-05-20 16:14:20 +0000

    graphics/opencv: Fix build with glog 0.5.0

    PR:             255968
    Reported by:    thierry

 graphics/opencv/Makefile | 1 +
 1 file changed, 1 insertion(+)