Bug 282926 - graphics/libjxl: fails to build on jpegless system
Summary: graphics/libjxl: fails to build on jpegless system
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:
 
Reported: 2024-11-22 23:35 UTC by Dmitry Marakasov
Modified: 2024-11-23 21:29 UTC (History)
0 users

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 Dmitry Marakasov freebsd_committer freebsd_triage 2024-11-22 23:35:15 UTC
libjxl fails to build with OPTIONS_UNSET=jpeg set in make.conf

I could not reproduce this with default packages, so it looks like jpeg should be disabled globally, otherwise it's pulled by some dependency and libjxp build succeeds. When there's no libjpeg on system, build fails like this: 

https://gist.github.com/AMDmi3/7d5dc0ac7dc1b09c029fdd8b889398fb

I suggest to enable jpeg unconditionally.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-11-23 04:11:04 UTC
A commit in branch main references this bug:

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

commit ada3d2df83fc99e6ac855984a6cecb034bdcd743
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-11-23 03:28:07 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-11-23 04:00:47 +0000

    graphics/libjxl: unbreak JPEG=off build after 70e2590d63b0

    In file included from lib/extras/dec/jpegli.cc:16:
    In file included from lib/extras/enc/jpegli.cc:27:
    In file included from lib/jpegli/common.h:23:
    lib/jxl/base/include_jpeglib.h:15:10: fatal error: 'jpeglib.h' file not found
       15 | #include <jpeglib.h>  // IWYU pragma: keep
          |          ^~~~~~~~~~~

    PR:             282926
    Reported by:    amdmi3

 graphics/libjxl/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-11-23 04:12:05 UTC
A commit in branch 2024Q4 references this bug:

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

commit 25b58a2ca1884dd40718effe1d4d4f4d18615cfb
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-11-23 03:28:07 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-11-23 04:11:14 +0000

    graphics/libjxl: unbreak JPEG=off build after 70e2590d63b0

    In file included from lib/extras/dec/jpegli.cc:16:
    In file included from lib/extras/enc/jpegli.cc:27:
    In file included from lib/jpegli/common.h:23:
    lib/jxl/base/include_jpeglib.h:15:10: fatal error: 'jpeglib.h' file not found
       15 | #include <jpeglib.h>  // IWYU pragma: keep
          |          ^~~~~~~~~~~

    PR:             282926
    Reported by:    amdmi3

    (cherry picked from commit ada3d2df83fc99e6ac855984a6cecb034bdcd743)

 graphics/libjxl/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 3 Jan Beich freebsd_committer freebsd_triage 2024-11-23 04:14:15 UTC
jpegli is an improved encoder/decoder for regular JPEG, see https://github.com/libjxl/libjxl/blob/main/lib/jpegli/README.md#encoder-improvements
Drop-in replacement (for graphics/jpeg-turbo) isn't implemented in the port, so jpegli support is limited to CLI tools: cjpegli (encoder) and djpegli (decoder).
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2024-11-23 21:29:24 UTC
Thanks a lot!