Installing Rust Compiler on OpenWrt

Hello ,
I'm exploring the installation of the Rust compiler (rustc) on an OpenWrt. is openWRT support rust? if it's does, provide steps for installation.
I have tried to install for source, and I got

install: running ldconfig
./install.sh: line 690: ldconfig: command not found
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error
rust installed.

$ldd /usr/local/bin/rustc


> 	/lib/ld-linux-riscv64-lp64d.so.1 (0x3f9a6ab000)
> 	librustc_driver-3b54b13c5805f2bf.so => /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so (0x3f92253000)
> 	libstd-61f5b1021fe67be9.so => /usr/local/bin/../lib/libstd-61f5b1021fe67be9.so (0x3f92154000)
> 	libc.so.6 => /lib/ld-linux-riscv64-lp64d.so.1 (0x3f9a6ab000)
> 	libdl.so.2 => /lib/ld-linux-riscv64-lp64d.so.1 (0x3f9a6ab000)
> 	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x3f92141000)
> 	libpthread.so.0 => /lib/ld-linux-riscv64-lp64d.so.1 (0x3f9a6ab000)
> 	libm.so.6 => /lib/ld-linux-riscv64-lp64d.so.1 (0x3f9a6ab000)
> Error loading shared library ld-linux-riscv64-lp64d.so.1: No such file or directory (needed by /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so)
> Error loading shared library ld-linux-riscv64-lp64d.so.1: No such file or directory (needed by /usr/local/bin/../lib/libstd-61f5b1021fe67be9.so)
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: mallinfo: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __sched_cpualloc: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __register_atfork: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: backtrace_symbols_fd: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: backtrace: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __strftime_l: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __sched_cpufree: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: mallinfo: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __sched_cpualloc: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __register_atfork: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: backtrace_symbols_fd: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: backtrace: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __strftime_l: symbol not found
> Error relocating /usr/local/bin/../lib/librustc_driver-3b54b13c5805f2bf.so: __sched_cpufree: symbol not found
> Error relocating /usr/local/bin/../lib/libstd-61f5b1021fe67be9.so: __res_init: symbol not found
> Error relocating /usr/local/bin/../lib/libstd-61f5b1021fe67be9.so: gnu_get_libc_version: symbol not found
> Error relocating /usr/local/bin/../lib/libstd-61f5b1021fe67be9.so: __res_init: symbol not found
> Error relocating /usr/local/bin/../lib/libstd-61f5b1021fe67be9.so: gnu_get_libc_version: symbol not found

$ ld --version

GNU ld (GNU Binutils) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program h

as absolutely no warranty.
$ ldd --version

musl libc (riscv64)
Version 1.2.4
Dynamic Program Loader
Usage: ldd [options] [--] pathname

$ rustc --version
-ash: rustc: not found

Regards,
karthi

If installing from source includes compiling, then it's usually not supported.

You don't compile openwrt (or it's parts) on openwrt.

1 Like

any other possible ways to install rustc.?

If there's no premade package, not really.

i have tried with installation script got error

$ ./rustup-init.sh
info: downloading installer
Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure
curl: (22) The requested URL returned error: 404
rustup: installer for platform 'riscv64gc-unknown-linux-musl' not found, this may be unsupported

Well, have fun hacking the install script yourself, not that I think it's going to do you any good....