[SOLVED] How to build rust 1.67.1 on a system based on Slackware64-15.0?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- ./compiler/rustc_llvm/build.rs.orig 2020-11-16 08:01:53.000000000 -0600
|+++ ./compiler/rustc_llvm/build.rs 2020-11-19 13:46:21.222785372 -0600
--------------------------
patching file compiler/rustc_llvm/build.rs
Using Plan A...
Hunk #1 succeeded at 286 (offset 52 lines).
done
Building rustbuild
error: failed to get `cc` as a dependency of package `bootstrap v0.0.0 (/repo/x86_64/slint-15.0/source/rust/rustc-1.67.1-src/src/bootstrap)`
Caused by:
failed to load source for dependency `cc`
Caused by:
Unable to update registry `crates-io`
Caused by:
failed to update replaced source registry `crates-io`
Caused by:
failed to parse manifest at `/repo/x86_64/slint-15.0/source/rust/rustc-1.67.1-src/vendor/env_logger/Cargo.toml`
Caused by:
namespaced features with the `dep:` prefix are only allowed on the nightly channel and requires the `-Z namespaced-features` flag on the command-line
failed to run: /usr/bin/cargo build --manifest-path /repo/x86_64/slint-15.0/source/rust/rustc-1.67.1-src/src/bootstrap/Cargo.toml --frozen
Build completed unsuccessfully in 0:00:00
I never tried to build rust before. Any clue appreciated.
Last edited by Didier Spaier; 03-23-2023 at 03:01 PM.
Reason: Typo fix.
If you're not already running the specified version of the rust compiler that's able to build rust 1.67.1, then your best bet is to run the bottom part of rust.url (everything below the "exit 0") to download the bootstrap compiler from upstream. Then try running the SlackBuild again.
I've seen this error before, and it seems to be related to an LLVM version mismatch. The workaround is to use a rust build with a bundled LLVM library. Any one of the following should work:
Rebuild rust with SYSTEM_LLVM=NO
Install rust16 from SBo and use the export statements in the README file
Build rustup from SBo; install a 1.65+ stable toolchain and use that
EDIT: rust-1.68.1 (now in /testing) doesn't appear to have this problem, at least when building on -current.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.