nwg-piotr / nwg-dock

GTK3-based dock for sway
MIT License
170 stars 9 forks source link

ARM Compatibility (rpi4) #6

Closed Ramalama2 closed 3 years ago

Ramalama2 commented 3 years ago

Hi,

Im using archlinux (aarch64) on the Raspberry pi 4.

Well, it compiles and everything looks fine, but after the compilation and installation, i get: -bash: /usr/bin/nwg-dock: cannot execute binary file: Exec format error

Isn't that weird, because i compiled it on the pi4 itself?

nwg-piotr commented 3 years ago

As far as I know, @dlasky managed to run it on Pinephone. I'll ask him for help.

Ramalama2 commented 3 years ago

Thank You! Let's see what he did 😂

dlasky commented 3 years ago

hey so i actually havent BUILT on the pinephone. But i'm curious as to what OS/architecture you are running on rpi4 because it supports both 32/64 and perhaps the toolchain is confused about which you are actually running

Ramalama2 commented 3 years ago

You could have right, im using actually the official raspberry kernel, compiled for aarch64. With Archlinux 64bit as base.

It's a bit hard to explain, the Raspberry team makes some sort of a 32 bit kernel, that can execute 64bit apps. The whole problem is, that the native aarch64 vanilla archlinux kernel for the pi, doesn't has vc4 support (graphics). That's the whole reason behind this.

But thanks for the hint! I will try to switch the kernel tomorrow and check and reply.

Cheers

dlasky commented 3 years ago

i was actually thinking you may need to specify the goarch param on build to get something that will run correctly rather than swap out the kernel. ive just run into weirdness with the 32/64 issues on pis before.

try building with: GOOS=linux GOARCH=armel go build -o bin/nwg-dock

or failing that maybe specify aarch64 for goarch.

hopefully that helps!

nwg-piotr commented 3 years ago

Well, I was waiting for @Ramalama2 's response... @dlasky - many thanks. I have no experience with ARM, but I supposed something like this. Hope it's gonna help.

nwg-piotr commented 3 years ago

Just noticed: in the installation steps I skipped make build before sudo make install. If you followed them, you might have tried to install the binary built for x86_64. Sorry!

dlasky commented 3 years ago

oh ha, i didnt even notice that you had the binary comitted

Ramalama2 commented 3 years ago

Sorry guys, i know you waited, but i have a big work-related project, that consumes all my time and nerves 🤦

So i wasn't able to test again, even to boot the pi since then 🤦 But i will test this week and give an update. Sry again 🙈

dlasky commented 3 years ago

no worries, life outside of open source ;)

nwg-piotr commented 3 years ago

Take your time. I have a lot of quite boring python code to write tonight.

Graukolos commented 3 years ago

Hi, just wanted to comment that i had the same problem as @Ramalama2 but since you added the "make build" step to the instructions everything has been running great.

nwg-piotr commented 3 years ago

Yeah my bad. Probably this issue could be closed now.

Ramalama2 commented 3 years ago

thanks guys, i close it now. im sorry, still hadn't the time to test, but when i come to it back, i will be happy to have it working 🙈

Thanks @nwg-piotr very much for the effort and the awesome dock!

cheers ✌️