【问题标题】:Trouble compiling FUSE filesystems on OS X在 OS X 上编译 FUSE 文件系统时遇到问题
【发布时间】:2013-12-03 22:11:33
【问题描述】:

操作系统:OS X Mavericks (v10.9)

保险丝:OSXFUSEv2.6.2

我正在尝试编译 loopback filesystem in C,但出现此错误:

$ 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

尝试编译boxfs2 也会产生这个错误:

$ 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

谁能指出我正确的方向?

【问题讨论】:

    标签: macos makefile fuse pkg-config


    【解决方案1】:

    至于第一个问题,您需要在编译器可以看到的地方使用 OSXFUSE 库,或者您需要告诉编译器它在哪里。

    使用mdfind 定位osxfuse 库文件可能会取得一些成功,然后将-L/path/to/osxfuse 添加到makefile 的编译/配置脚本中。

    同样,对于第二个,尝试确保 boxfs2 知道保险丝头:看起来像添加 -I/usr/local/include/osxfuse/fuse 可能会做到这一点。

    【讨论】:

    • 哦:如果我不得不猜测,-L/usr/local/lib/osxfuse/ 可能是你的答案,但那只是猜测。
    • 关闭。 -L/usr/local/lib/ 已修复。仍在尝试找出 boxfs2。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-04-12
    • 2013-06-11
    • 1970-01-01
    • 2014-09-27
    • 2014-02-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多