32 bit osxfuse

68 views
Skip to first unread message

Stanon

unread,
Mar 3, 2017, 5:16:54 PM3/3/17
to OSXFUSE
Hi,

I compiled hello.c as a 32 bit binary. When i create a sample filesystem, the filesystem gets mounted and gets listed in 'df' output. But, 'ls <fuse mountpoint>' doesn't list the files. If i compile it as a 64 bit binary then everything works fine

I am running this on a osx 10.9 version which runs a x64 kernel. 
root# sw_vers
ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28

The osx fuse kernel extension is loaded

root# kextstat | grep osxfuse
   96    0 0xffffff7f81c00000 0x19000    0x19000    com.github.osxfuse.filesystems.osxfuse (3.5.5) <7 5 4 3 1>

This is the output when i run in debug mode

 root# ./hello -d example
FUSE library version: 2.9.7
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0

If i run 'ls' on the osxfuse mountpoint, there is no response and  no additional logs printed. In case of 64 bit binary, logs get printed for the getattr calls. So, is 32 bit binary an supported configuration when the kernel is 64 bit. Eventually i want to port the osx fuse code into an existing project which can be built only on 32-bit due to certain limitations in our internal build system.

Is there any other way to get this working.

Stanon

unread,
Mar 3, 2017, 5:18:44 PM3/3/17
to OSXFUSE
This is the example hello.c that i was referring to https://github.com/osxfuse/filesystems/tree/master/filesystems-c/hello

Sam Moffatt

unread,
Mar 3, 2017, 6:06:49 PM3/3/17
to osxfus...@googlegroups.com
Why are you trying to use a 32 bit binary instead of 64 bit?

--
Sam Moffatt

Note: I'm not at my desk, responses may be delayed. Apologies for the typos, smartphones aren't all that smart. 

--
You received this message because you are subscribed to the Google Groups "OSXFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stanon

unread,
Mar 4, 2017, 4:22:00 AM3/4/17
to OSXFUSE
Like i mentioned in previous post, i need to integrate osxfuse code into a legacy software which is built as 32 bit application. All the dependent libraries are 32-bit. So, i am trying to find out is 32 bit binary osxfuse will work or not.

Sam Moffatt

unread,
Mar 4, 2017, 12:01:57 PM3/4/17
to osxfus...@googlegroups.com
I'd have to go digging but I suspect there are some flags that are missing in the 32 bit build that might be problematic, I'm not sure if there's anything that would outright block you but there might be some settings that are defaults in 64-bit apps that are biting you (there is some 64 bit inode flag I have a vague recollection of). 

That said what might make more sense is to treat your OSXFUSE app as a bridge can leave it 64-bit native and then use XPC or similar to talk to your main app. In general I'd avoid connecting the files stem process to the main app for general stability concerns. 

Cheers,

Sam


--
Sam Moffatt

Note: I'm not at my desk, responses may be delayed. Apologies for the typos, smartphones aren't all that smart. 

Stanon

unread,
Mar 5, 2017, 5:32:52 AM3/5/17
to OSXFUSE
Are you talking about D_DARWIN_USE_64_BIT_INODE flags. I modified the flag for 32 bit and that did not help.

Another interesting this is that the obj-c examples HelloFS and LoopbackFS work properly for both 32-bit and 64 bit. So, i am going to integrate obj-c wrapper in my application for now and meanwhile check what is wrong with the c code. If anyone has got the 32-bit c osfuxe working please reply

Sam Moffatt

unread,
Mar 13, 2017, 2:55:32 AM3/13/17
to osxfus...@googlegroups.com
Managed to repro this by putting in -arch i386 on loopback FS and having it sit there hanging. When I killed it gave me an error about “short read on fuse device” which makes me wonder if this should be working at all.

I also put in -arch i386 on the Obj-C LoopbackFS and it hung with the same error. Are you sure you were using a 32-bit binary when you got LoopbackFS to work?

Here’s what I did:

pancake:LoopbackFS pasamio$ gcc -o loop ../Support/NSError+POSIX.m LoopbackFS.m loop.m -I../Support     -framework OSXFUSE -framework Foundation -arch i386

pancake:LoopbackFS pasamio$ ./loop -rootPath /tmp/dir/ -mountPath ~/mnt/loop/

2017-03-12 23:50:01.271 loop[15497:21487301] *** WARNING: GMUserFileSystem delegate implements deprecated selector: createFileAtPath:attributes:userData:error:

FUSE library version: 2.9.7

nullpath_ok: 0

nopath: 0

utime_omit_ok: 0

^C^[[A^Cumount: /Users/pasamio/mnt/loop: not currently mounted


short read on fuse device

pancake:LoopbackFS pasamio$ rm loop

pancake:LoopbackFS pasamio$ gcc -o loop ../Support/NSError+POSIX.m LoopbackFS.m loop.m -I../Support     -framework OSXFUSE -framework Foundation

pancake:LoopbackFS pasamio$ ./loop -rootPath /tmp/dir/ -mountPath ~/mnt/loop/

2017-03-12 23:53:36.484 loop[15554:21492092] *** WARNING: GMUserFileSystem delegate implements deprecated selector: createFileAtPath:attributes:userData:error:

FUSE library version: 2.9.7

nullpath_ok: 0

nopath: 0

utime_omit_ok: 0

unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 15556

INIT: 7.19



To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-group+unsubscribe@googlegroups.com.

Benjamin Fleischer

unread,
Mar 15, 2017, 7:31:27 PM3/15/17
to osxfus...@googlegroups.com
Thanks for the bug report. This is actually a bug in FUSE for maOS that has been introduced in version 3.3. Starting with version 3.3 FUSE uses a socket pair to pass the FUSE device file descriptor to the file system process. Control messages (for passing the file descriptor) created using the CMSG macros in the Mac OS X 10.5 SDK are not properly aligned. This resulted in 32 bit file systems being unresponsive on 64 bit Macs.

The new 3.5.6 release should fix the issue. Please let me know if you are still able to reproduce the issue after installing the update.

Regards,
Benjamin

Stanon

unread,
Mar 17, 2017, 9:20:42 AM3/17/17
to OSXFUSE
This is a great news that it is fixed. Apologies for the wrong information that I posted regarding 32 bit objective-c osxfuse. I got busy with some other project after I posted that and just now verified that it doesn't work in 32 bit. I must have messed up with the compiler option and thought I built 32 bit.

Stanon

unread,
Mar 17, 2017, 9:26:45 AM3/17/17
to OSXFUSE
I will install the latest version and inform if issue is still seen in 32 bit. Thanks

Stanon

unread,
Mar 28, 2017, 12:31:57 PM3/28/17
to OSXFUSE
The problem is solved with 3.5.6. Thanks
Reply all
Reply to author
Forward
0 new messages