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

Build for musl based Linux distributions #31

Open
jamietanna opened this issue Jun 28, 2024 · 2 comments
Open

Build for musl based Linux distributions #31

jamietanna opened this issue Jun 28, 2024 · 2 comments

Comments

@jamietanna
Copy link
Contributor

jamietanna commented Jun 28, 2024

After #16, I've been looking to deploy the sql-studio binary alongside a static Go binary in an Alpine container, when I noticed that the binary does not run:

ERRO An error occured with sql-studio: fork/exec /usr/local/bin/sql-studio: no such file or directory

Would it be possible to build the binary so it can be used with musl, the libc that Alpine uses? (possibly via or in a tweak to

targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
)

I can see:

$ file sql-studio-x86_64-unknown-linux-gnu/sql-studio
sql-studio-x86_64-unknown-linux-gnu/sql-studio: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=c392fa9b23eb5a8eb5322f258406ec13c98bf9ca, for GNU/Linux 3.2.0, stripped
jamietanna added a commit to jamietanna/sql-studio that referenced this issue Jun 28, 2024
As noted in frectonz#31, we currently can only deploy this to Linux
distributions that use `glibc`, which means some more lightweight
distributions like Alpine Linux aren't usable.

We should be able to solve this by adding a target to `-musl`.

Closes frectonz#31.
@frectonz
Copy link
Owner

frectonz commented Jul 1, 2024

I have tried adding a musl release but seems like we wont be able to do that since the rust adapter for duckdb doesn't support musl.

https://github.com/frectonz/sql-studio/actions/runs/9739363600/job/26874453077

@jamietanna
Copy link
Contributor Author

Hey @frectonz apologies for the delay on replying - my (untrained) eyes are seeing the build failing due to :

  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-g++` installed?

Although a slightly older thread, emk/rust-musl-builder#53 (comment) may be a solution we need to enable this?

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

Successfully merging a pull request may close this issue.

2 participants