Skip to content

Cargo available for user and sudo su #306

Description

@SzymonTurno

It seems like it is not possible to build rust sample apps out-of-the-box for user. It also does not seem like intentional and would be useful. Moreover, for a case in which docker is run as user and then as root via sudo su not only cargo is not available but also west - not sure if this is intentional, but maybe sudo su case could also be supported?

As user

$ cd ../zephyr-lang-rust/
$ cd ./samples/hello_world/
$ west build -p -b qemu_cortex_m0
[...]
-- west build: building application
[1/167] Preparing syscall dependency handling

[3/167] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.4.99 (/workdir/zephyr), build: v4.4.0-5592-g4ef3792c8734
[12/167] Building Rust application
No such file or directory
[12/167] Building C object zephyr/CMakeFiles/zephyr.dir/lib/utils/rb.c.obj

Via sudo su

$ sudo su
$ cd /path/to/zephyr/
$ cd ./samples/hello_world/
$ west build -p -b qemu_x86
bash: west: command not found

Proposed solution: #305.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions