Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

No "stage2" after ./x.py build #26

Closed
tobymurray opened this issue Sep 28, 2020 · 6 comments · Fixed by #29
Closed

No "stage2" after ./x.py build #26

tobymurray opened this issue Sep 28, 2020 · 6 comments · Fixed by #29

Comments

@tobymurray
Copy link
Contributor

I believe I'm following the instructions. What I've done so far:

$ git clone https://github.com/MabezDev/rust-xtensa
$ cd rust-xtensa
$ ./configure --experimental-targets=Xtensa
$ ./x.py build

That all appears to have worked. The next step says to set the environment variable: RUSTC=/path/to/rust-xtensa/build/x86_64-unknown-linux-gnu/stage2/bin/rustc

Looking in my /path/to/rust-xtensa/build/x86_64-unknown-linux-gnu/ I have the following:

llvm
stage0
stage0-rustc
stage0-std
stage0-sysroot
stage0-tools
stage1
stage1-std

Notably absent is "stage2". Have I done something wrong? I'm on Ubuntu 18.04.5 LTS and I'm on 435fc68 in rust-xtensa. My build completed in a way that seems reasonable (e.g. didn't explode):

   ... <SNIP> ...
   Compiling rustdoc v0.0.0 (/home/toby/git/esp32/rust-xtensa/src/librustdoc)
   Compiling rustdoc-tool v0.0.0 (/home/toby/git/esp32/rust-xtensa/src/tools/rustdoc)
   Finished release [optimized] target(s) in 1m 21s
   Build completed successfully in 0:18:27
@tobymurray
Copy link
Contributor Author

tobymurray commented Sep 29, 2020

Advised on matrix to run ./x.py install after. Is this expected to be required? Maybe a missing step in the instructions.

Looking at the current Rust README it says:

Build and install:
./x.py build && ./x.py install

@tobymurray
Copy link
Contributor Author

Following rust-lang/rust#40108 (comment) I made it through the build, so I'll try continuing.

@MabezDev
Copy link
Owner

Hmm, it seems the compiler build system has changed a bit. I'll dig into it and report back.

FYI I use ./x.py dist which essentially builds everything, this is probably overkill for most people.

@tobymurray
Copy link
Contributor Author

I'm not sure why, as it seems to be "resolved" in the Rust world, but I ran into the same issues described in the linked ticket:

touch: cannot touch '/usr/local/lib/rust-install-probe': Permission denied
install: error: can't write to destination. consider `sudo`.
Go to Rust source directory
Rename config.toml.example to config.toml
In config.toml, in section install set entry prefix = "~/.rustup/toolchains/dev"
Run ./x.py build && ./x.py install
Run rustup default dev

Except I used an absolute path, because ~ was not interpreted as "home", but as literally the ~ character (so it created a folder named ~). I'm currently at the point where it seems to be working, I've installed cargo-espflash and next up is flashing something.

@cormacrelf
Copy link

./x.py build
# this probably does stage 1 as well, I think
./x.py build --stage 2
rustup toolchain link xtensa build/my-target-triple/stage2
cd ....
rustup override set xtensa

@eugenio
Copy link

eugenio commented Jun 1, 2021

the documentation on the github landing page still reports the

./x.py build instead of ./x.py build --stage 2

for windows build.

Can it be corrected?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants