5dollarwhitebox.org - theboxownsyou

  • blog
  • projects
  • articles
  • tech wiki
  • about
  • login
Home › Blogs › drks's blog

RSS Feed

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.

- MacFuse Project

  • drks's blog

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More instructions

Brian McGonagill (not verified) — Tue, 2010-02-23 02:40

I am trying to setup macfuse and macfusion, and I can't get any of it to work. I'm not sure I'm doing any of it in the right order, much less I am on snow leopard, so I haven' had the opportunity to follow your directions above.

Is there a location with a good step by step for getting macfuse, sshfs, and macfusion all up and running on snow leopard? I really need a beginning to end I guess. I don't usually have such a hard time of it, but this one's got me.

I appreciate any help,

Brian

  • reply

Please see this thread:

wereHamster (not verified) — Sun, 2010-01-10 23:24

Please 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.

  • reply

Just came across this

drks — Thu, 2010-02-18 07:53

Just came across this comment. Thank you for the feedback. I'll add an update to the original post, however as far as my usage I've not had any issues at all.

  • reply

Wow, works like a charm

Frédéric Léveillée (not verified) — Wed, 2009-12-30 10:52

Excellent.
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.

  • reply

Thanks!

André Lamelas (not verified) — Sat, 2009-10-31 18:12

Thanks a lot. This is great! :D

  • reply

Thank you! Finally, it is

jamik (not verified) — Wed, 2009-10-14 09:56

Thank you!
Finally, it is working!

  • reply

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
Input format
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <diff>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <perl>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options



Who's online

There are currently 0 users and 1 guest online.
  • blog
  • projects
  • articles
  • tech wiki
  • about
  • login

5dollarwhitebox.org is not responsible in anyway for actions performed based on information found on this site.