[cfe-dev] using clang on unionfs on mac

Yingshen Yu yingshen.yu at gmail.com
Fri Nov 30 03:23:53 PST 2012

Thanks Eli, that's exactly the problem.
I found the libfuse by default overrides the inode id in stat with a sequential number, because the user fs might not implement it correctly. They offered an option -o use_ino to disable this override. 

A side note worth mention, Fuse4x 1.9.2 seems ignore use_ino option, the osxfuse port works.


在 2012-11-30,下午12:02,Eli Friedman <eli.friedman at gmail.com> 写道:

> On Thu, Nov 29, 2012 at 9:58 AM, Yingshen Yu <yingshen.yu at gmail.com> wrote:
>> Hi,
>> I'm trying to use unionFS-FUSE with fuse4x, which is to overlay a writable directory onto a read-only source directory.
>> both the writable and the read-only source directory are on a real HFS+ case insensitive volume.
>> clang worked well but for one issue,  it seems becoming case sensitive to header file includes. so
>> #include "Foo.h"
>> #include "foo.h"  // assuming Foo.h has #pragma once
>> actually includes both copies. This doesn't occur if I compile on source directory directly.
>> My understanding is, whether the two files should be treated as one file or two different file is depend on the underlying file system case sensitiveness.
>> so I guess clang can determine underlying FS is case sensitive or not, can anyone explain how it determines this?
> clang doesn't directly query whether a filesystem is case-sensitive.
> The way clang determines if two different names refer to the same file
> is based on the inode returned by stat().  It's possible that your
> FUSE filesystem is somehow messing up the invariant that each file has
> a unique inode.
> -Eli

More information about the cfe-dev mailing list