Trouble compiling FUSE filesystems on OS X

3.7k views Asked by At

OS: OS X Mavericks (v10.9)

FUSE: OSXFUSE v2.6.2

I'm trying to compile the loopback filesystem in C, but I'm getting this error:

$ make
cc -D_FILE_OFFSET_BITS=64 -I/usr/local/include/osxfuse/fuse -Wall -g  -F/Library/Frameworks -o loopback loopback.c -losxfuse
ld: library not found for -losxfuse
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [loopback] Error 1

Trying to compile boxfs2 also produces this error:

$ make
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libapp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libapp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libapp' found
Package libjson was not found in the pkg-config search path.
Perhaps you should add the directory containing `libjson.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libjson' found
Compiling boxfs.c
cc   -c boxfs.c -o boxfs.o
boxfs.c:15:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^
1 error generated.
make: *** [boxfs.o] Error 1

Can anyone point me in the right direction?

1

There are 1 answers

2
Matthew G. On

As far as the first problem, you need the OSXFUSE library somewhere the compiler can see it, or you need to tell the compiler where it is.

You may have some success using mdfind to locate the osxfuse library file, then add -L/path/to/osxfuse to the compile/configure script to the makefile.

Similarly, the for the second, try making sure boxfs2 knows about the fuse header: Looks like adding -I/usr/local/include/osxfuse/fuse might do it.