-
Notifications
You must be signed in to change notification settings - Fork 27
Linux and macOS Support for NETStandard 2.0 Builds #7
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the pull request. Does this load the zstd library from linux or do we still need to add native libraries to this nuget package? |
|
You still need the native binaries for zstdlib (.so/.dylib). I can't build the macOS library due to machine constraints, and I don't know the build process for zstdlib, so I'm leaving that up to you or another contributor. (Sorry!) |
|
Correction, it should look for the library also, if you provide the proper file name (.so vs .so.0) |
|
@bp74 Why not merge this? Seems like a correct fix. |
|
@jakubsuchybio @bp74 there's an issue with the lib loader I fixed up the branch, adding in the 1.3.8 binary for linux (and dropped net4.5 out of irritation) https://github.com/ChrisMcKee/Zstandard.Net/tree/cmpatch but the lib loader fails on debian based (stretch/bionic) images as well as alpine due to the multi-located libdl being in different places between releases. I've got around that issue with manual fallbacks (could be cleaned to use a custom https://github.com/mellinoe/nativelibraryloader/blob/master/NativeLibraryLoader/PathResolver.cs); copying the lib file to the 'expected location' on debian instances; and installing 1.3.3 on the alpine instance (copying the lib in on alpine caused errors) The tests pass on my WSL, and in current Debian / Ubuntu and Alpine images as long as the requirements are setup. One of the first thing NativeLibLoader attempts is loading the library from AppContext.BaseDirectory + name; the AppContext.BaseDirectory returns the correct response when ran from the sln folder on alpine as with the others so it's a tad perplexing 😬 In the case of alpine the library generated throws a The least 'shitty' way of dealing with this afaik is simply to create work for the user Which means all of the envs work out of the box without anything beyond libload being added. |
|
Thanks @ChrisMcKee for picking up my slack, sorry about that. 🙂 EDIT: I noticed that you added to the commits and renamed the commit messages. Probably easier if you submit a separate pull. |
|
Tbh I'm not sure the solutions 'ideal' it just works. |
I never really looked to see what your changes did, so I missed that too.
I 100% agree with that. And I will work on this a bit more then, since it was never really finished (and i forgot all about this PR 🤦♂️). |
|
Feel free to pull in my branch #14 |



This uses NativeLibraryLoader to load the library based on specified file paths for each OS.
This should close #6, once the generic binaries for Linux and macOS are built (which I'm leaving to @bp74, or others).