Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no override and no default toolchain set #133

Closed
Amanita-muscaria opened this issue Jul 24, 2020 · 8 comments
Closed

no override and no default toolchain set #133

Amanita-muscaria opened this issue Jul 24, 2020 · 8 comments
Labels
question Further information is requested

Comments

@Amanita-muscaria
Copy link

I was attempting to update spotify-tui but this error popped up:

error: no override and no default toolchain set
==> ERROR: A failure occurred in build().
    Aborting...
Build failed with exit code 4 in /home/redacted/.cache/rua/build/spotify-tui

I've set the default toolchain to stable via rustup (rustup default stable) but the error persists. I'm assuming I need to give rua access to something?

@vn971
Copy link
Owner

vn971 commented Jul 24, 2020

Hi @Amanita-muscaria , this is because rua isolates your home directory where otherwise rustup cache (and default toolchain) would be stored: https://github.com/vn971/rua#safety

You can compromise isolation a bit and bind ~/.cargo for it to be read-writeable (or just readable). It can be done by configuring "wrap_args", see example here: https://github.com/vn971/rua/blob/master/res/wrap_args.sh.example (or in ~/.config/rua/.system/wrap_args.sh.example locally)

@vn971
Copy link
Owner

vn971 commented Jul 24, 2020

If you want to build fully isolated without assuming anything from HOME directory (e.g. existence of the toolchain), you can modify PKGBUILD to use code like that:

RUSTUP_TOOLCHAIN=stable cargo build --release ....

This is actually the preferred way to write AUR packages, because there are potentially many users who are not yet very familiar with Rust. They will have rustup installed, but not the stable toolchain, and thus nothing in their HOME yet.

@vn971 vn971 added the question Further information is requested label Jul 24, 2020
@vn971
Copy link
Owner

vn971 commented Jul 24, 2020

Does that explain it / make any sense?

@Amanita-muscaria
Copy link
Author

Ya, that makes sense. Thanks!

@refaelsh
Copy link

refaelsh commented Jan 28, 2021

If you want to build fully isolated without assuming anything from HOME directory (e.g. existence of the toolchain), you can modify PKGBUILD to use code like that:

RUSTUP_TOOLCHAIN=stable cargo build --release ....

This is actually the preferred way to write AUR packages, because there are potentially many users who are not yet very familiar with Rust. They will have rustup installed, but not the stable toolchain, and thus nothing in their HOME yet.

Is this problem occurs only in Rua or in other AUR helpers too?

@Morganamilo
Copy link
Collaborator

If you want to build fully isolated without assuming anything from HOME directory (e.g. existence of the toolchain), you can modify PKGBUILD to use code like that:

RUSTUP_TOOLCHAIN=stable cargo build --release ....

This is actually the preferred way to write AUR packages, because there are potentially many users who are not yet very familiar with Rust. They will have rustup installed, but not the stable toolchain, and thus nothing in their HOME yet.

I don't like this. I use nightly and it forces me to download a stable branch.

@vn971
Copy link
Owner

vn971 commented Jan 30, 2021

@refaelsh the problem will appear in any AUR helper that does not use the fact that the user might have downloaded something to their HOME directory. Such a PKGBUILD will definitely have problems for users who didn't do anything special about their HOME yet and are starting from scratch (let's say, clean re-installation of the OS without any Rust commands run prior)

@vn971
Copy link
Owner

vn971 commented Jan 30, 2021

@Morganamilo I see your point. I would argue that a PKGBUILD should still say what it needs. E.g. whatever Rust version you need, it should be specified reproducibly in the build description, not relying that the user accidentally did what you wanted.

In the case that you're referring to that's really harder, because rustup on Arch does not come with any toolchain at all, by default. I'm open to other solutions as well -- please share if you have any -- except recommending to write PKGBUILD's that only work if user also accidentally did something on their ~.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants