Git Product home page Git Product logo

Comments (10)

billziss-gh avatar billziss-gh commented on May 18, 2024

Any chance of providing a PR? Although I still have Mac computers I make an effort to keep them on Mojave or earlier.

from cgofuse.

darthShadow avatar darthShadow commented on May 18, 2024

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.

from cgofuse.

darthShadow avatar darthShadow commented on May 18, 2024

I believe this also blocks on being unable to extract signed dmg(s), as mentioned by you here: #47 (comment)?

from cgofuse.

ncw avatar ncw commented on May 18, 2024

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 /usr/local/include means the #include "fuse/whatever just work as /usr/local/include is on the include path by default. It makes the -I/usr/local/include/osxfuse/fuse irrelevant, but it is harmless and backwards compatible

If you think the above is OK @billziss-gh I'll send a PR.

from cgofuse.

darthShadow avatar darthShadow commented on May 18, 2024

One minor point to consider that may be relevant is when the older include path /usr/local/include/osxfuse/fuse is removed from the package. This may cause issues if the older path is still available and has an older version of osxfuse/macfuse present than the one available in /usr/local/include/fuse.

This should probably be handled by the include path order but wanted to confirm anyway.

from cgofuse.

billziss-gh avatar billziss-gh commented on May 18, 2024

@ncw yes, please do provide PR if you can.

from cgofuse.

billziss-gh avatar billziss-gh commented on May 18, 2024

@darthShadow

Unless latest macOS FUSE has changed its ABI (e.g. changing the order of operations in struct fuse_operations), it should not be a problem using the wrong header.

If we are worried about this we can add a -I/usr/local/include prior to the existing -I option; however there is a possibility this might cause problems on existing systems, so I am inclined to leave the include file locations as they are.

from cgofuse.

darthShadow avatar darthShadow commented on May 18, 2024

Makes sense, thanks for the explanation.

from cgofuse.

ncw avatar ncw commented on May 18, 2024

I created a PR for this #54 - I can't test this (no mac!) - can you @darthShadow ?

from cgofuse.

darthShadow avatar darthShadow commented on May 18, 2024

Will do, but it will take some time.

from cgofuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.