Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux version with musl compiled for Home Assistant OS #10

Open
SHexplorer opened this issue Sep 8, 2022 · 1 comment
Open

Linux version with musl compiled for Home Assistant OS #10

SHexplorer opened this issue Sep 8, 2022 · 1 comment

Comments

@SHexplorer
Copy link

Hi, I am using HomeAssistant on a normal x86_64 System and noticed, that the normal linux binary does not work in Home Assistant OS (it says "no such file or directory"). After a short google search I found out, that Alpine Linux (which HAOS uses) does not support binaries compiled with glibc and I have to use musl. So I installed musl with

$ wget https://musl.libc.org/releases/musl-latest.tar.gz
$ tar -xvf musl-latest.tar.gz
$ cd musl-latest
$ ./configure
$ make
$ sudo make install

and compiled the binary myself with

CC=/usr/local/musl/bin/musl-gcc go build --ldflags '-linkmode external -extldflags "-static"'

and now it works. Maybe you could make such a binary with musl for coming releases. That would save me some time and would be great for all other HAOS x64 Linux users.

And thanks for all the work you did!

@SHexplorer SHexplorer changed the title Linux version with musl compiled Linux version with musl compiled for Home Assistant OS Sep 8, 2022
@Hentra
Copy link
Owner

Hentra commented Sep 11, 2022

Good suggestion. Will try and add this next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants