sql-studio icon indicating copy to clipboard operation
sql-studio copied to clipboard

Build for `musl` based Linux distributions

Open jamietanna opened this issue 1 year ago • 2 comments

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 https://github.com/frectonz/sql-studio/blob/fb7a8ee6129e3a91ebfc40949f708d0efb7d7da2/Cargo.toml#L52)

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 avatar Jun 28 '24 08:06 jamietanna

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

frectonz avatar Jul 01 '24 07:07 frectonz

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, https://github.com/emk/rust-musl-builder/issues/53#issuecomment-421806898 may be a solution we need to enable this?

jamietanna avatar Jul 07 '24 08:07 jamietanna