AUTHOR: rhubarbpieguy@vivaldi.net DATE: 2023-04-25 LICENSE: GNU Free Documentation License Version 1.3 SYNOPSIS: Compiling rustc without an internet connection. DESCRIPTION: The rustc documentation requires an internet connection when compiling to download dependencies not included in the source tarball. This hint presents a method to avoid an internet connection when compiling. ATTACHMENTS: none PREREQUISITES: This hint requires that you have sufficient knowledge of LinuxFromScratch. This hint is applicable only for users that follow the LFS development book as of the submission date above. HINT: DOWNLOADING DEPENDENCIES ------------------------ From the rustc source directory, edit src/stage0.json. Select one dependency file each of cargo, rustc, and rust-std for your system. Use .xz, not .gz files. Examples using rustc-1.67.1: dist/2023-01-10/cargo-1.66.1-x86_64-unknown-linux-gnu.tar.xz dist/2023-01-10/rustc-1.66.1-x86_64-unknown-linux-gnu.tar.xz dist/2023-01-10/rust-std-1.66.1-x86_64-unknown-linux-gnu.tar.xz Download the dependencies from https://static.rust-lang.org to a location of your choice. Note the yyyy-mm-dd string in the dependency files for later use. From the examples use 2023-01-10. COMPILING --------- From the source directory, mkdir -pv build/cache/2023-01-10 (use above string). Copy the downloaded dependencies to build/cache/2023-01-10. Follow the documentation and rustc will compile without an internet connection. ACKNOWLEDGEMENTS: CHANGELOG: [2023-04-25] * Initial hint.