How to change rust glibc version?

hello people,i was able to build a cross compile toolchain for RISCV using rustup command,am able to get execulatble but problem is when i execute the binary on RISCV machine its showing as **" GLIBC_2.33 " not found **

The machine (x86) which i had built toolchain on has "ldd (glibc version 2.27)"
i want to build rust toolchain with glibc 2.32 or lower versions , can i get some help please??

You will have to compile on a system with the earliest supported version of glibc you want to support. This is a glibc limitation, not a rust one.

1 Like

Or when cross-compiling, your cross sysroot needs to have the minimum glibc you want to support.


This is one of the major use cases for Docker - providing a lower glibc version to your compiler.

1 Like

hi bjorn3 ,i have cross compiled it on my local x86 machine with GLIBC 2.27 thats the version i want but after cross compiling ,when i execute tht binary on RISCV machine,its still showing GLIBC 2.33 is required.

How did you install the cross-compilation toolchain? What's the version of glibc there?

hi cerber-ursi , i have a cross tool chain built from RISCV sources,and i was able to use Rustup command and able to add and cross compile rust binary (a simple ,i checked the GLIBC version its (2.33) .

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.