rust-lang / rust-lang/rustc_codegen_gcc
Building is difficult
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 105
- Avg merge
- 8h 20m
- Merged PRs (30d)
- 14
Description
I managed to build this repo, but I found the build process quite difficult, primarily due to the various shell scripts
prepare.shpulls hyperfine, rand, regex and simple-raytracer, none of which are required to buildrustc_codegen_gccor rust sysroot. These benchmark programs should be moved into a separate scriptsprepare.shcallscargo build, which shouldn't be done in the preparation stage. Additionally this is bound to fail as it doesn't know where to findlibgccjit.so- The CIs run
prepare_build.shinstead, which has the right behaviour and is justprepare.shif the above two steps are removed. Perhaps update README to replace mentions ofprepare.shwithprepare_build.sh? - README calls for
LIBRARY_PATHANDLD_LIBRARY_PATHto be set while calling./build.sh, but this is redundant as the script sets them https://github.com/rust-lang/rustc_codegen_gcc/blob/0cbf2b97157e0c3e2d1f809453a527bed4689247/build.sh#L44-L45 build.sh,config.sh, andtest.shoverwrites the wholeLIBRARY_PATHandLD_LIBRARY_PATH, but the user environment may be non-empty (e.g. when under an environment managed by SPACK) . They should be appended instead.
These are all very easy to clean up, though you may have some other considerations so I thought I'd open an issue instead of a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read prepare.sh and compare it with prepare_build.sh, then inspect build.sh, config.sh, test.sh, and the README. Check the CI usage and current environment-variable handling first. Done means preparation avoids unnecessary builds and benchmarks, README instructions match the scripts, and existing LIBRARY_PATH and LD_LIBRARY_PATH values are preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, shell
- Domain
- build-system, documentation
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100