* [Buildroot] [PATCH 1/1] package/libheif: fix libjpeg build
@ 2024-02-28 17:47 Fabrice Fontaine
2024-02-29 16:07 ` Peter Korsgaard
2024-03-18 13:25 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-02-28 17:47 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Fabrice Fontaine
libheif raises the following build failure with libjpeg since bump to
version 1.17.5 in commit 5714126edac88e3adc043a482b262b319a907dd3 and
https://github.com/strukturag/libheif/commit/ebd13a20b8b7f1964939642b08b662ef7e483f39
/home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc: In function 'heif_error jpeg_encode_image(void*, const heif_image*, heif_image_input_class)':
/home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:366:37: error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka 'unsigned int*'} [-fpermissive]
366 | jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
| ^~~~~~~~~~
| |
| long unsigned int*
Fixes:
- http://autobuild.buildroot.org/results/8ca909564c8dabe28ad08c96ebbc04b25592e727
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...ns-encoder_jpeg.cc-fix-libjpeg-build.patch | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 package/libheif/0001-libheif-plugins-encoder_jpeg.cc-fix-libjpeg-build.patch
diff --git a/package/libheif/0001-libheif-plugins-encoder_jpeg.cc-fix-libjpeg-build.patch b/package/libheif/0001-libheif-plugins-encoder_jpeg.cc-fix-libjpeg-build.patch
new file mode 100644
index 0000000000..5245327fe7
--- /dev/null
+++ b/package/libheif/0001-libheif-plugins-encoder_jpeg.cc-fix-libjpeg-build.patch
@@ -0,0 +1,47 @@
+From 33eb948240365434c845b618854403e82a229012 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 31 Jan 2024 21:04:37 +0100
+Subject: [PATCH] libheif/plugins/encoder_jpeg.cc: fix libjpeg build
+
+Fix the following libjpeg build failure raised since version 1.17.0 and
+https://github.com/strukturag/libheif/commit/ebd13a20b8b7f1964939642b08b662ef7e483f39
+because third argument of jpeg_mem_dest is defined as size_t* on libjpeg
+instead of unsigned long* on jpeg-turbo:
+
+/home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc: In function 'heif_error jpeg_encode_image(void*, const heif_image*, heif_image_input_class)':
+/home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:366:37: error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka 'unsigned int*'} [-fpermissive]
+ 366 | jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
+ | ^~~~~~~~~~
+ | |
+ | long unsigned int*
+
+Fix #1008 and #1086
+
+Fixes:
+ - http://autobuild.buildroot.org/results/8ca909564c8dabe28ad08c96ebbc04b25592e727
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/strukturag/libheif/pull/1120
+---
+ libheif/plugins/encoder_jpeg.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libheif/plugins/encoder_jpeg.cc b/libheif/plugins/encoder_jpeg.cc
+index d6c7854..21a5541 100644
+--- a/libheif/plugins/encoder_jpeg.cc
++++ b/libheif/plugins/encoder_jpeg.cc
+@@ -360,7 +360,11 @@ struct heif_error jpeg_encode_image(void* encoder_raw, const struct heif_image*
+ }
+
+ uint8_t* outbuffer = nullptr;
++#ifdef LIBJPEG_TURBO_VERSION
+ unsigned long outlength = 0;
++#else
++ size_t outlength = 0;
++#endif
+
+ jpeg_create_compress(&cinfo);
+ jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libheif: fix libjpeg build
2024-02-28 17:47 [Buildroot] [PATCH 1/1] package/libheif: fix libjpeg build Fabrice Fontaine
@ 2024-02-29 16:07 ` Peter Korsgaard
2024-03-18 13:25 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-02-29 16:07 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> libheif raises the following build failure with libjpeg since bump to
> version 1.17.5 in commit 5714126edac88e3adc043a482b262b319a907dd3 and
> https://github.com/strukturag/libheif/commit/ebd13a20b8b7f1964939642b08b662ef7e483f39
> /home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:
> In function 'heif_error jpeg_encode_image(void*, const heif_image*,
> heif_image_input_class)':
> /home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:366:37:
> error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka
> 'unsigned int*'} [-fpermissive]
> 366 | jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
> | ^~~~~~~~~~
> | |
> | long unsigned int*
> Fixes:
> - http://autobuild.buildroot.org/results/8ca909564c8dabe28ad08c96ebbc04b25592e727
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libheif: fix libjpeg build
2024-02-28 17:47 [Buildroot] [PATCH 1/1] package/libheif: fix libjpeg build Fabrice Fontaine
2024-02-29 16:07 ` Peter Korsgaard
@ 2024-03-18 13:25 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-03-18 13:25 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> libheif raises the following build failure with libjpeg since bump to
> version 1.17.5 in commit 5714126edac88e3adc043a482b262b319a907dd3 and
> https://github.com/strukturag/libheif/commit/ebd13a20b8b7f1964939642b08b662ef7e483f39
> /home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:
> In function 'heif_error jpeg_encode_image(void*, const heif_image*,
> heif_image_input_class)':
> /home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:366:37:
> error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka
> 'unsigned int*'} [-fpermissive]
> 366 | jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
> | ^~~~~~~~~~
> | |
> | long unsigned int*
> Fixes:
> - http://autobuild.buildroot.org/results/8ca909564c8dabe28ad08c96ebbc04b25592e727
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-18 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 17:47 [Buildroot] [PATCH 1/1] package/libheif: fix libjpeg build Fabrice Fontaine
2024-02-29 16:07 ` Peter Korsgaard
2024-03-18 13:25 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.