Bug 261003 - graphics/libjxl: pkg-config deps list nonexistent libhwy package
Summary: graphics/libjxl: pkg-config deps list nonexistent libhwy package
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: Jan Beich
URL:
Keywords:
Depends on:
Blocks: 261043
  Show dependency treegraph
 
Reported: 2022-01-07 14:52 UTC by Val Packett
Modified: 2023-05-18 04:57 UTC (History)
1 user (show)

See Also:
jbeich: maintainer-feedback+
jbeich: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Val Packett 2022-01-07 14:52:25 UTC
Using libjxl via pkgconf currently results in:

  Error: `"pkg-config" "--libs" "--cflags" "libjxl" "libjxl >= 0.6.1"` did not exit successfully: exit status: 1
  Package libhwy was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libhwy.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'libhwy', required by 'libjxl', not found


Looks like the local patch https://github.com/freebsd/freebsd-ports/blob/e9e1512d396c65f606d752447f4bedcdddaa4080/graphics/libjxl/files/patch-private-libs that made highway private to libjxl did not consider pkg-config.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2022-01-08 17:29:42 UTC
Requires.private is supposed to be unused unless --static is passed. For --static the easiest fix is to create a port for highway then build libjxl against it instead of the bundled copy.

$ llvm-nm --demangle --undefined-only /usr/local/lib/libjxl.a | fgrep hwy::
                 U hwy::ChosenTarget::Update()
                 U hwy::chosen_target
                 U hwy::AlignedDeleter::DeleteAlignedArray(void*, void (*)(void*, void*), void*, void (*)(void*, unsigned long))
[...]
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-01-08 18:14:15 UTC
A commit in branch main references this bug:

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

commit afbd51f052833f7a152390a6a7b80af14e14fe53
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-01-08 17:57:59 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-01-08 18:13:31 +0000

    graphics/libjxl: unbreak pkg-config support

    Convert static libhwy from package to LDFLAGS, so pkgconf doesn't try
    to expand missing package in Requires.private outside of --static.

    $ pkg-config --cflags libjxl
    Package libhwy was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libhwy.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libhwy', required by 'libjxl', not found

    PR:             261003
    Reported by:    Greg V

 graphics/libjxl/Makefile                 |  1 +
 graphics/libjxl/files/patch-private-libs | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-01-08 18:14:16 UTC
A commit in branch 2022Q1 references this bug:

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

commit e992c434ca4ba3c719d8074f474f03d875c77ea2
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-01-08 17:57:59 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-01-08 18:14:00 +0000

    graphics/libjxl: unbreak pkg-config support

    Convert static libhwy from package to LDFLAGS, so pkgconf doesn't try
    to expand missing package in Requires.private outside of --static.

    $ pkg-config --cflags libjxl
    Package libhwy was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libhwy.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libhwy', required by 'libjxl', not found

    PR:             261003
    Reported by:    Greg V

    (cherry picked from commit afbd51f052833f7a152390a6a7b80af14e14fe53)

 graphics/libjxl/Makefile                 |  1 +
 graphics/libjxl/files/patch-private-libs | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-01-08 20:25:46 UTC
A commit in branch main references this bug:

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

commit fdd0ceeceefafad3ce9bda41029ca4973e5fb71d
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-01-08 20:17:09 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-01-08 20:24:35 +0000

    graphics/libjxl: switch to system highway

    PR:             261003

 graphics/libjxl/Makefile                           |  4 +-
 graphics/libjxl/distinfo                           |  2 -
 graphics/libjxl/files/patch-private-libhwy (new)   | 22 +++++++++++
 graphics/libjxl/files/patch-private-libs (gone)    | 45 ----------------------
 ...hird__party_highway_hwy_nanobenchmark.cc (gone) | 40 -------------------
 5 files changed, 24 insertions(+), 89 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-01-08 20:26:47 UTC
A commit in branch 2022Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=700d924a605cc558e3ee86033ac8b76d8d12383c

commit 700d924a605cc558e3ee86033ac8b76d8d12383c
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-01-08 20:17:09 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-01-08 20:25:19 +0000

    graphics/libjxl: switch to system highway

    PR:             261003
    (cherry picked from commit fdd0ceeceefafad3ce9bda41029ca4973e5fb71d)

 graphics/libjxl/Makefile                           |  4 +-
 graphics/libjxl/distinfo                           |  2 -
 graphics/libjxl/files/patch-private-libhwy (new)   | 22 +++++++++++
 graphics/libjxl/files/patch-private-libs (gone)    | 45 ----------------------
 ...hird__party_highway_hwy_nanobenchmark.cc (gone) | 40 -------------------
 5 files changed, 24 insertions(+), 89 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-02-18 20:44:01 UTC
A commit in branch main references this bug:

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

commit fcb1353a347a5badae497c663cc6b5c6378e44cc
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-02-18 19:52:58 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-02-18 20:39:27 +0000

    devel/highway: switch to shared library after 00e47df9ed1a

    PR:             261003

 devel/highway/Makefile                            |  3 ++-
 devel/highway/pkg-plist                           | 12 +++++++++---
 graphics/libjxl/Makefile                          |  6 +++---
 graphics/libjxl/files/patch-private-libhwy (gone) | 22 ----------------------
 4 files changed, 14 insertions(+), 29 deletions(-)
Comment 7 Karina 2023-05-18 04:57:20 UTC
MARKED AS SPAM