-
Notifications
You must be signed in to change notification settings - Fork 82
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
Enhancement: Add the new location for libfuse in MacOS #52
Comments
Any chance of providing a PR? Although I still have Mac computers I make an effort to keep them on Mojave or earlier. |
This section of the code is unfortunately in C, which I have no experience with and don't have much interest or time to learn it right now, sorry. |
I believe this also blocks on being unable to extract signed dmg(s), as mentioned by you here: #47 (comment)? |
I think a patch like this should fix the shared library location diff --git a/fuse/host_cgo.go b/fuse/host_cgo.go
index 0676732..a7e9275 100644
--- a/fuse/host_cgo.go
+++ b/fuse/host_cgo.go
@@ -168,7 +168,9 @@ static void *cgofuse_init_fuse(void)
void *h;
#if defined(__APPLE__)
- h = dlopen("/usr/local/lib/libosxfuse.2.dylib", RTLD_NOW);
+ h = dlopen("/usr/local/lib/libfuse.2.dylib", RTLD_NOW); /* MacFUSE/OSXFuse >= v4 */
+ if (0 == h)
+ h = dlopen("/usr/local/lib/libosxfuse.2.dylib", RTLD_NOW); /* MacFUSE/OSXFuse < v4 */
#elif defined(__FreeBSD__)
h = dlopen("libfuse.so.2", RTLD_NOW);
#elif defined(__NetBSD__) The include file location doesn't seem to be a problem when compiling with macfuse v4 as moving the include to If you think the above is OK @billziss-gh I'll send a PR. |
One minor point to consider that may be relevant is when the older include path This should probably be handled by the include path order but wanted to confirm anyway. |
@ncw yes, please do provide PR if you can. |
Unless latest macOS FUSE has changed its ABI (e.g. changing the order of operations in If we are worried about this we can add a |
Makes sense, thanks for the explanation. |
With MacFUSE i.e. OSXFuse 4.0, the location of the loadable library has changed to `/usr/local/lib/libfuse.2.dylib` instead of `/usr/local/lib/libosxfuse.2.dylib`. The older path is still present for backwards compatibility for the time being. This patch looks in the newer location first, then in the older location if that fails. Release Notes: https://github.com/osxfuse/osxfuse/releases/tag/macfuse-4.0.0 Fixes winfsp#52
I created a PR for this #54 - I can't test this (no mac!) - can you @darthShadow ? |
Will do, but it will take some time. |
With MacFUSE i.e. OSXFuse 4.0, the location of the loadable library has changed to `/usr/local/lib/libfuse.2.dylib` instead of `/usr/local/lib/libosxfuse.2.dylib`. The older path is still present for backwards compatibility for the time being. This patch looks in the newer location first, then in the older location if that fails. Release Notes: https://github.com/osxfuse/osxfuse/releases/tag/macfuse-4.0.0 Fixes winfsp#52
With MacFUSE i.e. OSXFuse 4.0, the location of the loadable library has changed to
/usr/local/lib/libfuse.2.dylib
instead of/usr/local/lib/libosxfuse.2.dylib
. The older path is still present for backwards compatibility but it is probably better to use the newer path if available.The include path also seems to have changed
/usr/local/include/fuse
instead of/usr/local/include/osxfuse/fuse
.Release Notes: https://github.com/osxfuse/osxfuse/releases/tag/macfuse-4.0.0
The text was updated successfully, but these errors were encountered: