YS-L / csvlens

Command line csv viewer
MIT License
2.47k stars 41 forks source link

Feature request: Include linux musl targeted builds in releases #91

Closed goncrafa closed 1 month ago

goncrafa commented 1 month ago

Greetings,

Many versions of enterprise Linux lack an up-to-date glibc version, which results in the following (this is a CentOS 7.x machine):

% ./csvlens
./csvlens: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./csvlens)
./csvlens: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./csvlens)
./csvlens: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./csvlens)
./csvlens: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./csvlens)
./csvlens: /lib64/libc.so.6: version `GLIBC_2.29' not found (required by ./csvlens)

Many of the rust-based command line staples like bat or eza make a musl targeted build available in releases, which does not depend on glibc, and thus is compatible with RHEL7-like machines.

Having such a release would be lovely.

I tried building v0.9.1 on my machine and it was literally just adding the x86_64-unknown-linux-musl as a target. None of the dependencies seem to have caused any issues.

$ cargo build --target=x86_64-unknown-linux-musl --release
...
   Compiling csvlens v0.9.1 (/home/grafael/csvlens)
    Finished `release` profile [optimized] target(s) in 4m 44s
$ ldd target/x86_64-unknown-linux-musl/release/csvlens
        statically linked

In that same CentOS 7.x host, this build of csvlens works.

YS-L commented 1 month ago

Sure! Let me verify that the build works on CI and I will update the list of build targets.