vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
424 stars 42 forks source link

Rua fails to build rust package #130

Closed nilehmann closed 4 years ago

nilehmann commented 4 years ago

I'm trying to install starship and I get the following error.

==> Starting build()...
error: no default toolchain configured

I'm using rustup to manage my rust toolchains and the package builds without any problems if I run makepkg manually.

nilehmann commented 4 years ago

I did a better reading of the README and realized this is due to the safe safe environment and one just needs to add a new mount point with the rust up folder. Sorry for the noise.

vn971 commented 4 years ago

@nilehmann hi, yeah, you need to specify the toolchain for Rust OR at least once download any Rust toolchain. (Was busy, didn't have time to answer before).

refaelsh commented 4 years ago

I have the same issue exactly. @nilehmann What do you mean a mount folder with rustup? Can you please help me?

refaelsh commented 4 years ago

@nilehmann I specified toolchain and at least once downloaded Rust toolchain. The problem still occurs.

nilehmann commented 4 years ago

@refaelsh take a look at this section https://github.com/vn971/rua#safety. Rua runs in an isolated environment and by default, it doesn't have access to the entire filesystem. Rustup stores your toolchains in your home directory so you need to give explicit access to it. You can do that by adding a file in ~/.config/rua/wrap_args.d/. Mine looks like this:

$ ls ~/.config/rua/wrap_args.d
wrap_args_bind.sh

$ cat ~/.config/rua/wrap_args.d/wrap_args_bind.sh
wrap_args+=(--bind-try ~/.cargo ~/.cargo)
wrap_args+=(--bind-try ~/.rustup ~/.rustup)