Rebuilding MacFuse SSHFS on Mac OSX Snow Leopard (64bit)
drks — Wed, 2009-10-07 21:34
This is more for my own reference, as a lot of my blog posts are. But after following the examples of a few hits I found on Google, the following is the fix that worked. For those that don't know, with the release of Mac OSX Snow Leopard MacFuse's SSHFS would no longer work. I would constantly receive the error:
remote host has disconnected
After googling a bit I came across Racker Hacker's fix that should have worked, however doing so introduced a second problem. The pre-compiled binaries from MacFuse are built against the standard 32bit kernel that OSX Snow Leopard ships with. I on the other hand am running the 64bit version of the kernel, therefore rendering my MacFuse install busted.
The fix for me was to checkout the latest development sources, compile, and upgrade MacFuse on my machine. The following steps outline how I did that via the shell:
me@macbookpro ]$ mkdir ~/devel me@macbookpro ]$ cd ~/devel me@macbookpro ]$ svn checkout http://macfuse.googlecode.com/svn/trunk/ macfuse-read-only me@macbookpro ]$ cd macfuse-read-only/core
From the './core' directory, apply the changes to 10.5/fusefs/fuse_vfsops.c, and 10.5/libfuse/fuse-2.7.3-macosx.patch as outlined by the patches posted by wereHampster.
Save the files, and run the following (these commands are run from the ./core directory):
me@macbookpro ]$ ./macfuse_buildtool.sh -c Release -p 10.5 -t smalldist me@macbookpro ]$ cp -a /tmp/macfuse-core-10.5-2.1.7 ~
Note: You're final product might have a slightly different location/version/etc. Look for the line that says, "succeeded, results are in XXXXX" which is where your built files are.
Now fire up finder, and navigate to macfuse-core-10.5-2.1.7 in your home directory. There you will find the 'MacFUSE Core.pkg'. Open it up, and follow the instructions to install your custom built MacFuse. Once that is complete, you need to remove a file that is problematic, and if you don't have one already make a symlink that is more accessible to your sshfs-static binary:
me@macbookpro ]$ sudo rm /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshnodelay.so me@macbookpro ]$ sudo ln -s /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static /usr/local/bin/sshfs
Boom! You can now use sshfs [again].
me@macbookpro ]$ sshfs -o cache=no example.com:/home/me ~/sshfs/example.com warning: ssh nodelay workaround disabled me@macbookpro ]$ mount example.com:/home/me on /Users/me/sshfs/example.com (fusefs, nodev, nosuid, synchronous, mounted by me)
Note: The warning about nodelay is just a warning. For the majority of users this shouldn't effect anything.
References
- wereHamster provided snow leopard fixes.
- Racker Hacker blogged about the sshnodelay.so fix.
RSS Feed
Please see this thread:
wereHamster (not verified) — Sun, 2010-01-10 23:24Please see this thread: http://groups.google.com/group/macfuse/browse_thread/thread/97951b355e57db56
In short, my patch doesn't work, you can't simply recompile MacFUSE and expect it to work. It may cause weird failures or kernel panics. The kext needs a proper patch to be compatible with the 64bit kernel. Use the 32bit kernel instead, that's the only solution at this moment.
Wow, works like a charm
Frédéric Léveillée (not verified) — Wed, 2009-12-30 10:52Excellent.
Now since this has been posted 4 a while. I wonder Y is it not fixed yet, Y can't they release a new version to avoid us having to go through that technical mumbo jumbo.
Thanks!
André Lamelas (not verified) — Sat, 2009-10-31 18:12Thanks a lot. This is great! :D
Thank you! Finally, it is
jamik (not verified) — Wed, 2009-10-14 09:56Thank you!
Finally, it is working!
Post new comment