Hi Csaba

Thanks for your work on the Python bindings and the FreeBSD version of
FUSE.

> http://thread.gmane.org/gmane.comp.file-systems.fuse.devel/6637

The report in that thread seems to have drawn incorrect conclusions
based on circumstantial evidence.

Quoting from that thread:

> Pretty much nothing on OS X uses pkg-config.  So trying to use it on
> OS X to figure out dependency info almost always just breaks:
>
>   % pkg-config --exists fuse
>   %

That's how pkg-config is supposed to work. From the pkg-config
(version 0.22) man page: "With  "predicate"  options  such   as '--
exists'  pkg-config  runs  silently  by default, because it's usually
used in scripts that want to control what's output." The man page
further says: "The PKG_CONFIG_DEBUG_SPEW environment variable
overrides this option." And sure enough:

$ PKG_CONFIG_DEBUG_SPEW=1 pkg-config --exists fuse
...
Reading 'fuse' from file '/usr/local/lib/pkgconfig/fuse.pc'
Parsing package file '/usr/local/lib/pkgconfig/fuse.pc'
...

Similarly:

$ pkg-config --libs fuse
-pthread -L/usr/local/lib -lfuse -liconv

So, it doesn't break. Sure, pkg-config would only find things that
it's aware of, but that's expected. sshfs uses pkg-config on Mac OS X
just as you'd expect. MacFUSE documentation even details how to
install and use pkg-config:

http://code.google.com/p/macfuse/wiki/HOWTO

Here's what happens when I try to compile your Python bindings on a
Mac OS X machine with pkg-config and *the official distribution* of
MacFUSE installed:

$ uname -r
9.4.0 # That is, Mac OS X 10.5.4, the latest version at this writing
$ python --version
Python 2.5.1
$ cd /tmp/FusePython
$ python setup.py build
running build
running build_py
creating build
...
gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc
build/temp.macosx-10.5-i386-2.5/fuseparts/_fusemodule.o -L/usr/local/
lib -lfuse -liconv -o build/lib.macosx-10.5-i386-2.5/fuseparts/
_fusemodule.so
$

Then, hello.py and xmp.py from example/ work as expected.

There's probably another (unrelated to pkg-config) thing required to
make it compile on OS X. When I was writing MacFUSE, I defined
__FreeBSD__=10 in libfuse. This allowed me not only to include
existing libfuse code that was under #ifdef __FreeBSD__, but I could
also put Mac OS X specific code under #if (__FreeBSD_ >= 10). It also
seemed like a good pun as OS X borrows a bunch of code from *BSD and
takes that code to, well, "10". In hindsight, this wasn't the best
#define of all times, and I may replace it with a better one some day.

The pyport.h header from Python wants to include osreldate.h if
__FreeBSD__ is defined. Mac OS X doesn't have osreldate.h, so that's
one thing people will run into. If you'd like to accommodate a fix for
this, you could have an empty osreldate.h in the FusePython tree and
have the includepath point to that directory so that on Mac OS X, when
osreldate.h won't be found in standard include locations, this empty
one will be picked up and will make compilation happy.

Amit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to