Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#33243 closed enhancement (fixed)

fuse4x-kext: add +trace variant

Reported by: anatol (Anatol Pomozov) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc:
Port: fuse4x-kext

Description

Hi, Dan.

During debugging fuse4x-kext kernel issues it might be useful to enable logging for this port (e.g. by using "+trace" variant). If this variant is enabled then following compile flags should be set

#define FUSE_COUNT_MEMORY  1
#define FUSE_DEBUG         1
#define FUSE_TRACE         1
#define FUSE_TRACE_LK      1
#define FUSE_TRACE_MSLEEP  1
#define FUSE_TRACE_OP      1
#define FUSE_TRACE_VNCACHE 1
#define M_FUSE4X_SERIALIZE_LOGGING 1

See the list here https://github.com/fuse4x/kext/blob/master/fuse.h

It should be either uncommented in fuse.h file or passed to xcode during compilation. The second option looks better to me but I do not know how to do it. Dan, could you please help me?

Attachments (1)

fix_path.patch (1.2 KB) - added by anatol (Anatol Pomozov) 12 years ago.
Fix path to kext in comments

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by drkp (Dan Ports)

Cc: dports@… removed
Owner: changed from macports-tickets@… to dports@…
Status: newassigned

Sure, I'll take a look.

comment:2 Changed 12 years ago by drkp (Dan Ports)

Type: defectenhancement

comment:3 Changed 12 years ago by anatol (Anatol Pomozov)

FYI macros names are changed in 0.9.0 to be more consistent with each other.

So what I need is to pass "-D...." to kext compilation. I do "configure.cflags-append -DFUSE4X_DEBUG". And it does not work and does not affect compilation using xcode.

My question - how to add a compile parameter to a xcode-based project?

comment:4 Changed 12 years ago by drkp (Dan Ports)

Resolution: fixed
Status: assignedclosed

r90273

It turns out the answer is

    xcode.build.settings-append GCC_PREPROCESSOR_DEFINITIONS='FUSE4X_DEBUG FUSE4X_TRACE FUSE4X_TRACE_LK FUSE4X_TRACE_MSLEEP FUSE4X_TRACE_OP FUSE4X_TRACE_VNCACHE FUSE4X_SERIALIZE_LOGGING'

which was surprisingly hard to figure out. Let me know if I missed any defines.

I thought about calling the variant +debug because that's more commonly used by other ports, but decided +trace was better because +debug usually just means compiling with debug symbols and this is far more than that.

comment:5 Changed 12 years ago by anatol (Anatol Pomozov)

Hi, thanks for taking care of it. Also thanks for updating to 0.9.0 although it requires a few additional things

  • kext needs FUSE4X_DISABLE_MACFUSE_MODE flag passed to GCC_PREPROCESSOR_DEFINITIONS. This disables some sysctl entries that mimic macfuse.
  • fuse needs "configure.cflags-append -D_DARWIN_USE_64_BIT_INODE", it forces to use 64bit inodes. The flag is no-op on 10.6+ but on 10.5 32bit inodes are used by default. In fuse4x version prior 0.9.0 this flag was a part of ./configure script (and forced 64bit inodes on all platforms) but now it is moved outside to a separate build script.
  • Portfiles (both kext and fuse) still mention "/System/" it should be removed I think.

As GCC_PREPROCESSOR_DEFINITIONS I also expected something cleaner. Something like xcode.build.definitions-append 'FUSE4X_DEBUG'

comment:6 Changed 12 years ago by anatol (Anatol Pomozov)

Resolution: fixed
Status: closedreopened

Reopening it as it still requires some additional changes.

comment:7 Changed 12 years ago by drkp (Dan Ports)

Resolution: fixed
Status: reopenedclosed

Changed 12 years ago by anatol (Anatol Pomozov)

Attachment: fix_path.patch added

Fix path to kext in comments

comment:8 Changed 12 years ago by anatol (Anatol Pomozov)

And here is another small fix

Note: See TracTickets for help on using tickets.