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

Alpine support #177

Open
zingmars opened this issue Nov 9, 2021 · 1 comment
Open

Alpine support #177

zingmars opened this issue Nov 9, 2021 · 1 comment

Comments

@zingmars
Copy link

zingmars commented Nov 9, 2021

Alpine Linux is a lightweight Linux distro usually used in containers. It's fairly popular due its small size. Unfortunately it differs from other Linux distributions by using an alternative libc - musl libc, as opposed to gnu's libc used by most standard mainstrean distributions. This often causes support issues, which seems to be the case this time.

Currently the native libraries shipped with th HDF.PInvoke depend on gnu's libc, which means it will just segfault when you try to run it -

/usr/local/bin/app/runtimes/linux-x64/native # readelf -d libhdf5.so | grep 'NEEDED'
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

For reference, confluence's libkafka for C# also ships with native linux binaries, and the have binaries for both gnu's libc based distributions and alpine. Here's the readelf output for their alpine library -

/usr/local/bin/app/runtimes/linux-x64/native # readelf -d alpine-librdkafka.so | grep 'NEEDED'
 0x0000000000000001 (NEEDED)             Shared library: [libssl.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.musl-x86_64.so.1]

Are there any plans to support alpine in the future and if not what are the chances that such support will ever be added?

@zingmars
Copy link
Author

zingmars commented Nov 9, 2021

For what it's worth, I was able to compile HDF5 using https://github.com/HDFGroup/HDF.PInvoke.1.10/blob/native-CI/build/build.ps1 and then overwrite the versions restored by dotnet build and it seems to work fine, so there's nothing preventing HDF.PInvoke from working on this platform.

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

No branches or pull requests

1 participant