Cargo build error with v1.78 in sdk for poky build

Hi, I am a beginner to rust and came across following error:

Compiling a simple hello world rust program in sdk build in poky gives following error in rust v1.78.

Command: . /home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/environment-setup-core2-64-poky-linux > /dev/null;

cd /home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk//hello; cargo build --target x86_64-pokysdk-linux-gnu;' returned non-zero exit status 101

Standard Output: warning: /home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/core2-64-poky-linux/home/cargo/config is deprecated in favor of config.toml

note: if you need to support cargo 1.38 or earlier, you can symlink config to config.toml

Compiling hello v0.1.0 (/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello)

rustc: symbol lookup error: /home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/../../lib/libc.so.6: undefined symbol: __tunable_is_initialized, version GLIBC_PRIVATE

process didn't exit successfully: `CARGO=/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/cargo.real CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=hello CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 CARGO_RUSTC_CURRENT_DIR=/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello LD_LIBRARY_PATH='/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello/target/debug/deps:/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/../../usr/lib:/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/../../lib' rustc --crate-name build_script_build --edition=2021 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=208 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C metadata=fdb3223b17fc3d7f -C extra-filename=-fdb3223b17fc3d7f --out-dir /home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello/target/debug/build/hello-fdb3223b17fc3d7f -C incremental=/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello/target/debug/incremental -L dependency=/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/hello/target/debug/deps` (exit status: 127)

error: could not compile hello (build script)

error: rustc interrupted by SIGSEGV, printing backtrace
/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/../../usr/lib/librustc_driver-144f492bbe889313.so(+0xa51505)[0x7fe0d2a13505]

similar stack frames....

/home/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/../../lib/libc.so.6(+0xec26c)[0x7fe0d1d9326c]

note: we would appreciate a report at GitHub - rust-lang/rust: Empowering everyone to build reliable and efficient software.

note: backtrace dumped due to SIGSEGV! resuming signal

error: could not compile hello (build script)

I tested the same case with 1..77.2 and 1..77.2 rustc/cargo versions and the cargo build successfully. But, above errror is seen in 1.78.

Why the glibc symbol __tunable_is_initialized is not defined in 1.78? How to fix this error?
Thanks in advance!

Rust uses your system's libc version. The compiler version has nothing to do with it. I'm not super familiar with all the details, but it sounds like your system may have a libc version that it too old.

Try to find the version of your "glibc" package, try updating your system.

You should provide your system details too.

EDIT: It looks like you may be using some kind of SDK too with a bundled libc; if that's the case you should report this failure to them.

The glibc version is 2.39(latest) with the built sdk.

However, the libraries are unable to find definition.
I grepped and found the definition in,

sysroots/core2-64-poky-linux/usr/src/debug/glibc/2.39+git/elf/dl-tunables.c, as follows:
#L152
152 bool
153 __tunable_is_initialized (tunable_id_t id)
154 {
155 return tunable_list[id].initialized;
156 }

Why does it still complain?