i am facing GLIBC compatibility issues with newer version gcc 12.2
Log:-
/home/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx8.0.0/12.2.0/cc1: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx8.0.0/12.2.0/cc1)
dynamic dependency info:-
ldd /home/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx8.0.0/12.2.0/cc1
linux-vdso.so.1 (0x00007ffd77bc4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fef54267000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fef53ec9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fef53ad8000)
/lib64/ld-linux-x86-64.so.2 (0x00007fef5446b000)
As per the log , i understood that minimum glibc version required for gcc 12.2 is GLIBC 2.25. But on my host i have GLIBC version as 2.23 as follows:-
/home/kumpt/test/sw% /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11.3) stable release version 2.23, by Roland McGrath et al
I have libc.so.6 library with GLIBC 2.27 version at path :- /home/kumpt/targets/lib64/libc.so.6
I try to load the path via LD_LIBRARY_PATH = /home/kumpt/targets/lib64/libc.so.6 to load the compatible library first to make cc1 to work.
But i am facing segmentation fault issue , While running cc1
ldd /home/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx8.0.0/12.2.0/cc1
Segmentation fault
cc1 and libc.so.6 both are based out of 64-bit arch:-
file /home/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx8.0.0/12.2.0/cc1
/home/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx8.0.0/12.2.0/cc1 : ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
file /home/kumpt/targets/lib64/libc.so.6
/home/kumpt/targets/lib64/libc.so.6:ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
Why am i hitting into Segmentation fault issue. How can i workaround this ? Please advice.