-
Notifications
You must be signed in to change notification settings - Fork 139
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
musl
systems not supported
#411
Comments
We cross compile with Docker images. If you change your mind about wanting to contribute, we'd welcome a PR to zk-xcompile (from those current images, you can easily infer what would need to be in an Alpine based image, also better than me personally as I have no experience with For the next release of Alternatively, building Clone |
Was curious, and had a bit of a go: https://github.com/tjex/zk-xcompile/tree/alpine But attempting to compile results in many complaints about sqlite bindings (which is the dep that requires CGO). |
Upgrading As suggested here, adding Some comments suggests that despite the fix in 1.14.19, it still fails on Alpine 3.19, but using Alpine 3.18 works. However, this might be fixed since, so I would suggest trying with latest first. |
Ah great, thanks for working with me to get the necessary info. Bumping sqlite version built successfully with golang 1.21 and latest alpine build.
I'm not so learned with compilation, and you did mention to statically link, but here it's stated linking was dynamic. In any case, could you download the binary and report back if it runs, @notramo ? |
It will crash on # Wrapper around the go binary, to set all the default parameters.
define go
$(ENV_PREFIX) go $(1) -tags "fts5" -ldflags "-extldflags=-static -X=main.Version=$(VERSION) -X=main.Build=$(BUILD)" $(2)
endef I tried compiling with this modification and it resulted in a static binary ( |
awesome, thanks again. Here are two new binaries. Could you test the one for your arch? And ideally if you know someone who can run the other as a sanity check, it would be ace. The following test should be adaquate:
setup as desired
close
|
I only have Also tested it in a Docker container running Debian, to see if it works on a I think it can be considered solved. @tjex thanks for adding this feature. |
Fantastic. Thanks for the extra testing and information. Really appreciated 🙌 |
Check if applicable
Describe the bug
musl
is an alternative toglibc
, and is used by multiple Linux distros e.g. Alpine Linux and Void Linux.The official builds link to
glibc
, which is incompatible withmusl
-based systems. I recommend statically linkingmusl
as it's compatible with bothglibc
andmusl
.How to reproduce?
zk configuration
does not matter
Environment
any `musl` based Linux distro
The text was updated successfully, but these errors were encountered: