Glibc_2.31.bb:do_compile failed

HI,
Im trying to build yocto project for apalis imx6 but getting error some packages.
My Host PC has 4GB RAM and 400GB free space in disk.

Below error message is coming after bitbake

| /media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/recipe-sysroot-native/usr/bin/arm-tdx-linux-gnueabi/../../libexec/arm-tdx-linux-gnueabi/gcc/arm-tdx-linux-gnueabi/9.3.0/ld.bfd: /media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/build-arm-tdx-linux-gnueabi/libc_nonshared.a(pthread_atfork.oS): in function `__pthread_atfork':
| /usr/src/debug/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/git/nptl/pthread_atfork.c:51: undefined reference to `__dso_handle'
| /media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/recipe-sysroot-native/usr/bin/arm-tdx-linux-gnueabi/../../libexec/arm-tdx-linux-gnueabi/gcc/arm-tdx-linux-gnueabi/9.3.0/ld.bfd: /media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/build-arm-tdx-linux-gnueabi/rt/librt.so: hidden symbol `__dso_handle' isn't defined
| /media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/recipe-sysroot-native/usr/bin/arm-tdx-linux-gnueabi/../../libexec/arm-tdx-linux-gnueabi/gcc/arm-tdx-linux-gnueabi/9.3.0/ld.bfd: final link failed: bad value
| collect2: error: ld returned 1 exit status
| make[2]: *** [../Makerules:536: /media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/build-arm-tdx-linux-gnueabi/rt/librt.so] Error 1
| make[2]: Leaving directory '/media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/git/rt'
| make[1]: *** [Makefile:490: rt/others] Error 2
| make[1]: Leaving directory '/media/medha/C8743FE9743FD940/oe-core/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/glibc/2.31+gitAUTOINC+6fdf971c9d-r0/git'
| make: *** [Makefile:9: all] Error 2
| WARNING: exit code 1 from a shell command.

ERROR: Task (/media/medha/C8743FE9743FD940/oe-core/oe-core/build/../layers/openembedded-core/meta/recipes-core/glibc/glibc_2.31.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4948 tasks of which 4946 didn't need to be rerun and 2 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 25 seconds

Summary: 2 tasks failed:
  /media/medha/C8743FE9743FD940/oe-core/oe-core/build/../layers/openembedded-core/meta/recipes-kernel/linux-firmware/linux-firmware_20200817.bb:do_populate_sysroot
  /media/medha/C8743FE9743FD940/oe-core/oe-core/build/../layers/openembedded-core/meta/recipes-core/glibc/glibc_2.31.bb:do_compile
Summary: There were 19 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

Tried all the things available on internet but unable to solve the issue.
Dear Toradex community please help me on this.

What exact hardware (module and carrier board) and Software versions of things are you talking about?
And what exactly does your build environment look like (e.g. CPU, distribution)?

Can anyone help on this issue please.
i am trying to build yocto for x86 machine .when i use bitbake iam getting this error.

| /media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/…/…/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/10.2.0/ld.bfd: /media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/build-x86_64-poky-linux/nptl/libpthread_pic.a(old_pthread_atfork.os): in function __dyn_pthread_atfork': | /usr/src/debug/glibc/2.33-r0/git/nptl/pthread_atfork.c:51: undefined reference to __dso_handle’
| /media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/…/…/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/10.2.0/ld.bfd: /media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/build-x86_64-poky-linux/nptl/libpthread_pic.a(old_pthread_atfork.os): relocation R_X86_64_PC32 against undefined hidden symbol `__dso_handle’ can not be used when making a shared object
| /media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/…/…/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/10.2.0/ld.bfd: final link failed: bad value
| collect2: error: ld returned 1 exit status
| make[2]: *** […/Makerules:536: /media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/build-x86_64-poky-linux/nptl/libpthread.so] Error 1
| make[2]: Leaving directory ‘/media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/git/nptl’
| make[1]: *** [Makefile:499: nptl/others] Error 2
| make[1]: Leaving directory ‘/media/shivashankar/Workspace/x86_yocto/poky/buid_x86/tmp/work/core2-64-poky-linux/glibc/2.33-r0/git’
| make: *** [Makefile:9: all] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/media/shivashankar/Workspace/x86_yocto/poky/meta/recipes-core/glibc/glibc_2.33.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 473 tasks of which 470 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/media/shivashankar/Workspace/x86_yocto/poky/meta/recipes-core/glibc/glibc_2.33.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Hi @shivashankarthati ,

Can you please share exact commands and steps you are running? Also kindly share the machine you are trying to build?

For some common issue you can check below link

Best Regards

Ritesh Kumar