All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clang: Fix nativesdk build after recipe splits
@ 2025-09-18  3:05 Khem Raj
  2025-09-18  8:31 ` [OE-core] " Joao Marcos Costa
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2025-09-18  3:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj, Ross Burton

Splitting llvm, tblgen into their own recipes means we
have to ensure nativesdk clang build can find these tools
in native sysroot, which is would previously build and use
on its own.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/clang/clang_git.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
index 9e977379325..bcc799f286b 100644
--- a/meta/recipes-devtools/clang/clang_git.bb
+++ b/meta/recipes-devtools/clang/clang_git.bb
@@ -78,6 +78,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
 
 EXTRA_OECMAKE:append:class-nativesdk = "\
                   -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
+                  -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
+                  -DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${STAGING_BINDIR_NATIVE}/clang-tidy-confusable-chars-gen \
                   -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
                   -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
                   -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \


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

* Re: [OE-core] [PATCH] clang: Fix nativesdk build after recipe splits
  2025-09-18  3:05 [PATCH] clang: Fix nativesdk build after recipe splits Khem Raj
@ 2025-09-18  8:31 ` Joao Marcos Costa
  2025-09-18 15:42   ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Joao Marcos Costa @ 2025-09-18  8:31 UTC (permalink / raw)
  To: raj.khem, openembedded-core; +Cc: Ross Burton, Mathieu Dubois-Briand

Hello, Khem

On 9/18/25 05:05, Khem Raj via lists.openembedded.org wrote:
> Splitting llvm, tblgen into their own recipes means we
> have to ensure nativesdk clang build can find these tools
> in native sysroot, which is would previously build and use
> on its own.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Ross Burton <ross.burton@arm.com>
> ---
>   meta/recipes-devtools/clang/clang_git.bb | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
> index 9e977379325..bcc799f286b 100644
> --- a/meta/recipes-devtools/clang/clang_git.bb
> +++ b/meta/recipes-devtools/clang/clang_git.bb
> @@ -78,6 +78,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
>   
>   EXTRA_OECMAKE:append:class-nativesdk = "\
>                     -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
> +                  -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
> +                  -DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${STAGING_BINDIR_NATIVE}/clang-tidy-confusable-chars-gen \
>                     -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
>                     -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
>                     -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#223625): https://lists.openembedded.org/g/openembedded-core/message/223625
> Mute This Topic: https://lists.openembedded.org/mt/115304299/8026893
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [joaomarcos.costa@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


I spotted this error in the autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2266/steps/12/logs/stdio

Could you please take a look?
Thanks!

-- 
Best regards,
João Marcos Costa


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

* Re: [OE-core] [PATCH] clang: Fix nativesdk build after recipe splits
  2025-09-18  8:31 ` [OE-core] " Joao Marcos Costa
@ 2025-09-18 15:42   ` Khem Raj
  2025-09-18 23:23     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2025-09-18 15:42 UTC (permalink / raw)
  To: Joao Marcos Costa; +Cc: openembedded-core, Ross Burton, Mathieu Dubois-Briand

[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]

On Thu, Sep 18, 2025 at 1:31 AM Joao Marcos Costa <
joaomarcos.costa@bootlin.com> wrote:

> Hello, Khem
>
> On 9/18/25 05:05, Khem Raj via lists.openembedded.org wrote:
> > Splitting llvm, tblgen into their own recipes means we
> > have to ensure nativesdk clang build can find these tools
> > in native sysroot, which is would previously build and use
> > on its own.
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Ross Burton <ross.burton@arm.com>
> > ---
> >   meta/recipes-devtools/clang/clang_git.bb | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/clang/clang_git.bb
> b/meta/recipes-devtools/clang/clang_git.bb
> > index 9e977379325..bcc799f286b 100644
> > --- a/meta/recipes-devtools/clang/clang_git.bb
> > +++ b/meta/recipes-devtools/clang/clang_git.bb
> > @@ -78,6 +78,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
> >
> >   EXTRA_OECMAKE:append:class-nativesdk = "\
> >
>  -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake'
> \
> > +
> -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
> > +
> -DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${STAGING_BINDIR_NATIVE}/clang-tidy-confusable-chars-gen
> \
> >
>  -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
> >
>  -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
> >
>  -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#223625):
> https://lists.openembedded.org/g/openembedded-core/message/223625
> > Mute This Topic: https://lists.openembedded.org/mt/115304299/8026893
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> joaomarcos.costa@bootlin.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
>
> I spotted this error in the autobuilder:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2266/steps/12/logs/stdio
>
> Could you please take a look?
> Thanks!
>

Logs are showing clang-native failure while the change in this patch is
limited to nativesdk clang. So it is unrelated to this patch

However change seems to be related to llvm recipe separation series since
clang is building this tool during its build and trying to use it from its
build area but it’s perhaps not finding libllvm from native sysroot

>
> --
> Best regards,
> João Marcos Costa
>

[-- Attachment #2: Type: text/html, Size: 4706 bytes --]

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

* Re: [OE-core] [PATCH] clang: Fix nativesdk build after recipe splits
  2025-09-18 15:42   ` Khem Raj
@ 2025-09-18 23:23     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2025-09-18 23:23 UTC (permalink / raw)
  To: Joao Marcos Costa; +Cc: openembedded-core, Ross Burton, Mathieu Dubois-Briand

On Thu, Sep 18, 2025 at 8:42 AM Khem Raj <raj.khem@gmail.com> wrote:
>
>
>
> On Thu, Sep 18, 2025 at 1:31 AM Joao Marcos Costa <joaomarcos.costa@bootlin.com> wrote:
>>
>> Hello, Khem
>>
>> On 9/18/25 05:05, Khem Raj via lists.openembedded.org wrote:
>> > Splitting llvm, tblgen into their own recipes means we
>> > have to ensure nativesdk clang build can find these tools
>> > in native sysroot, which is would previously build and use
>> > on its own.
>> >
>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > Cc: Ross Burton <ross.burton@arm.com>
>> > ---
>> >   meta/recipes-devtools/clang/clang_git.bb | 2 ++
>> >   1 file changed, 2 insertions(+)
>> >
>> > diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
>> > index 9e977379325..bcc799f286b 100644
>> > --- a/meta/recipes-devtools/clang/clang_git.bb
>> > +++ b/meta/recipes-devtools/clang/clang_git.bb
>> > @@ -78,6 +78,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
>> >
>> >   EXTRA_OECMAKE:append:class-nativesdk = "\
>> >                     -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
>> > +                  -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
>> > +                  -DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${STAGING_BINDIR_NATIVE}/clang-tidy-confusable-chars-gen \
>> >                     -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
>> >                     -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
>> >                     -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
>> >
>> >
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#223625): https://lists.openembedded.org/g/openembedded-core/message/223625
>> > Mute This Topic: https://lists.openembedded.org/mt/115304299/8026893
>> > Group Owner: openembedded-core+owner@lists.openembedded.org
>> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [joaomarcos.costa@bootlin.com]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >
>>
>>
>> I spotted this error in the autobuilder:
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2266/steps/12/logs/stdio
>>
>> Could you please take a look?
>> Thanks!
>
>
> Logs are showing clang-native failure while the change in this patch is limited to nativesdk clang. So it is unrelated to this patch
>
> However change seems to be related to llvm recipe separation series since clang is building this tool during its build and trying to use it from its build area but it’s perhaps not finding libllvm from native sysroot

I poked at the worker on AB where it is failing, I think there is a
cmake patch which is problematic.

https://patchwork.yoctoproject.org/project/oe-core/patch/20250915145134.192581-1-ross.burton@arm.com/

clang builds some tools during build and links them to in-tree libLLVM
if it is built in monolithic builds ( which we do ) and this option
omits build time rpaths which causes this problem.

>>



>>
>> --
>> Best regards,
>> João Marcos Costa


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

end of thread, other threads:[~2025-09-18 23:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18  3:05 [PATCH] clang: Fix nativesdk build after recipe splits Khem Raj
2025-09-18  8:31 ` [OE-core] " Joao Marcos Costa
2025-09-18 15:42   ` Khem Raj
2025-09-18 23:23     ` Khem Raj

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.