Comments (14)
Found the source of my problem.
I went to the cargo-binutils README, and they have an added step for install:
$ cargo install cargo-binutils
$ rustup component add llvm-tools-preview
I ran rustup component add llvm-tools-preview
and it works for me now. Does this solve your problem @aurelien-m ?
from rust-raspberrypi-os-tutorials.
Maybe your user is not in the docker group: https://docs.docker.com/engine/install/linux-postinstall/
from rust-raspberrypi-os-tutorials.
From the error message I can at the moment not conclude what exactly is missing.
If it is the rust-objcopy you may have missed this step:
cargo install cargo-binutils
from rust-raspberrypi-os-tutorials.
I have already installed the cargo-binutils
:
Updating crates.io index
Ignored package `cargo-binutils v0.3.0` is already installed, use --force to override
The strange thing is that the rust-objcopy
commands gives me this error in the terminal:
Failed to execute tool: objcopy
No such file or directory (os error 2)
But objcopy
works just fine.
from rust-raspberrypi-os-tutorials.
Hmm maybe just something with your rustup state went bogus.
Can you try a rm -rf ~/.rustup ~/.cargo and install from scratch?
from rust-raspberrypi-os-tutorials.
I have the same problem.
rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/alex/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-2020-05-04-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
installed targets for active toolchain
--------------------------------------
aarch64-unknown-none-softfloat
x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.45.0-nightly (4bd32c980 2020-05-29)
I did a --force
with my install.
cargo install cargo-binutils --force
The make qemu
target in 01_wait_forever
fails for me:
make qemu
RUSTFLAGS="-C link-arg=-Tsrc/bsp/raspberrypi/link.ld -C target-cpu=cortex-a53 -D warnings -D missing_docs" cargo rustc --target=aarch64-unknown-none-softfloat --features bsp_rpi3 --release
Finished release [optimized] target(s) in 0.00s
Failed to execute tool: objcopy
No such file or directory (os error 2)
make: *** [Makefile:62: kernel8.img] Error 101
from rust-raspberrypi-os-tutorials.
I think the llvm-tools-preview
component is added during this command:
curl https://sh.rustup.rs -sSf | sh -s -- \
--default-toolchain nightly-2020-05-04 \
--component llvm-tools-preview rustfmt
However, I did a full reinstall with rustup self uninstall
, did all of the commands and now I get this:
RUSTFLAGS="-C link-arg=-Tsrc/bsp/raspberrypi/link.ld -C target-cpu=cortex-a53 -D warnings -D missing_docs" cargo rustc --target=aarch64-unknown-none-softfloat --features bsp_rpi3 --release
/bin/sh: 1: cargo: not found
Makefile:59: recipe for target 'target/aarch64-unknown-none-softfloat/release/kernel' failed
make: *** [target/aarch64-unknown-none-softfloat/release/kernel] Error 127
The kernel8.img
has still been built though.
from rust-raspberrypi-os-tutorials.
Well, I did not read the instructions carefully enough, whoops!
This error: /bin/sh: 1: cargo: not found
looks like it is not in the path, did you run source $HOME/.cargo/env
after the reinstall?
from rust-raspberrypi-os-tutorials.
Yep, I've done that, I can launch the cargo
command perfectly fine in my terminal.
from rust-raspberrypi-os-tutorials.
I’ll try a from-scratch install later tonight with the Instructions I’ve put on the main repo readme and see if I hit this too.
I didn’t expect any regressions since the CI nightlys build fine.
from rust-raspberrypi-os-tutorials.
Hi,
these steps worked for me:
- Open Terminal.
- rm -rf ~/.rustup ~/.cargo
- Close and open Terminal again.
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2020-05-04 --component llvm-tools-preview rustfmt
- Close and open Terminal again.
- rustup target add aarch64-unknown-none-softfloat
- cargo install cargo-binutils
01_wait_forever [master] $ make
RUSTFLAGS="-C link-arg=-Tsrc/bsp/raspberrypi/link.ld -C target-cpu=cortex-a53 -D warnings -D missing_docs" cargo rustc --target=aarch64-unknown-none-softfloat --features bsp_rpi3 --release
Finished release [optimized] target(s) in 0.10s
This is basically the top level README with some additional terminal close/open mumbo jumbo to be extra sure the ENV is in correct state.
In summary, it works for me and @newAM locally, and it works on the CI nightly builds. Strong indications that it is something local on your machine.
from rust-raspberrypi-os-tutorials.
Thanks for the help, I did exactly that, and the make
works perfectly. However when I do a make qemu
I get this:
RUSTFLAGS="-C link-arg=-Tsrc/bsp/raspberrypi/link.ld -C target-cpu=cortex-a53 -D warnings -D missing_docs" cargo rustc --target=aarch64-unknown-none-softfloat --features bsp_rpi3 --release
Finished release [optimized] target(s) in 0.06s
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
Makefile:72: recipe for target 'qemu' failed
make: *** [qemu] Error 126
What I tried is sudo make qemu
which brings me to the error I had before:
RUSTFLAGS="-C link-arg=-Tsrc/bsp/raspberrypi/link.ld -C target-cpu=cortex-a53 -D warnings -D missing_docs" cargo rustc --target=aarch64-unknown-none-softfloat --features bsp_rpi3 --release
/bin/sh: 1: cargo: not found
Makefile:59: recipe for target 'target/aarch64-unknown-none-softfloat/release/kernel' failed
make: *** [target/aarch64-unknown-none-softfloat/release/kernel] Error 127
Finally, what works for me is changing the Makefile and adding sudo
right here and launching it with make qemu
:
DOCKER_CMD = sudo docker run -it --rm -v $(shell pwd):/work/tutorial -w /work/tutorial
This is kind of strange, if you have time to check, what version of docker do you use? Hope this will maybe also help others.
from rust-raspberrypi-os-tutorials.
Found the source of my problem.
I went to the cargo-binutils README, and they have an added step for install:
$ cargo install cargo-binutils $ rustup component add llvm-tools-preview
I ran
rustup component add llvm-tools-preview
and it works for me now. Does this solve your problem @aurelien-m ?
thank you. I have same problem. fixed with this solution.
from rust-raspberrypi-os-tutorials.
Just commenting.
I also ran into this issue. Also solved it via the same hack Aurelien used, adding a sudo to the Makefile.
me@pop-os:~/projects/rust-raspberrypi-OS-tutorials/01_wait_forever$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
Unless I'm completely wrong, I'm fairly sure I've added the docker usergroup correctly, and applied it to my Linux user.
Very perplexed about the root cause of this issue.
from rust-raspberrypi-os-tutorials.
Related Issues (20)
- invalid file operation error HOT 3
- error[E0463]: can't find crate for `core` HOT 2
- Complete Chinese Translation HOT 3
- I want to know about other microcontrollers, you can refer to this example HOT 3
- Pure rust chainboot HOT 1
- Cannot start to work with this repo
- error: linker `cc` not found [Makefile:123: target/aarch64-unknown-none-softfloat/release/kernel] Error 101 HOT 1
- chapter 6 can not get correct output, stuck at: [ML] Requesting binary HOT 1
- everything seems to work fine but I cant input anything HOT 3
- Miniterminal not working on Raspberry pi 4 HOT 1
- ICR management question
- Error regarding Github CI/CD HOT 3
- Depracated link in The tl;dr Version subsection of README.md file HOT 2
- Invalid links in 11_exceptions_part1_groundwork/README.md HOT 2
- Consider generating these documents into a website
- Plans for even more embedded devices
- Please Change README HOT 2
- Why use Makefile handle build process? HOT 1
- Currently porting to RISC-V
- What determines the value of GPIO_PUP_PDN_CONTR_REG ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-raspberrypi-os-tutorials.