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)
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)
Example of logs from pkg-fallout: http://beefy5.nyi.freebsd.org/data/122i386-default/7bfc2c072607/logs/cimg-2.9.7_2,3.log http://beefy9.nyi.freebsd.org/data/114amd64-default/7bfc2c072607/logs/cimg-2.9.7_2,3.log http://beefy10.nyi.freebsd.org/data/114i386-default/7bfc2c072607/logs/cimg-2.9.7_2,3.log
(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.
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(+)