All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/libjxl: fix riscv build
Date: Fri, 15 Sep 2023 23:09:06 +0200	[thread overview]
Message-ID: <20230915210906.GC2571@scaer> (raw)
In-Reply-To: <20230915192308.1432032-1-ju.o@free.fr>

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

  reply	other threads:[~2023-09-15 21:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 19:23 [Buildroot] [PATCH 1/1] package/libjxl: fix riscv build Julien Olivain
2023-09-15 21:09 ` Yann E. MORIN [this message]
2023-09-24 18:38 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230915210906.GC2571@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.