Building Rust compiler 1.37 fails

I'm trying to build the rust compiler 1.37 using the x.py script. I'm developing applications for OpenWRT and that's why I need the 1.37 because newer version of rust compiler seems to have newer version of libc.

Before I didn't had problem building the rust compiler but now I get this error:

use of unstable library feature 'ptr_cast'

It seems it fails when the script tries to install cargo-vendor. I think it's because cargo-vendor uses the latest backtrace crate. Is there anyway to the tell script to use --locked so it doesn't download newer versions of a specific crate?

Sounds like you were trying to build rust using a stable version of rust. It's my understanding that generally that won't work because nightly features are used in rustc itself.

1 Like

What's the solution? Should I use dev instead?

I thought rustc used the RUSTC_BOOTSTRAP escape hatch to make even a stable compiler accept nightly features?

1 Like

I think the build will leave it alone if you've already installed that tool yourself.

When compiling a program the minimum required libc should be the one installed on the system you are compiling on unless I am missing something.

1 Like

It also matters which libc was used when std was compiled, but that's more of a glibc concern with symbol versioning, which shouldn't apply to OpenWRT development.

What specific target are you using for OpenWRT in your case?

1 Like

I manage you build the compiler by setting to channel to dev (channel="dev") in the config.toml file.

The toolchain I have is using glibc 2.26. And the openwrt target is an ARM.

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.