Run on a Raspberry Pi #138
Replies: 13 comments
-
Interesting idea. I can get a binary compiled but I don't have the hardware to test. I'm compiling on my fedora desktop (amd64 arch). To cross compile, you'll need to use the fyne-cross utility, as the code uses CGO and fyne-cross will help with ensuring all the necessary headers and library files are present. All of the following commands should be run inside the checked out source directory.
That will build both an amd64 and arm binary, which are located in Let me know if this works, that'll be cool! Note also that fyne-cross will need either docker or podman installed as well. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your detailed answer! I also hat do install moq with And just out of curiosity, this does not create the |
Beta Was this translation helpful? Give feedback.
-
Ah! Yes you can install them with: go install golang.org/x/tools/cmd/stringer@latest
go install golang.org/x/text/cmd/gotext@latest So I gave you a bit of a run-around sorry! We're pretty much following the developer docs here, except not using goreleaser. Using goreleaser would produce the deb and zst files, fyne-cross just produces binaries (and some tar.xz files in |
Beta Was this translation helpful? Give feedback.
-
Great, thank you! No problem, I am happy about your help! I could have checked the developer docs myself, sorry. So the compilation did work. It was complaining about some missing entries for german and frensh, if I understand this correctly?
And you use goreleaser in cross compile mode to create the packages? Sorry for all my questions. |
Beta Was this translation helpful? Give feedback.
-
No problem with the questions! Happy to answer 🙂 Those missing entry messages are warnings from the gotext tool, which I use to provide a way to include translations of text in the UI parts of the agent. It's indicating that some strings for the UI don't have translations in those languages. Without a translation, the string will fall back to being displayed in English. So these messages can be safely ignored. I'm using goreleaser to build and create packages (rpm/deb/zst) and push those packages to GitHub release pages. The fyne-cross tool is currently used to build an archive that allows installing on distributions with older system libraries, like Debian stable. It can also support cross compilation (as we've done here) and given you've had success with building for arm using it, I will start building arm packages as part of the releases. |
Beta Was this translation helpful? Give feedback.
-
Thats great, thank you very much! A great. Is there help wanted for the translation? I see, thank you for the explanation. Is it possible to cross compile with gorealeaser to create an arm zst package? |
Beta Was this translation helpful? Give feedback.
-
Hey @dflvunoooooo with the translations, I'd say I would defer those for now. The framework for translating is in place but it's probably a bit rough to use at the moment. I need to clean it up a bit. With cross-compiling to arm to create packages, I think that is doable. I'll need to work on adjusting the build automation I use, but I think it is very possible. Let me tinker and see what I can do... |
Beta Was this translation helpful? Give feedback.
-
Alright. If help is needed, I am willing to help. Alright, thank you very much! Does goreleaser cross-compile or does it use the binaries compiled with fyne? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the offer! Yeah, goreleaser can cross-compile as long as you have the appropriate toolchain and libraries available for whatever architecture you are compiling for. Fortunately, it looks like Ubuntu (which is the distro on which the packages are built) provides both. I use fyne-cross to build an archive containing a binary that will run on Linux distributions like Debian, which do not contain a more modern libc and other libraries. Fyne-cross builds in a Debian container as opposed to Ubuntu. |
Beta Was this translation helpful? Give feedback.
-
You are very welcome. I see. I will try to dig into cross compiling with goreleaser. Until you found a way to do so. |
Beta Was this translation helpful? Give feedback.
-
Hey @dflvunoooooo, with release v8.0.0, binaries and distro packages are now built for amd64, arm and arm64. Check them out on the release page. I do not that while I can build for arm/arm64, I don't have any way to test how they work. I would be interested in any feedback about the packages. Cheers! |
Beta Was this translation helpful? Give feedback.
-
This is absolutely great, Thank you very much! I tried a third time this weekend to get goreleaser to cross compile, but it didn't do what I wanted. I will try it! :) |
Beta Was this translation helpful? Give feedback.
-
On my raspberry Pi there was a problem when trying to run go-hass-agent. The library Apart from that, everything is working great! Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
Is it possible to run this on a raspberry pi? I tried to cross compile for armv7, but it failed with
internal/preferences/prefs.go:25:12: pattern VERSION: no matching files found
. Unfortunately, I don't know much about go. I usedenv GOOS=linux GOARCH=arm GOARM=7 go build
.Beta Was this translation helpful? Give feedback.
All reactions