Comments (26)
Thank you so much for the great explinaton. But when i try this, all i get is -
~ $ ./macchina-linux
Failed to execute process './macchina-linux'. Reason:
exec: Exec format error
The file './macchina-linux' is marked as an executable but could not be run by the operating system.
I forgot to mention that macchina-linux
(from the releases page) only runs on x86_64 machines, and Raspberry Pi is probably ARM right?
EDIT: I'll create an action that builds macchina
for ARM machines.
from macchina.
There are two ways you can get it to run on your rpi
- cargo supports cross compiling directly if you specify a
linker
and anar
for the target. - You can use
cross
which makes it super easy to cross compile.
Use this to list rust targets and then
rustup target list | grep arm
Using cross build with
cross build --target=arm-unknown-linux-gnueabi --release
Then copy the binary over to your Raspberry pi.
from macchina.
Oops, GitHub doesn't offer ARM runners and I don't have any ARM machines lying around to make a self-hosted runner, and creating an ARM VM on my x86_64 machine is beyond my realm of knowledge 😕
That is true but there are a lot of arm targets and I'm not sure for which one to build lol.
arm-linux-androideabi
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
arm-unknown-linux-musleabi
arm-unknown-linux-musleabihf
armebv7r-none-eabi
armebv7r-none-eabihf
armv5te-unknown-linux-gnueabi
armv5te-unknown-linux-musleabi
armv7-linux-androideabi
armv7-unknown-linux-gnueabi
armv7-unknown-linux-gnueabihf
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
armv7a-none-eabi
armv7r-none-eabi
armv7r-none-eabihf
If you want I can try to setup a github action for cross compiling for arm targets.
from macchina.
Well I'm working on a github action right now to compile for arm and a few other targets so you can directly download binaries.
I'll update when its done.
from macchina.
@Dan1jel you can try to download macchina-linux-aarch64 until a new tag is available on this repo.
I'll release a new version so he doesn't have to wait too long for the next release.
from macchina.
Can you try this binary ? macchina-linux-rpi3b
This is built for target armv7-unknown-linux-gnueabihf
which is what Raspbian should be.
from macchina.
Building Rust code from source is usually like that, I recommend you download and run the prebuilt binaries that you can find in the releases page.
from macchina.
Building Rust code from source is usually like that, I recommend you download and run the prebuilt binaries that you can find in the releases page.
Ok, that could work, i mean its not the easiest but as long as it works. But for a newbie like me, how do i build from binaries? i tried to search the web but all i can think of is "cargo install" but that will make my Raspberry throttle (and probably fail the install).
from macchina.
Ok, that could work, i mean its not the easiest but as long as it works. But for a newbie like me, how do i build from binaries? i tried to search the web but all i can think of is "cargo install" but that will make my Raspberry throttle (and probably fail the install).
The releases page has prebuilt binaries, meaning source code that was built and can be run directly, you mentioned you're on trying to run macchina for your Raspberyy Pi, so you can click the macchina-linux
link which will download the binary for you, and all you have to do is chmod +x macchina-linux
to give it execute permissions.
After doing that, just run ./macchina-linux
or place it in your PATH
e.g. in ~/.local/share or /usr/bin/ which will then allow you to run it from anywhere on your system.
cargo install
looks through the crates.io registry and builds the package you're looking for from source, meaning your CPU is going to be running at full throttle until the build process is finished.
from macchina.
Ok, that could work, i mean its not the easiest but as long as it works. But for a newbie like me, how do i build from binaries? i tried to search the web but all i can think of is "cargo install" but that will make my Raspberry throttle (and probably fail the install).
The releases page has prebuilt binaries, meaning source code that was built and can be run directly, you mentioned you're on trying to run macchina for your Raspberyy Pi, so you can click the
macchina-linux
link which will download the binary for you, and all you have to do ischmod +x macchina-linux
to give it execute permissions.After doing that, just run
./macchina-linux
or place it in yourPATH
e.g. in ~/.local/share or /usr/bin/ which will then allow you to run it from anywhere on your system.
cargo install
looks through the crates.io registry and builds the package you're looking for from source, meaning your CPU is going to be running at full throttle until the build process is finished.
Thank you so much for the great explinaton. But when i try this, all i get is -
~ $ ./macchina-linux
Failed to execute process './macchina-linux'. Reason:
exec: Exec format error
The file './macchina-linux' is marked as an executable but could not be run by the operating system.
from macchina.
Thank you so much for the great explinaton. But when i try this, all i get is -
~ $ ./macchina-linux
Failed to execute process './macchina-linux'. Reason:
exec: Exec format error
The file './macchina-linux' is marked as an executable but could not be run by the operating system.
I forgot to mention that
macchina-linux
(from the releases page) only runs on x86_64 machines, and Raspberry Pi is probably ARM right?EDIT: I'll create an action that builds
macchina
for ARM machines.
That is correct, i was just about to update my post but yes its because Raspberry is ARM based that it wont work.
That would be great! And more people can enjoy this as well with ARM machines.
from macchina.
Oops, GitHub doesn't offer ARM runners and I don't have any ARM machines lying around to make a self-hosted runner, and creating an ARM VM on my x86_64 machine is beyond my realm of knowledge 😕
from macchina.
Oops, GitHub doesn't offer ARM runners and I don't have any ARM machines lying around to make a self-hosted runner, and creating an ARM VM on my x86_64 machine is beyond my realm of knowledge 😕
Aaaw that's sad :/ hope that gets change in the future but thanks for looking in to it anyway.
from macchina.
Oops, GitHub doesn't offer ARM runners and I don't have any ARM machines lying around to make a self-hosted runner, and creating an ARM VM on my x86_64 machine is beyond my realm of knowledge confused
That is true but there are a lot of arm targets and I'm not sure for which one to build lol.
arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf arm-unknown-linux-musleabi arm-unknown-linux-musleabihf armebv7r-none-eabi armebv7r-none-eabihf armv5te-unknown-linux-gnueabi armv5te-unknown-linux-musleabi armv7-linux-androideabi armv7-unknown-linux-gnueabi armv7-unknown-linux-gnueabihf armv7-unknown-linux-musleabi armv7-unknown-linux-musleabihf armv7a-none-eabi armv7r-none-eabi armv7r-none-eabihfIf you want I can try to setup a github action for cross compiling for arm targets.
Yeah, give it a go!
I personally didn't feel comfortable making a mess out of it, because as you mentioned, there's so many ARM targets out there, and that was partly what made me so confused.
from macchina.
There are two ways you can get it to run on your rpi
- cargo supports cross compiling directly if you specify a
linker
and anar
for the target.- You can use
cross
which makes it super easy to cross compile.Use this to list rust targets and then
rustup target list | grep arm
Using cross build with
cross build --target=arm-unknown-linux-gnueabi --release
Then copy the binary over to your Raspberry pi.
Great tip but i just can't get it to work.
from macchina.
Where exactly are you finding problems?
from macchina.
Where exactly are you finding problems?
By doing/trying these commands, my system don't know what to do with these commands.
rustup target list | grep arm
cross build --target=arm-unknown-linux-gnueabi --release
from macchina.
Where exactly are you finding problems?
By doing/trying these commands, my system don't know what to do with these commands.
rustup target list | grep arm
You may not have rustup installed then. But here's the output of that command:
arm-linux-androideabi
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
arm-unknown-linux-musleabi
arm-unknown-linux-musleabihf
armebv7r-none-eabi
armebv7r-none-eabihf
armv5te-unknown-linux-gnueabi
armv5te-unknown-linux-musleabi
armv7-linux-androideabi
armv7-unknown-linux-gnueabi
armv7-unknown-linux-gnueabihf (installed)
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
armv7a-none-eabi
armv7r-none-eabi
armv7r-none-eabihf
cross build --target=arm-unknown-linux-gnueabi --release
I don't know why this wouldn't work if you've correctly installed both cross
and docker
(with the docker.service running in the background).
from macchina.
Another thing, depending on the version of your Raspberry PI, you might need to use --target=aarch64-unknown-linux-gnu
.
from macchina.
Where exactly are you finding problems?
By doing/trying these commands, my system don't know what to do with these commands.
rustup target list | grep arm
You may not have rustup installed then. But here's the output of that command:
arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf arm-unknown-linux-musleabi arm-unknown-linux-musleabihf armebv7r-none-eabi armebv7r-none-eabihf armv5te-unknown-linux-gnueabi armv5te-unknown-linux-musleabi armv7-linux-androideabi armv7-unknown-linux-gnueabi armv7-unknown-linux-gnueabihf (installed) armv7-unknown-linux-musleabi armv7-unknown-linux-musleabihf armv7a-none-eabi armv7r-none-eabi armv7r-none-eabihf
cross build --target=arm-unknown-linux-gnueabi --release
I don't know why this wouldn't work if you've correctly installed both
cross
anddocker
(with the docker.service running in the background).
Rustup and cross is not available on apt install
It would be nice to have macchina and i could maybe get it to work eventually but my thought was that it maybe could be easy to get this running. Also an idea was to maybe do a easy script to install it again (if i get a new harddrive or rpi), this is making it a little hard to have on a simple install script in the future.
from macchina.
@Dan1jel you can try to download macchina-linux-aarch64 until a new tag is available on this repo.
from macchina.
@Dan1jel you can try to download macchina-linux-aarch64 until a new tag is available on this repo.
I'll release a new version so he doesn't have to wait too long for the next release.
I'm really glad that you all being this helpful, but i still can't use this.
~ $ ./macchina-linux-aarch64
Failed to execute process './macchina-linux-aarch64'. Reason: exec: Exec format error
The file './macchina-linux-aarch64' is marked as an executable but could not be run by the operating system.
from macchina.
Can you run uname -m
in the rpi and post the output ?
I can then try to post a binary for your hardware target.
from macchina.
Can you run
uname -m
in the rpi and post the output ?I can then try to post a binary for your hardware target.
Sure thing, armv7l
(Raspberry 3B)
from macchina.
Can you try this binary ? macchina-linux-rpi3b
This is built for targetarmv7-unknown-linux-gnueabihf
which is what Raspbian should be.
This works like a charm! thank you so much for quick reply and helping me with this.
from macchina.
No problem :)
Happy to help.
from macchina.
Related Issues (20)
- [BUG] Add Debian point releases from /etc/debian_version HOT 2
- [New Distro] - Amazon Linux HOT 1
- Display aarch64 CPU info HOT 3
- [BUG] macOS Sonoma is shown as 'macOS 14.0.0 Unknown' HOT 10
- Does Macchina support two batteries? HOT 3
- [BUG] error[E0432]: unresolved imports `vergen::Config`, `vergen::ShaKind`, error[E0425]: cannot find function `vergen` in crate `vergen` HOT 1
- [BUG] Macchina errors for me when using the provided macchina.toml HOT 2
- -o isn't working properly HOT 5
- Wrong battery value on MacOS HOT 9
- CPU Load value greater than 100% on MacOS HOT 12
- [BUG] install failure (build and cargo run works just fine, however) HOT 2
- [Feature Request] Image support like Neofetch. HOT 1
- [BUG] version `GLIBC_2.33' not found HOT 5
- [BUG] no themes installed and no configs is found HOT 1
- [FEATURE] Palette spacing HOT 1
- Investigate CI failure of NetBSD cross-compilation HOT 3
- Only Include Certain Keys HOT 1
- Fails to build macchina from AUR HOT 1
- [Windows] Missing major features and some empty readouts HOT 2
- [Windows] Customization feature request
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 macchina.