Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/libjxl: fix build with libjpeg
@ 2023-02-19 14:00 Fabrice Fontaine
  2023-02-19 14:00 ` [Buildroot] [PATCH 2/3] package/libjxl: disable benchmark and tests Fabrice Fontaine
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Fabrice Fontaine @ 2023-02-19 14:00 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Fabrice Fontaine

Building with libjpeg will raise the following build failure on some
architectures since the addition of the package in commit
e648d399d8bd609697e78f13f7fa76be06d91a57:

/tmp/instance-14/output-1/build/libjxl-0.7.0/lib/extras/enc/jpg.cc: In function 'jxl::Status jxl::extras::{anonymous}::EncodeWithLibJpeg(const jxl::extras::PackedImage&, const JxlBasicInfo&, const std::vector<unsigned char>&, std::vector<unsigned char>, size_t, const string&, std::vector<unsigned char>*)':
/tmp/instance-14/output-1/build/libjxl-0.7.0/lib/extras/enc/jpg.cc:126:34: error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka 'unsigned int*'} [-fpermissive]
  126 |   jpeg_mem_dest(&cinfo, &buffer, &size);
      |                                  ^~~~~
      |                                  |
      |                                  long unsigned int*

Upstream advocates to use jpeg-turbo:
https://github.com/libjxl/libjxl/issues/1802

Fixes:
 - http://autobuild.buildroot.org/results/9a2a7c6072876f2562609bf98f32a1ce93631a75

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libjxl/libjxl.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/libjxl/libjxl.mk b/package/libjxl/libjxl.mk
index cc24ba258c..02a93ac5d9 100644
--- a/package/libjxl/libjxl.mk
+++ b/package/libjxl/libjxl.mk
@@ -30,4 +30,11 @@ LIBJXL_CONF_OPTS = \
 	-DJPEGXL_ENABLE_SJPEG=OFF \
 	-DJPEGXL_ENABLE_SKCMS=OFF
 
+ifeq ($(BR2_PACKAGE_JPEG_TURBO),y)
+LIBJXL_DEPENDENCIES += jpeg-turbo
+LIBJXL_CONF_OPTS += -DJPEGXL_ENABLE_TOOLS=ON
+else
+LIBJXL_CONF_OPTS += -DJPEGXL_ENABLE_TOOLS=OFF
+endif
+
 $(eval $(cmake-package))
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-20 20:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-19 14:00 [Buildroot] [PATCH 1/3] package/libjxl: fix build with libjpeg Fabrice Fontaine
2023-02-19 14:00 ` [Buildroot] [PATCH 2/3] package/libjxl: disable benchmark and tests Fabrice Fontaine
2023-02-19 14:00 ` [Buildroot] [PATCH 3/3] package/libjxl: security bump to version 0.8.1 Fabrice Fontaine
2023-02-19 15:37   ` Julien Olivain
2023-02-19 15:30 ` [Buildroot] [PATCH 1/3] package/libjxl: fix build with libjpeg Julien Olivain
2023-02-19 16:37   ` Fabrice Fontaine
2023-02-20 20:51 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox