Bug 267809 - graphics/opencv: does not link with lapacke
Summary: graphics/opencv: does not link with lapacke
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-16 13:12 UTC by Thierry Thomas
Modified: 2023-04-25 12:35 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (desktop)


Attachments
Replace LIB_DEPENDS on lapacke by a BUILD_DEPENDS on cblas+lapacke (938 bytes, patch)
2022-11-16 13:12 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2022-11-16 13:12:20 UTC
Created attachment 238119 [details]
Replace LIB_DEPENDS on lapacke by a BUILD_DEPENDS on cblas+lapacke

Testing an upgrade to the blas/lapack ports, I noticed that opencv depends on liblapacke, but it does not use it:

Just try the output of:
$ ldd /usr/local/bin/opencv_annotation | grep lapacke

Actually it only checks for the headers, cblas.h and lapacke.h, so that we can replace LIB_DEPENDS by a BUILD_DEPENDS.

=>> Checking shared library dependencies
 0x0000000000000001 NEEDED               Shared library: [libOpenEXR-3_1.so.30]
 0x0000000000000001 NEEDED               Shared library: [libc++.so.1]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x0000000000000001 NEEDED               Shared library: [libcxxrt.so.1]
 0x0000000000000001 NEEDED               Shared library: [libdc1394.so.25]
 0x0000000000000001 NEEDED               Shared library: [libdl.so.1]
 0x0000000000000001 NEEDED               Shared library: [libfreetype.so.6]
 0x0000000000000001 NEEDED               Shared library: [libgcc_s.so.1]
 0x0000000000000001 NEEDED               Shared library: [libgdal.so.3]
 0x0000000000000001 NEEDED               Shared library: [libgdcmDSED.so.3.0]
 0x0000000000000001 NEEDED               Shared library: [libgdcmMSFF.so.3.0]
 0x0000000000000001 NEEDED               Shared library: [libglib-2.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libglog.so.1]
 0x0000000000000001 NEEDED               Shared library: [libgobject-2.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgphoto2.so.6]
 0x0000000000000001 NEEDED               Shared library: [libgphoto2_port.so.12]
 0x0000000000000001 NEEDED               Shared library: [libgstapp-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgstaudio-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgstbase-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgstpbutils-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgstreamer-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgstriff-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgstvideo-1.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libharfbuzz.so.0]
 0x0000000000000001 NEEDED               Shared library: [libhdf5.so.200]
 0x0000000000000001 NEEDED               Shared library: [libjpeg.so.8]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]
 0x0000000000000001 NEEDED               Shared library: [libopenblas.so.0]
 0x0000000000000001 NEEDED               Shared library: [libopencv_alphamat.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_aruco.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_barcode.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_bgsegm.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_bioinspired.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_calib3d.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_ccalib.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_core.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_dnn.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_dnn_superres.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_face.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_features2d.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_flann.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_freetype.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_fuzzy.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_gapi.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_hdf.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_hfs.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_highgui.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_img_hash.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_imgcodecs.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_imgproc.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_intensity_transform.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_line_descriptor.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_mcc.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_ml.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_objdetect.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_optflow.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_phase_unwrapping.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_photo.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_plot.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_quality.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_rapid.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_reg.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_rgbd.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_saliency.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_sfm.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_shape.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_stereo.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_stitching.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_structured_light.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_surface_matching.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_text.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_tracking.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_video.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_videoio.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_wechat_qrcode.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_xfeatures2d.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_ximgproc.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_xobjdetect.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopencv_xphoto.so.406]
 0x0000000000000001 NEEDED               Shared library: [libopenjp2.so.7]
 0x0000000000000001 NEEDED               Shared library: [libpng16.so.16]
 0x0000000000000001 NEEDED               Shared library: [libthr.so.3]
 0x0000000000000001 NEEDED               Shared library: [libtiff.so.5]
 0x0000000000000001 NEEDED               Shared library: [libwebp.so.7]
 0x0000000000000001 NEEDED               Shared library: [libz.so.6]
Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2023-04-20 20:11:53 UTC
There's a typo in the attached patch (copy-paste mistake dropped 	ATLAS_LIB_DEPENDS entirely), but I'll fix that and push it.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-04-20 22:02:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9523c6bffa8dfc6ae1a6842f5e1720885a164b90

commit 9523c6bffa8dfc6ae1a6842f5e1720885a164b90
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2023-04-20 20:23:58 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2023-04-20 22:01:41 +0000

    graphics/opencv: mark build-time dependencies correctly

    opencv does not need to link (run-time, LIB_DEPENDS) with
    lapacke, it is sufficient to build-depend.

    Obtained from:  thierry@
    PR:             267809

 graphics/opencv/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)