Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libjxl: fix riscv build
@ 2023-09-15 19:23 Julien Olivain
  2023-09-15 21:09 ` Yann E. MORIN
  2023-09-24 18:38 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Julien Olivain @ 2023-09-15 19:23 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

libjxl was failing to build for riscv targets, since commit ff7c37e57
"package/libjxl: security bump to version 0.8.1". Build was failing with
output:

    /build/libjxl-0.8.1/lib/jxl/enc_xyb.cc: In function 'jxl::Image3F jxl::N_SCALAR::TransformToLinearRGB(const jxl::Image3F&, const jxl::ColorEncoding&, float, const JxlCmsInterface&, jxl::ThreadPool*)':
    /build/libjxl-0.8.1/lib/jxl/enc_xyb.cc:223:21: error: variable 'std::atomic<bool> ok' has initializer but incomplete type
      223 |   std::atomic<bool> ok{true};
          |                     ^~

This build failure was due to a missing <atomic> header inclusion. For
some reason, the build failure was observed only with RISC-V toolchains.

This commit fixes the issue by adding an upstream commit, not yet in a
package release. See [1].

Fixes:
http://autobuild.buildroot.org/results/121/12107bc7aea7afae1d2fb935d31b44eee6ea1501

[1] https://github.com/libjxl/libjxl/commit/22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Patch tested on branch master at commit 3557a7b with commands:

    make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.package.test_libjxl
    ...
    OK

    utils/test-pkg -a -p libjxl
    ...
    45 builds, 11 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
    
Note: this patch was also tested on top of the patch proposed at:
https://patchwork.ozlabs.org/project/buildroot/patch/20230914215606.309735-1-fontaine.fabrice@gmail.com/
---
 ...ic-content-to-fix-gcc-compilation-fo.patch | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch

diff --git a/package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch b/package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch
new file mode 100644
index 0000000000..b856b00728
--- /dev/null
+++ b/package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch
@@ -0,0 +1,47 @@
+From 42e944a471672dae8522fbcf161941895ba16632 Mon Sep 17 00:00:00 2001
+From: Eastdong <31920925+IEAST@users.noreply.github.com>
+Date: Thu, 23 Feb 2023 06:08:36 +0800
+Subject: [PATCH] Add missing <atomic> content to fix gcc compilation for RISCV
+ architecture. (#2211)
+
+* Add missing <atomic> content to fix gcc compilation for RISCV architecture.
+
+* add name to AUTHORS
+
+* lint fix
+
+Co-authored-by: Moritz Firsching <firsching@google.com>
+Upstream: https://github.com/libjxl/libjxl/commit/22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc
+Signed-off-by: Julien Olivain <ju.o@free.fr>
+---
+ AUTHORS            | 1 +
+ lib/jxl/enc_xyb.cc | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/AUTHORS b/AUTHORS
+index 44dcc409..3340422d 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
+ David Burnett <vargolsoft@gmail.com>
+ Dirk Lemstra <dirk@lemstra.org>
+ Don Olmstead <don.j.olmstead@gmail.com>
++Dong Xu <xdong181@gmail.com>
+ Even Rouault <even.rouault@spatialys.com>
+ Fred Brennan <copypaste@kittens.ph>
+ Heiko Becker <heirecka@exherbo.org>
+diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
+index c7310765..2fd5d025 100644
+--- a/lib/jxl/enc_xyb.cc
++++ b/lib/jxl/enc_xyb.cc
+@@ -6,6 +6,7 @@
+ #include "lib/jxl/enc_xyb.h"
+ 
+ #include <algorithm>
++#include <atomic>
+ #include <cstdlib>
+ 
+ #undef HWY_TARGET_INCLUDE
+-- 
+2.41.0
+
-- 
2.41.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/libjxl: fix riscv build
  2023-09-15 19:23 [Buildroot] [PATCH 1/1] package/libjxl: fix riscv build Julien Olivain
@ 2023-09-15 21:09 ` Yann E. MORIN
  2023-09-24 18:38 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-09-15 21:09 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Julien, All,

On 2023-09-15 21:23 +0200, Julien Olivain spake thusly:
> libjxl was failing to build for riscv targets, since commit ff7c37e57
> "package/libjxl: security bump to version 0.8.1". Build was failing with
> output:
> 
>     /build/libjxl-0.8.1/lib/jxl/enc_xyb.cc: In function 'jxl::Image3F jxl::N_SCALAR::TransformToLinearRGB(const jxl::Image3F&, const jxl::ColorEncoding&, float, const JxlCmsInterface&, jxl::ThreadPool*)':
>     /build/libjxl-0.8.1/lib/jxl/enc_xyb.cc:223:21: error: variable 'std::atomic<bool> ok' has initializer but incomplete type
>       223 |   std::atomic<bool> ok{true};
>           |                     ^~
> 
> This build failure was due to a missing <atomic> header inclusion. For
> some reason, the build failure was observed only with RISC-V toolchains.
> 
> This commit fixes the issue by adding an upstream commit, not yet in a
> package release. See [1].
> 
> Fixes:
> http://autobuild.buildroot.org/results/121/12107bc7aea7afae1d2fb935d31b44eee6ea1501
> 
> [1] https://github.com/libjxl/libjxl/commit/22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> Patch tested on branch master at commit 3557a7b with commands:
> 
>     make check-package
>     ...
>     0 warnings generated
> 
>     support/testing/run-tests \
>         -d dl -o output_folder \
>         tests.package.test_libjxl
>     ...
>     OK
> 
>     utils/test-pkg -a -p libjxl
>     ...
>     45 builds, 11 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
>     
> Note: this patch was also tested on top of the patch proposed at:
> https://patchwork.ozlabs.org/project/buildroot/patch/20230914215606.309735-1-fontaine.fabrice@gmail.com/
> ---
>  ...ic-content-to-fix-gcc-compilation-fo.patch | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch
> 
> diff --git a/package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch b/package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch
> new file mode 100644
> index 0000000000..b856b00728
> --- /dev/null
> +++ b/package/libjxl/0002-Add-missing-atomic-content-to-fix-gcc-compilation-fo.patch
> @@ -0,0 +1,47 @@
> +From 42e944a471672dae8522fbcf161941895ba16632 Mon Sep 17 00:00:00 2001
> +From: Eastdong <31920925+IEAST@users.noreply.github.com>
> +Date: Thu, 23 Feb 2023 06:08:36 +0800
> +Subject: [PATCH] Add missing <atomic> content to fix gcc compilation for RISCV
> + architecture. (#2211)
> +
> +* Add missing <atomic> content to fix gcc compilation for RISCV architecture.
> +
> +* add name to AUTHORS
> +
> +* lint fix
> +
> +Co-authored-by: Moritz Firsching <firsching@google.com>
> +Upstream: https://github.com/libjxl/libjxl/commit/22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc
> +Signed-off-by: Julien Olivain <ju.o@free.fr>
> +---
> + AUTHORS            | 1 +
> + lib/jxl/enc_xyb.cc | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +diff --git a/AUTHORS b/AUTHORS
> +index 44dcc409..3340422d 100644
> +--- a/AUTHORS
> ++++ b/AUTHORS
> +@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
> + David Burnett <vargolsoft@gmail.com>
> + Dirk Lemstra <dirk@lemstra.org>
> + Don Olmstead <don.j.olmstead@gmail.com>
> ++Dong Xu <xdong181@gmail.com>
> + Even Rouault <even.rouault@spatialys.com>
> + Fred Brennan <copypaste@kittens.ph>
> + Heiko Becker <heirecka@exherbo.org>
> +diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
> +index c7310765..2fd5d025 100644
> +--- a/lib/jxl/enc_xyb.cc
> ++++ b/lib/jxl/enc_xyb.cc
> +@@ -6,6 +6,7 @@
> + #include "lib/jxl/enc_xyb.h"
> + 
> + #include <algorithm>
> ++#include <atomic>
> + #include <cstdlib>
> + 
> + #undef HWY_TARGET_INCLUDE
> +-- 
> +2.41.0
> +
> -- 
> 2.41.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
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/libjxl: fix riscv build
  2023-09-15 19:23 [Buildroot] [PATCH 1/1] package/libjxl: fix riscv build Julien Olivain
  2023-09-15 21:09 ` Yann E. MORIN
@ 2023-09-24 18:38 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-09-24 18:38 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:

 > libjxl was failing to build for riscv targets, since commit ff7c37e57
 > "package/libjxl: security bump to version 0.8.1". Build was failing with
 > output:

 >     /build/libjxl-0.8.1/lib/jxl/enc_xyb.cc: In function 'jxl::Image3F jxl::N_SCALAR::TransformToLinearRGB(const jxl::Image3F&, const jxl::ColorEncoding&, float, const JxlCmsInterface&, jxl::ThreadPool*)':
 >     /build/libjxl-0.8.1/lib/jxl/enc_xyb.cc:223:21: error: variable 'std::atomic<bool> ok' has initializer but incomplete type
 >       223 |   std::atomic<bool> ok{true};
 >           |                     ^~

 > This build failure was due to a missing <atomic> header inclusion. For
 > some reason, the build failure was observed only with RISC-V toolchains.

 > This commit fixes the issue by adding an upstream commit, not yet in a
 > package release. See [1].

 > Fixes:
 > http://autobuild.buildroot.org/results/121/12107bc7aea7afae1d2fb935d31b44eee6ea1501

 > [1] https://github.com/libjxl/libjxl/commit/22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc

 > Signed-off-by: Julien Olivain <ju.o@free.fr>

Committed to 2023.02.x, 2023.05.x and 2023.08.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:[~2023-09-24 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15 19:23 [Buildroot] [PATCH 1/1] package/libjxl: fix riscv build Julien Olivain
2023-09-15 21:09 ` Yann E. MORIN
2023-09-24 18:38 ` Peter Korsgaard

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