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
Fails to load native library for OS X #5
Comments
I just tried setting I'm wondering if this may just be some path issue. |
Sorry for such a late reply. I've just pushed version |
Sorry for the late response. I have this on my TODO within the next days. Thanks! |
So I did some testing and it seems that modifying library search path is the way to go. I've pushed v. I'm closing this issue for now, but feel free to reopen it if v. |
Orrrrr not :) Seems that variable modification doesn't work all the time, need to poke around some more. |
OK, so here's what I've found. Changing variables such as The only reliable way of successfully using Explicit library loading also works, but only on Windows and Linux, but not MacOs As for your problem, extracting dependencies to current directory instead of assembly's location might help in your particular case. Please update nuget package to v. |
Hi, Sorry for responding to this 3 weeks late (been preoccupied). I took this for a test drive and things do seem to be working on OS X now with my Though, on Linux and OS X, I couldn't simply run I still want to double check things on Windows. Thanks again for your work on this project. I still find it easier to follow than some of the other solutions for doing multi-platform native libraries.. |
I took the new version out for a test run on Window as well. Doing a An ideal for OS X and Linux would not having to specify the library path (and not populating the running directory with the native DLLs), but I'll take this for now since it works with minimal adjustment. If you want to close this ticket, I don't have any more need for it. I'm willing to help you test this library further. |
Hi guys, any update on this? I just started to use this library because we're using 3 different environments. Linux for our server, myself for development on osx and the rest of my team to develop on Windows. I'm trying to set it up but like stated in this issue it doesn't seem to work for osx. I'm not sure what the solution is for now? I set my env vars to the following: But I still get this error: Thanks! |
I find myself in the same situation. The native library depends on a few Boost (C++) dylibs and doesn't find them unless I set the DYLD path prior to launching. Instead of using _ DYLD_LIBRARY_PATH_, I'm using DYLD_FALLBACK_LIBRARY_PATH, as it is "safer". Setting up the following in code, doesn't work: Environment.SetEnvironmentVariable("DYLD_FALLBACK_LIBRARY_PATH", "."); I'm hoping for a more elegant solution that launching with env vars. Using NativeLibraryManager v1.0.23 |
define-private-public commentedMar 13, 2020
•
edited
This is from my Bassoon project. Everything is working 100% for Windows and Linux. The
PortAudioSharp
portion is working fine on OS X , but thelibsndfileSharp
isn't loading the nativelibsndfile.dylib
DLL when trying to run a program.libsndfile.dylib
depends on a few other native libraries (e.g.libogg.dylib
,libFLAC.dylib
, etc). I'm wondering if that's the problem.Using the
FileInfo
sample in my repo (which useslibsndfileSharp
). I first tried adotnet run
withDYLD_LIBRARY_PATH
set to where I compiled out the*.dylib
files. And everything worked fine. But then using the NuGet package version (v.0.2), it reportedUnable to load shared library 'sndfile' or one of its dependencies
. I setDY_PRINT_LIBRARIES=1
and it reported this:At least one of those other native deps should show up after the
loaded
part, but none of them did.libsndfileSharp csproj: https://gitlab.com/define-private-public/Bassoon/-/blob/release_nuget_packaging/src/Bassoon/libsndfileSharp/libsndfileSharp.csproj#L37
The text was updated successfully, but these errors were encountered: