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

Linux support #6

Open
vbelot opened this issue Aug 19, 2018 · 8 comments · May be fixed by #7
Open

Linux support #6

vbelot opened this issue Aug 19, 2018 · 8 comments · May be fixed by #7

Comments

@vbelot
Copy link

vbelot commented Aug 19, 2018

Hi bp74,

Currently I am using your lib, which is Windows only for now. So I am stuck using a Windows IIS server.
I plan to migrate to CentOS server. Do you plan to embed the Linux library anytime soon ? I don't really know how complicated it would be to implement.

Kind regards

@bp74
Copy link
Owner

bp74 commented Aug 19, 2018 via email

@vbelot
Copy link
Author

vbelot commented Aug 22, 2018

Hi, thanks for your quick reply. I have libzstd installed:

ldconfig -p | grep libzstd
        libzstd.so.1 (libc6,x86-64) => /lib64/libzstd.so.1

However it fails finding the library:

fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.DllNotFoundException: Unable to load shared library 'libzstd' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibzstd: cannot open shared object file: No such file or directory
at Zstandard.Net.ZstandardInterop.ZSTD_DStreamInSize()
at Zstandard.Net.ZstandardStream..ctor(Stream stream, CompressionMode mode, Boolean leaveOpen)

Seems to load if I create a symlink in the app folder though:
sudo ln -s /lib64/libzstd.so.1 libzstd.so

@bp74
Copy link
Owner

bp74 commented Aug 22, 2018

Okay that's interessting. The question is how we can tell .Net to search for the library in the right folder. All suggestions are welcome :)

@simplexidev
Copy link

Try NativeLibraryLoader. It fixed that problem for me, and allows for multiple locations since it checks each of them until it finds the dll. This would allow cross-platform builds too. My project uses it to find the library for each OS, and load it. I can submit a pull that could incorporate it.

@simplexidev simplexidev linked a pull request Aug 22, 2018 that will close this issue
@ChrisMcKee
Copy link

Probably worth looking at https://github.com/CoreyKaylor/Lightning.NET/tree/master/src/LightningDB which has to deal with the same issue.

@bp74
Copy link
Owner

bp74 commented Feb 3, 2019

Thanks, this looks interessting!

@RouR
Copy link

RouR commented Aug 3, 2020

any progress?

@ChrisMcKee
Copy link

@RouR see #14 it works but where .net tries to load the libs from is unreliable cross- distro.

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

Successfully merging a pull request may close this issue.

5 participants