Bug 287377 - science/dlib-cpp: use & link libjpeg from ports
Summary: science/dlib-cpp: use & link libjpeg from ports
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: Gleb Popov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-08 07:23 UTC by Matthieu Volat
Modified: 2025-06-08 12:20 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+


Attachments
Add jpeg to USES and filter dlib/external directory (5.08 KB, patch)
2025-06-08 09:11 UTC, Matthieu Volat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2025-06-08 07:23:21 UTC
Hi,

In trying to build an application (photoview) that use both dlib and imagemagick, I had a lot of "wrong jpeg library version".

After some debugging, I realized that dlib will build an internal libjpeg that is not compatible with port's libjpeg.

Would you consider adding jpeg to the USE flags to fix this? From my test runs, dlib seems to work fine with the turbo-jpeg version in ports.

Thanks & regards,

-- Matthieu Volat
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2025-06-08 08:42:24 UTC
This seems to be true for more libs too, to be on the safe side and save some I/O perhaps even make use of EXTRACT_AFTER_ARGS= --exclude ? There are a numbers of ports that uses this approach.
Comment 2 Matthieu Volat 2025-06-08 09:11:19 UTC
Created attachment 261086 [details]
Add jpeg to USES and filter dlib/external directory

I agree, a quick test show that filtering the dlib/external directory (and related entries from pkg-plist) do not seems to pose problem, without even having to patch CMakelists.txt.

But that might need testing from more ports that use dlib than my small usecase?
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-06-08 11:04:05 UTC
A commit in branch main references this bug:

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

commit 2f991d8acb0c6c7855ac1255373e5922e0d128cc
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-06-08 10:56:53 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-06-08 11:03:31 +0000

    science/py-dlib: Use more system dependencies

    PR:             287377

 science/py-dlib/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-06-08 11:04:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1bc195e580f7b82855a5ab59ca8ad9121190c7a3

commit 1bc195e580f7b82855a5ab59ca8ad9121190c7a3
Author:     Matthieu Volat <mazhe@alkumuna.eu>
AuthorDate: 2025-06-08 10:07:36 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-06-08 11:03:31 +0000

    science/dlib-cpp: Use more system dependencies

    PR:             287377

 science/dlib-cpp/Makefile  |  5 +++-
 science/dlib-cpp/pkg-plist | 73 ----------------------------------------------
 2 files changed, 4 insertions(+), 74 deletions(-)
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2025-06-08 11:05:58 UTC
You probably also want to keep --no-same-owner --no-same-permissions
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-06-08 11:17:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=95b6df329452bbd1021461f30bd5d649dcb727c4

commit 95b6df329452bbd1021461f30bd5d649dcb727c4
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-06-08 11:16:07 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-06-08 11:16:07 +0000

    science/dlib-cpp: Fixup EXTRACT_AFTER_ARGS

    PR:             287377
    Reported by:    diizzy

 science/dlib-cpp/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 7 Gleb Popov freebsd_committer freebsd_triage 2025-06-08 11:22:10 UTC
Thanks Daniel for the EXTRACT_AFTER_ARGS idea and Matthieu for the patch.
Comment 8 Matthieu Volat 2025-06-08 12:20:50 UTC
Thanks for the feedback and the fast processing!

Have a nice day,