Open CarePackage17 opened 5 years ago
Looks like this is an upstream bug: https://bugs.llvm.org/show_bug.cgi?id=27743
I managed to get a local build of LLVM working with a space in the filename, but when we try to build rustc with it we run into a problem with the run-make
tests, since Makefile
syntax doesn't play nice with spaces.
FWIW I think if the run-make tests are pretty hard (or ugly) to fix, then we shouldn't worry too much -- I would rather invest in https://github.com/rust-lang/rust/issues/40713.
What is the suggested workaround for this? Build LLVM separately?
Edit: I'm building rust outside my user directory anyways so I just renamed my rust projects folder.
I will note the upstream issue is apparently from 2016 and it does not look like it was taken seriously.
As a workaround, I set [rust] codegen-backends = ["cranelift"]
in config.toml.
I'm going to remove the Windows label, Windows tends to have more spaces in filenames, but I don't think this is specific to windows in any other way.
I managed to get a local build of LLVM working with a space in the filename, but when we try to build rustc with it we run into a problem with the run-make tests, since Makefile syntax doesn't play nice with spaces.
@euclio can you share how you got this working?
Sure, though my fork is pretty out-of-date: https://github.com/euclio/llvm-project/tree/build-with-spaces
I just submitted a PR for this: https://github.com/rust-lang/rust/pull/101043. It's a temporary fix so that others will know what the issue is, although it doesn't attempt to fix any of the underlying issues.
Hi all,
I have followed the instructions to build Rust on Windows with the MSVC toolchain (note: this issue is not windows specific) and hit a build error in rustc_llvm; here's the output:
When inspecting the first
/I
argument tocl.exe
the build script seems to have problems with the space in my user name and breaks up the path so the compiler can't findBitReader.h
as a result.Edit: The offending code is in
librustc_llvm/build.rs
line 139:I'm not quite sure how to fix it myself; something like the Args iterator from std::env would do the job, but I've got no idea how to obtain it here.
Edit2: I just noticed something weird, the
/Fo
argument also contains my username and it seems to have been correctly escaped there.