All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux kernel GCC plugins build failure with SDK toolchain
@ 2022-03-08  9:26 Sumit Garg
  2022-03-08 12:22 ` [OE-core] " Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Sumit Garg @ 2022-03-08  9:26 UTC (permalink / raw)
  To: OE-core
  Cc: raj.khem, Richard Purdie, Daniel Thompson, Ralph Siemsen,
	Nicolas Dechesne

Hi,

We have recently observed Linux kernel build failures while using SDK
toolchain (built using gcc-cross-canadian_<version>.bb) especially
after upstream changed the way to detect presence of GCC plugins here
[1]. Logs below:

  HOSTCXX scripts/gcc-plugins/arm_ssp_per_task_plugin.so
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  HOSTCC  scripts/asn1_compiler
  SYSNR   arch/arm/include/generated/asm/unistd-nr.h
  GEN     arch/arm/include/generated/asm/mach-types.h
  SYSTBL  arch/arm/include/generated/calls-oabi.S
  SYSTBL  arch/arm/include/generated/calls-eabi.S
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/empty.o
cc1: error: cannot load plugin ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so
   ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so: undefined symbol:
_ZN8opt_pass14set_pass_paramEjb
make[1]: *** [scripts/Makefile.build:280: scripts/mod/empty.o] Error 1
make: *** [Makefile:1214: prepare0] Error 2

This is reproducible with current OE core dunfell (gcc9.3) and
honister (gcc 11). But strangely this issue is not seen while building
kernel as part of OE build using normal cross toolchain (built using
gcc-cross_<version>.bb).

I have tried to compare the two recipes: gcc-cross_<version>.bb and
gcc-cross-canadian_<version>.bb but can't find anything explicit which
can cause this behaviour. Also, following hack does disable GCC
plugins detection during kernel build leading to a successful build:

diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 553ef7fe62..5529932472 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -73,8 +73,6 @@ FILES_${PN} = "\
     ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
     ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
     ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
-    ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
-    ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \
     ${includedir}/c++/${BINV} \
     ${prefix}/${TARGET_SYS}/bin/* \
     ${prefix}/${TARGET_SYS}/lib/* \

Thoughts?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1e860048c53ee77ee9870dcce94847a28544b753

Regards,
Sumit


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

* Re: [OE-core] Linux kernel GCC plugins build failure with SDK toolchain
  2022-03-08  9:26 Linux kernel GCC plugins build failure with SDK toolchain Sumit Garg
@ 2022-03-08 12:22 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2022-03-08 12:22 UTC (permalink / raw)
  To: Sumit Garg
  Cc: OE-core, Khem Raj, Richard Purdie, Daniel Thompson,
	Ralph Siemsen, Nicolas Dechesne

On Tue, Mar 8, 2022 at 4:26 AM Sumit Garg <sumit.garg@linaro.org> wrote:
>
> Hi,
>
> We have recently observed Linux kernel build failures while using SDK
> toolchain (built using gcc-cross-canadian_<version>.bb) especially
> after upstream changed the way to detect presence of GCC plugins here
> [1]. Logs below:
>
>   HOSTCXX scripts/gcc-plugins/arm_ssp_per_task_plugin.so
>   HOSTCC  scripts/kallsyms
>   HOSTCC  scripts/sorttable
>   HOSTCC  scripts/asn1_compiler
>   SYSNR   arch/arm/include/generated/asm/unistd-nr.h
>   GEN     arch/arm/include/generated/asm/mach-types.h
>   SYSTBL  arch/arm/include/generated/calls-oabi.S
>   SYSTBL  arch/arm/include/generated/calls-eabi.S
>   HOSTCC  scripts/mod/mk_elfconfig
>   CC      scripts/mod/empty.o
> cc1: error: cannot load plugin ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so
>    ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so: undefined symbol:
> _ZN8opt_pass14set_pass_paramEjb
> make[1]: *** [scripts/Makefile.build:280: scripts/mod/empty.o] Error 1
> make: *** [Makefile:1214: prepare0] Error 2
>
> This is reproducible with current OE core dunfell (gcc9.3) and
> honister (gcc 11). But strangely this issue is not seen while building
> kernel as part of OE build using normal cross toolchain (built using
> gcc-cross_<version>.bb).
>
> I have tried to compare the two recipes: gcc-cross_<version>.bb and
> gcc-cross-canadian_<version>.bb but can't find anything explicit which
> can cause this behaviour. Also, following hack does disable GCC
> plugins detection during kernel build leading to a successful build:

It is likely a variant of a bug that I'm working on now, feel free to
add your steps to reproduce the issue there.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14681

Cheers,

Bruce

>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> index 553ef7fe62..5529932472 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> @@ -73,8 +73,6 @@ FILES_${PN} = "\
>      ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
>      ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
>      ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
> -    ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
> -    ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \
>      ${includedir}/c++/${BINV} \
>      ${prefix}/${TARGET_SYS}/bin/* \
>      ${prefix}/${TARGET_SYS}/lib/* \
>
> Thoughts?
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1e860048c53ee77ee9870dcce94847a28544b753
>
> Regards,
> Sumit
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#162877): https://lists.openembedded.org/g/openembedded-core/message/162877
> Mute This Topic: https://lists.openembedded.org/mt/89633477/1050810
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

end of thread, other threads:[~2022-03-08 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08  9:26 Linux kernel GCC plugins build failure with SDK toolchain Sumit Garg
2022-03-08 12:22 ` [OE-core] " Bruce Ashfield

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.