Skip to content

rustc stage 2 and rsutup toolchain link fails with the path with white space #111901

@dupeiran001

Description

@dupeiran001

although it's not recommended to use a path with white space

I tried to compile my rustc stage 2, following the guide.

my environment is macOS 13.4

I have my dev dir in iCloud, which absolute path is : /Users/xxx/Library/Mobile Documents/com~apple~CloudDocs/Develop, has a white space in it.

when trying to link to the rustup toolchain with command

rustup toolchain link stage1 build/host/stage1

it fails with message:

error: not a file: 'build/host/stage1/bin/rustc'

these all fail for linking stage0 or stage2

but it works well if I copy the whole dir to a non-spacing dir

it's all the same to rustc compilation with command:

./x.py build --stage 2

with error message:

 Compiling rustc_smir v0.0.0 (/Users/dpr/Library/Mobile Documents/com~apple~CloudDocs/Develop/Rust/rust/compiler/rustc_smir)
The following warnings were emitted during compilation:

warning: clang: error: no such file or directory: 'Documents/com~apple~CloudDocs/Develop/Rust/rust/build/aarch64-apple-darwin/ci-llvm/include'

error: failed to run custom build command for `rustc_llvm v0.0.0 (/Users/dpr/Library/Mobile Documents/com~apple~CloudDocs/Develop/Rust/rust/compiler/rustc_llvm)`

Caused by:
  process didn't exit successfully: `/Users/dpr/Library/Mobile Documents/com~apple~CloudDocs/Develop/Rust/rust/build/aarch64-apple-darwin/stage0-rustc/release/build/rustc_llvm-e9be9ad0694a7cad/build-script-build` (exit status: 1)

// with some other std out
......

the line staring with warning obviously prints only the latter parts of the dir after the space.

I suppose maybe it fails to recognize the space in the path and separate it into two?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions