pacman82/odbc2parquet

Build for alpine

ErikJansenIRefact opened this issue · 8 comments

Hi Markus,

Is it a lot of work to build for Alpine?
We are running a NodeJS server on Alpine and are calling (via an os spawn) the odbc2parquet executable on this machine (a docker container).

Maybe. You need a rust toolchain and the ability to dynamically link against unixODBC. I think Rust uses the musl C library in Alpine, which is also tied to static linking. Yet I am not sure about this. Just give it a try, and tell me how it goes. musl platforms are Tier 2 in the Rust ecosystem, so you might hit some hindrance.

We aren't Rust experts. No knowledge how to build.
Debian is also an option. NodeJS official docker images run on Debian or Alpine.
Is this easy for you to add as a build option?

We check the OS in nodejs (osx, windows or some other linux distribution). When running on Debian it will try to execute the Ubuntu build but we get the following error:

./bin/odbc2parquet-x86_64-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./bin/odbc2parquet-x86_64-ubuntu)

On debian 11 glib 2.31 is installed.

We're happy to donate if this will help you.

Latest info. We unfortunately cannot use Debian version 12 because Microsoft ODBC driver is only supported on Debian 11 (and lower).

I think if you could build on Ubuntu with 2.31 libc it will run on Debian 11 as well.

We're happy to donate if this will help you.

My first duty is to my full time employer. A donation might help me convince my girlfriend that building Debian release pipeline is a suitable activity for a weekend.

We unfortunately cannot use Debian version 12 because Microsoft ODBC driver is only supported on Debian 11 (and lower).

Debian 11 should be no problem.

I think if you could build on Ubuntu with 2.31 libc it will run on Debian 11 as well.

This is likely to be the case. Might build it on Debian 11 still, just to be on the safe side.

Best, Markus

@ErikJansenIRefact FYI: there is a conda-forge feedstock for odbc2parquet.

I tried building on the Docker image: installed rust, cloned your repo, installed odic-dev and ran cargo build.
I now have a working program. But it's quite cumbersome to do all of this in a docker build.

Thanks at least for your help so far.

Set the --release flag then building, otherwise the executable might turn out to be much slower

Hello @ErikJansenIRefact ,

I'll close this issue. I could probably only support alpine sensibly once it is a first tier Rust platform anyway. Building odbc2parquet from source might be cumbersome, but unless somebody includes it into popular package managers like Homebrew or creates a debian package for it, this is probably the way to go to reach most Linux distributions.

I am happy to support anything with binary releases, for which free GitHub runners are readily available. Otherwise I do not see myself wrestling to much with build systems in my spare time.

Best, Markus