-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to build on Mac OS X #40
Comments
Are you using OPAM? Or are you building every package one by one? Anyway. It looks like there is no |
Yes, I am using The following is how I have got ocamlfuse to install: CC=gcc CPPFLAGS='-DFUSE_USE_VERSION=26 -I/usr/local/include/osxfuse' PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' opam install ocamlfuse The following is how I am trying to get google-drive-ocamlfuse to install: CC=gcc LDFLAGS=-L/usr/local/lib CPPFLAGS='-DFUSE_USE_VERSION=26 -I/usr/local/include/osxfuse' PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' opam install google-drive-ocamlfuse |
$ ls /usr/local/lib
libfuse.0.dylib libmacfuse_i64.2.dylib libosxfuse_i32.la
libfuse.2.dylib libmacfuse_i64.dylib libosxfuse_i64.2.dylib
libfuse.dylib libosxfuse.2.dylib libosxfuse_i64.dylib
libfuse_ino64.2.dylib libosxfuse.dylib libosxfuse_i64.la
libfuse_ino64.dylib libosxfuse.la pkgconfig
libmacfuse_i32.2.dylib libosxfuse_i32.2.dylib
libmacfuse_i32.dylib libosxfuse_i32.dylib |
Yes, native linking is the most difficult task (e.g. OCaml build systems don't support You can compile it with:
And if it builds correctly, you can install it with:
Let me know if it works. |
It won't build. There is definitely something wrong with camlidl, which I don't know what it is since I do not use Ocaml. Arch Linux users have also had issues with camlidl. $ ocaml setup.ml -build
Finished, 1 target (0 cached) in 00:00:09.
+ ocamlfind ocamlc -g -linkpkg -package threads -package sqlite3 -package gapi-ocaml -package camlidl -package Fuse -thread src/appDir.cmo src/utils.cmo src/config.cmo src/cache.cmo src/concurrentGlobal.cmo src/keyValueStore.cmo src/state.cmo src/context.cmo src/mime.cmo src/gaeProxy.cmo src/oauth2.cmo src/drive.cmo src/gdfuse.cmo -o src/gdfuse.byte
File "/Users/sorin/.opam/system/lib/Fuse/Fuse.cma(Bigarray)", line 1:
Warning 31: files /Users/sorin/.opam/system/lib/Fuse/Fuse.cma(Bigarray) and /Users/sorin/.homebrew/lib/ocaml/bigarray.cma(Bigarray) both define a module named Bigarray
Undefined symbols for architecture x86_64:
"___fuse_exited", referenced from:
_camlidl_Fuse_bindings___fuse_exited in libFuse_stubs.a(Fuse_bindings_stubs.o)
(maybe you meant: _camlidl_Fuse_bindings___fuse_exited)
"___fuse_process_cmd", referenced from:
_camlidl_Fuse_bindings___fuse_process_cmd in libFuse_stubs.a(Fuse_bindings_stubs.o)
(maybe you meant: _camlidl_Fuse_bindings___fuse_process_cmd)
"___fuse_read_cmd", referenced from:
_camlidl_Fuse_bindings___fuse_read_cmd in libFuse_stubs.a(Fuse_bindings_stubs.o)
(maybe you meant: _camlidl_Fuse_bindings___fuse_read_cmd)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "_none_", line 1:
Error: Error while building custom runtime system
Command exited with code 2.
Compilation unsuccessful after building 27 targets (0 cached) in 00:00:13.
E: Failure("Command ''/Users/sorin/.homebrew/bin/ocamlbuild' src/gdfuse.byte -tag debug' terminated with error code 10") |
To find where the problem is, you could try to:
|
The library compiles. The example won't. $ CC=gcc LDFLAGS="-L$(brew --prefix)/lib -L/usr/local/lib" CPPFLAGS="-DFUSE_USE_VERSION=26 -I$(brew --prefix)/include -I/usr/local/include/osxfuse" PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' INCDIRS=$(opam config var lib)/camlidl/ make -C lib/
camlidl -header \
Fuse_bindings.idl
making ._ncdi/Fuse_bindings.di from Fuse_bindings.mli
making ._d/Fuse_bindings.d from Fuse_bindings.ml
making ._d/Unix_util.d from Unix_util.ml
making ._d/Fuse.d from Fuse.ml
making ._d/Fuse_lib.d from Fuse_lib.ml
making ._d/Result.d from Result.ml
ocamlc -c -cc "gcc" -ccopt "-fPIC -I/Users/sorin/.homebrew/include -F/Users/sorin/.homebrew/Frameworks -D_FILE_OFFSET_BITS=64 -I. -pthread \
-DPIC -DNATIVE_CODE -DFUSE_USE_VERSION=26 -I/Users/sorin/.homebrew/include -I/usr/local/include/osxfuse \
-I/Users/sorin/.opam/system/lib/camlidl/ -o Fuse_bindings_stubs.o " Fuse_bindings_stubs.c
ocamlc -c -cc "gcc" -ccopt "-fPIC -I/Users/sorin/.homebrew/include -F/Users/sorin/.homebrew/Frameworks -D_FILE_OFFSET_BITS=64 -I. -pthread \
-DPIC -DNATIVE_CODE -DFUSE_USE_VERSION=26 -I/Users/sorin/.homebrew/include -I/usr/local/include/osxfuse \
-I/Users/sorin/.opam/system/lib/camlidl/ -o Fuse_util.o " Fuse_util.c
Fuse_util.c: In function ‘ops_init’:
Fuse_util.c:584: warning: return makes pointer from integer without a cast
Fuse_util.c: In function ‘set_fuse_operations’:
Fuse_util.c:596: warning: assignment from incompatible pointer type
Fuse_util.c:596: warning: assignment from incompatible pointer type
ocamlc -c -cc "gcc" -ccopt "-fPIC -I/Users/sorin/.homebrew/include -F/Users/sorin/.homebrew/Frameworks -D_FILE_OFFSET_BITS=64 -I. -pthread \
-DPIC -DNATIVE_CODE -DFUSE_USE_VERSION=26 -I/Users/sorin/.homebrew/include -I/usr/local/include/osxfuse \
-I/Users/sorin/.opam/system/lib/camlidl/ -o Unix_util_stubs.o " Unix_util_stubs.c
ar rcs libFuse_stubs.a Fuse_bindings_stubs.o Fuse_util.o Unix_util_stubs.o
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse_bindings.mli
ocamlopt -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse_bindings.ml
ocamlopt -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Result.ml
ocamlopt -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse_lib.ml
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse.mli
ocamlopt -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse.ml
ocamlopt -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Unix_util.ml
ocamlopt -a -thread -I /Users/sorin/.opam/system/lib/camlidl/ -linkall -ccopt -L/Users/sorin/.homebrew/lib -ccopt -L/usr/local/lib -cclib -lFuse_stubs -cclib -lfuse -cclib -lcamlidl \
-o Fuse.cmxa Fuse_bindings.cmx Result.cmx Fuse_lib.cmx Fuse.cmx Unix_util.cmx
making ._bcdi/Fuse_bindings.di from Fuse_bindings.mli
make[1]: `libFuse_stubs.a' is up to date.
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse_bindings.ml
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Result.ml
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse_lib.ml
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Fuse.ml
ocamlc -c -thread -I /Users/sorin/.opam/system/lib/camlidl/ Unix_util.ml
ocamlmklib -I /Users/sorin/.opam/system/lib/camlidl/ \
-o Fuse_stubs Fuse_bindings_stubs.o Fuse_util.o Unix_util_stubs.o -lfuse \
ocamlc -a -thread -dllib dllFuse_stubs.so -custom -I /Users/sorin/.opam/system/lib/camlidl/ -linkall -ccopt -L/Users/sorin/.homebrew/lib -ccopt -L/usr/local/lib bigarray.cma \
-cclib -lFuse_stubs -cclib -lfuse -cclib -lcamlidl -o Fuse.cma Fuse_bindings.cmo Result.cmo Fuse_lib.cmo Fuse.cmo Unix_util.cmo $ CC=gcc LDFLAGS="-L$(brew --prefix)/lib -L/usr/local/lib" CPPFLAGS="-DFUSE_USE_VERSION=26 -I$(brew --prefix)/include -I/usr/local/include/osxfuse" PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' INCDIRS=$(opam config var lib)/camlidl/ make -C example/
make -f Makefile.fusexmp
making ._d/fusexmp.d from fusexmp.ml
ocamlopt -c -thread -I /Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse fusexmp.ml
File "fusexmp.ml", line 28, characters 0-18:
Error: Unbound module Fuse_bindings
make[2]: *** [fusexmp.cmi] Error 2
make[1]: *** [native-code] Error 2
make: *** [default] Error 2 |
What if you try to install the library with |
Where will it install? ocamlfuse is already installed via opam. |
$ opam info ocamlfuse
package: ocamlfuse
version: 2.7.1-cvs
upstream-url: https://forge.ocamlcore.org/frs/download.php/1074/ocamlfuse-2.7.1-cvs.tar.gz
upstream-kind: http
upstream-checksum: 3e9e7ee2fd89e033a265840ca5aa4d44
author: Vincenzo Ciancia
depends: ocamlfind & camlidl
installed-version: ocamlfuse.2.7.1-cvs [system]
description: OCaml bindings for FUSE (Filesystem in UserSpacE) |
The target directory can be shown by this command:
If it's the opam lib directory, you will not be able to install with |
I got that installed. The same thing occurs. $ LDFLAGS="-L$(opam config var lib)/camlidl -L$(brew --prefix)/lib -L/usr/local/lib" CPPFLAGS="-DFUSE_USE_VERSION=26 -I$(brew --prefix)/include -I/usr/local/include/osxfuse" PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' make -C example
make -f Makefile.fusexmp
making ._d/fusexmp.d from fusexmp.ml
ocamlopt -c -thread -I /Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse fusexmp.ml
ocamlopt \
\
unix.cmxa threads.cmxa -thread -I /Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse -ccopt -L/Users/sorin/.opam/system/lib/camlidl -ccopt -L/Users/sorin/.homebrew/lib -ccopt -L/usr/local/lib -ccopt -L/Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse bigarray.cmxa Fuse.cmxa -cclib -lfuse -cclib -lcamlidl -o fusexmp \
fusexmp.cmx
Undefined symbols for architecture x86_64:
"___fuse_exited", referenced from:
_camlidl_Fuse_bindings___fuse_exited in libFuse_stubs.a(Fuse_bindings_stubs.o)
(maybe you meant: _camlidl_Fuse_bindings___fuse_exited)
"___fuse_process_cmd", referenced from:
_camlidl_Fuse_bindings___fuse_process_cmd in libFuse_stubs.a(Fuse_bindings_stubs.o)
(maybe you meant: _camlidl_Fuse_bindings___fuse_process_cmd)
"___fuse_read_cmd", referenced from:
_camlidl_Fuse_bindings___fuse_read_cmd in libFuse_stubs.a(Fuse_bindings_stubs.o)
(maybe you meant: _camlidl_Fuse_bindings___fuse_read_cmd)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
make[2]: *** [fusexmp] Error 2
make[1]: *** [native-code] Error 2
make: *** [default] Error 2 libfuse is built properly. Many fuse file systems work. I don't understand why it doesn't those symbols and what's up with those underscores. $ file /usr/local/lib/libfuse.dylib
/usr/local/lib/libfuse.dylib: Mach-O universal binary with 4 architectures
/usr/local/lib/libfuse.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc
/usr/local/lib/libfuse.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64
/usr/local/lib/libfuse.dylib (for architecture i386): Mach-O dynamically linked shared library i386
/usr/local/lib/libfuse.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 |
Could you post the content of file |
/* File generated from Fuse_bindings.idl */
#include <stddef.h>
#include <string.h>
#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/alloc.h>
#include <caml/fail.h>
#include <caml/callback.h>
#ifdef Custom_tag
#include <caml/custom.h>
#include <caml/bigarray.h>
#endif
#include <caml/camlidlruntime.h>
#include "Fuse_bindings.h"
void camlidl_ml2c_Fuse_bindings_fuse(value _v1, fuse * _c2, camlidl_ctx _ctx)
{
*_c2 = *((fuse *) Bp_val(_v1));
}
value camlidl_c2ml_Fuse_bindings_fuse(fuse * _c2, camlidl_ctx _ctx)
{
value _v1;
_v1 = camlidl_alloc((sizeof(fuse) + sizeof(value) - 1) / sizeof(value), Abstract_tag);
*((fuse *) Bp_val(_v1)) = *_c2;
return _v1;
}
void camlidl_ml2c_Fuse_bindings_str(value _v1, str * _c2, camlidl_ctx _ctx)
{
(*_c2) = camlidl_malloc_string(_v1, _ctx);
}
value camlidl_c2ml_Fuse_bindings_str(str * _c2, camlidl_ctx _ctx)
{
value _v1;
_v1 = copy_string((*_c2));
return _v1;
}
void camlidl_ml2c_Fuse_bindings_struct_fuse_operation_names(value _v1, struct fuse_operation_names * _c2, camlidl_ctx _ctx)
{
value _v3;
value _v4;
value _v5;
value _v6;
value _v7;
value _v8;
value _v9;
value _v10;
value _v11;
value _v12;
value _v13;
value _v14;
value _v15;
value _v16;
value _v17;
value _v18;
value _v19;
value _v20;
value _v21;
value _v22;
value _v23;
value _v24;
value _v25;
value _v26;
value _v27;
value _v28;
value _v29;
value _v30;
value _v31;
value _v32;
value _v33;
value _v34;
value _v35;
value _v36;
value _v37;
value _v38;
value _v39;
value _v40;
value _v41;
value _v42;
value _v43;
value _v44;
value _v45;
value _v46;
value _v47;
value _v48;
value _v49;
value _v50;
value _v51;
value _v52;
value _v53;
value _v54;
value _v55;
value _v56;
value _v57;
value _v58;
value _v59;
value _v60;
_v3 = Field(_v1, 0);
if (_v3 == Val_int(0)) {
(*_c2).init = NULL;
} else {
_v4 = Field(_v3, 0);
(*_c2).init = camlidl_malloc_string(_v4, _ctx);
}
_v5 = Field(_v1, 1);
if (_v5 == Val_int(0)) {
(*_c2).getattr = NULL;
} else {
_v6 = Field(_v5, 0);
(*_c2).getattr = camlidl_malloc_string(_v6, _ctx);
}
_v7 = Field(_v1, 2);
if (_v7 == Val_int(0)) {
(*_c2).readlink = NULL;
} else {
_v8 = Field(_v7, 0);
(*_c2).readlink = camlidl_malloc_string(_v8, _ctx);
}
_v9 = Field(_v1, 3);
if (_v9 == Val_int(0)) {
(*_c2).readdir = NULL;
} else {
_v10 = Field(_v9, 0);
(*_c2).readdir = camlidl_malloc_string(_v10, _ctx);
}
_v11 = Field(_v1, 4);
if (_v11 == Val_int(0)) {
(*_c2).opendir = NULL;
} else {
_v12 = Field(_v11, 0);
(*_c2).opendir = camlidl_malloc_string(_v12, _ctx);
}
_v13 = Field(_v1, 5);
if (_v13 == Val_int(0)) {
(*_c2).releasedir = NULL;
} else {
_v14 = Field(_v13, 0);
(*_c2).releasedir = camlidl_malloc_string(_v14, _ctx);
}
_v15 = Field(_v1, 6);
if (_v15 == Val_int(0)) {
(*_c2).fsyncdir = NULL;
} else {
_v16 = Field(_v15, 0);
(*_c2).fsyncdir = camlidl_malloc_string(_v16, _ctx);
}
_v17 = Field(_v1, 7);
if (_v17 == Val_int(0)) {
(*_c2).mknod = NULL;
} else {
_v18 = Field(_v17, 0);
(*_c2).mknod = camlidl_malloc_string(_v18, _ctx);
}
_v19 = Field(_v1, 8);
if (_v19 == Val_int(0)) {
(*_c2).mkdir = NULL;
} else {
_v20 = Field(_v19, 0);
(*_c2).mkdir = camlidl_malloc_string(_v20, _ctx);
}
_v21 = Field(_v1, 9);
if (_v21 == Val_int(0)) {
(*_c2).unlink = NULL;
} else {
_v22 = Field(_v21, 0);
(*_c2).unlink = camlidl_malloc_string(_v22, _ctx);
}
_v23 = Field(_v1, 10);
if (_v23 == Val_int(0)) {
(*_c2).rmdir = NULL;
} else {
_v24 = Field(_v23, 0);
(*_c2).rmdir = camlidl_malloc_string(_v24, _ctx);
}
_v25 = Field(_v1, 11);
if (_v25 == Val_int(0)) {
(*_c2).symlink = NULL;
} else {
_v26 = Field(_v25, 0);
(*_c2).symlink = camlidl_malloc_string(_v26, _ctx);
}
_v27 = Field(_v1, 12);
if (_v27 == Val_int(0)) {
(*_c2).rename = NULL;
} else {
_v28 = Field(_v27, 0);
(*_c2).rename = camlidl_malloc_string(_v28, _ctx);
}
_v29 = Field(_v1, 13);
if (_v29 == Val_int(0)) {
(*_c2).link = NULL;
} else {
_v30 = Field(_v29, 0);
(*_c2).link = camlidl_malloc_string(_v30, _ctx);
}
_v31 = Field(_v1, 14);
if (_v31 == Val_int(0)) {
(*_c2).chmod = NULL;
} else {
_v32 = Field(_v31, 0);
(*_c2).chmod = camlidl_malloc_string(_v32, _ctx);
}
_v33 = Field(_v1, 15);
if (_v33 == Val_int(0)) {
(*_c2).chown = NULL;
} else {
_v34 = Field(_v33, 0);
(*_c2).chown = camlidl_malloc_string(_v34, _ctx);
}
_v35 = Field(_v1, 16);
if (_v35 == Val_int(0)) {
(*_c2).truncate = NULL;
} else {
_v36 = Field(_v35, 0);
(*_c2).truncate = camlidl_malloc_string(_v36, _ctx);
}
_v37 = Field(_v1, 17);
if (_v37 == Val_int(0)) {
(*_c2).utime = NULL;
} else {
_v38 = Field(_v37, 0);
(*_c2).utime = camlidl_malloc_string(_v38, _ctx);
}
_v39 = Field(_v1, 18);
if (_v39 == Val_int(0)) {
(*_c2).open = NULL;
} else {
_v40 = Field(_v39, 0);
(*_c2).open = camlidl_malloc_string(_v40, _ctx);
}
_v41 = Field(_v1, 19);
if (_v41 == Val_int(0)) {
(*_c2).read = NULL;
} else {
_v42 = Field(_v41, 0);
(*_c2).read = camlidl_malloc_string(_v42, _ctx);
}
_v43 = Field(_v1, 20);
if (_v43 == Val_int(0)) {
(*_c2).write = NULL;
} else {
_v44 = Field(_v43, 0);
(*_c2).write = camlidl_malloc_string(_v44, _ctx);
}
_v45 = Field(_v1, 21);
if (_v45 == Val_int(0)) {
(*_c2).statfs = NULL;
} else {
_v46 = Field(_v45, 0);
(*_c2).statfs = camlidl_malloc_string(_v46, _ctx);
}
_v47 = Field(_v1, 22);
if (_v47 == Val_int(0)) {
(*_c2).flush = NULL;
} else {
_v48 = Field(_v47, 0);
(*_c2).flush = camlidl_malloc_string(_v48, _ctx);
}
_v49 = Field(_v1, 23);
if (_v49 == Val_int(0)) {
(*_c2).release = NULL;
} else {
_v50 = Field(_v49, 0);
(*_c2).release = camlidl_malloc_string(_v50, _ctx);
}
_v51 = Field(_v1, 24);
if (_v51 == Val_int(0)) {
(*_c2).fsync = NULL;
} else {
_v52 = Field(_v51, 0);
(*_c2).fsync = camlidl_malloc_string(_v52, _ctx);
}
_v53 = Field(_v1, 25);
if (_v53 == Val_int(0)) {
(*_c2).setxattr = NULL;
} else {
_v54 = Field(_v53, 0);
(*_c2).setxattr = camlidl_malloc_string(_v54, _ctx);
}
_v55 = Field(_v1, 26);
if (_v55 == Val_int(0)) {
(*_c2).getxattr = NULL;
} else {
_v56 = Field(_v55, 0);
(*_c2).getxattr = camlidl_malloc_string(_v56, _ctx);
}
_v57 = Field(_v1, 27);
if (_v57 == Val_int(0)) {
(*_c2).listxattr = NULL;
} else {
_v58 = Field(_v57, 0);
(*_c2).listxattr = camlidl_malloc_string(_v58, _ctx);
}
_v59 = Field(_v1, 28);
if (_v59 == Val_int(0)) {
(*_c2).removexattr = NULL;
} else {
_v60 = Field(_v59, 0);
(*_c2).removexattr = camlidl_malloc_string(_v60, _ctx);
}
}
value camlidl_c2ml_Fuse_bindings_struct_fuse_operation_names(struct fuse_operation_names * _c1, camlidl_ctx _ctx)
{
value _v2;
value _v3[29];
value _v4;
value _v5;
value _v6;
value _v7;
value _v8;
value _v9;
value _v10;
value _v11;
value _v12;
value _v13;
value _v14;
value _v15;
value _v16;
value _v17;
value _v18;
value _v19;
value _v20;
value _v21;
value _v22;
value _v23;
value _v24;
value _v25;
value _v26;
value _v27;
value _v28;
value _v29;
value _v30;
value _v31;
value _v32;
memset(_v3, 0, 29 * sizeof(value));
Begin_roots_block(_v3, 29)
if ((*_c1).init == NULL) {
_v3[0] = Val_int(0);
} else {
_v4 = copy_string((*_c1).init);
Begin_root(_v4)
_v3[0] = camlidl_alloc_small(1, 0);
Field(_v3[0], 0) = _v4;
End_roots();
}
if ((*_c1).getattr == NULL) {
_v3[1] = Val_int(0);
} else {
_v5 = copy_string((*_c1).getattr);
Begin_root(_v5)
_v3[1] = camlidl_alloc_small(1, 0);
Field(_v3[1], 0) = _v5;
End_roots();
}
if ((*_c1).readlink == NULL) {
_v3[2] = Val_int(0);
} else {
_v6 = copy_string((*_c1).readlink);
Begin_root(_v6)
_v3[2] = camlidl_alloc_small(1, 0);
Field(_v3[2], 0) = _v6;
End_roots();
}
if ((*_c1).readdir == NULL) {
_v3[3] = Val_int(0);
} else {
_v7 = copy_string((*_c1).readdir);
Begin_root(_v7)
_v3[3] = camlidl_alloc_small(1, 0);
Field(_v3[3], 0) = _v7;
End_roots();
}
if ((*_c1).opendir == NULL) {
_v3[4] = Val_int(0);
} else {
_v8 = copy_string((*_c1).opendir);
Begin_root(_v8)
_v3[4] = camlidl_alloc_small(1, 0);
Field(_v3[4], 0) = _v8;
End_roots();
}
if ((*_c1).releasedir == NULL) {
_v3[5] = Val_int(0);
} else {
_v9 = copy_string((*_c1).releasedir);
Begin_root(_v9)
_v3[5] = camlidl_alloc_small(1, 0);
Field(_v3[5], 0) = _v9;
End_roots();
}
if ((*_c1).fsyncdir == NULL) {
_v3[6] = Val_int(0);
} else {
_v10 = copy_string((*_c1).fsyncdir);
Begin_root(_v10)
_v3[6] = camlidl_alloc_small(1, 0);
Field(_v3[6], 0) = _v10;
End_roots();
}
if ((*_c1).mknod == NULL) {
_v3[7] = Val_int(0);
} else {
_v11 = copy_string((*_c1).mknod);
Begin_root(_v11)
_v3[7] = camlidl_alloc_small(1, 0);
Field(_v3[7], 0) = _v11;
End_roots();
}
if ((*_c1).mkdir == NULL) {
_v3[8] = Val_int(0);
} else {
_v12 = copy_string((*_c1).mkdir);
Begin_root(_v12)
_v3[8] = camlidl_alloc_small(1, 0);
Field(_v3[8], 0) = _v12;
End_roots();
}
if ((*_c1).unlink == NULL) {
_v3[9] = Val_int(0);
} else {
_v13 = copy_string((*_c1).unlink);
Begin_root(_v13)
_v3[9] = camlidl_alloc_small(1, 0);
Field(_v3[9], 0) = _v13;
End_roots();
}
if ((*_c1).rmdir == NULL) {
_v3[10] = Val_int(0);
} else {
_v14 = copy_string((*_c1).rmdir);
Begin_root(_v14)
_v3[10] = camlidl_alloc_small(1, 0);
Field(_v3[10], 0) = _v14;
End_roots();
}
if ((*_c1).symlink == NULL) {
_v3[11] = Val_int(0);
} else {
_v15 = copy_string((*_c1).symlink);
Begin_root(_v15)
_v3[11] = camlidl_alloc_small(1, 0);
Field(_v3[11], 0) = _v15;
End_roots();
}
if ((*_c1).rename == NULL) {
_v3[12] = Val_int(0);
} else {
_v16 = copy_string((*_c1).rename);
Begin_root(_v16)
_v3[12] = camlidl_alloc_small(1, 0);
Field(_v3[12], 0) = _v16;
End_roots();
}
if ((*_c1).link == NULL) {
_v3[13] = Val_int(0);
} else {
_v17 = copy_string((*_c1).link);
Begin_root(_v17)
_v3[13] = camlidl_alloc_small(1, 0);
Field(_v3[13], 0) = _v17;
End_roots();
}
if ((*_c1).chmod == NULL) {
_v3[14] = Val_int(0);
} else {
_v18 = copy_string((*_c1).chmod);
Begin_root(_v18)
_v3[14] = camlidl_alloc_small(1, 0);
Field(_v3[14], 0) = _v18;
End_roots();
}
if ((*_c1).chown == NULL) {
_v3[15] = Val_int(0);
} else {
_v19 = copy_string((*_c1).chown);
Begin_root(_v19)
_v3[15] = camlidl_alloc_small(1, 0);
Field(_v3[15], 0) = _v19;
End_roots();
}
if ((*_c1).truncate == NULL) {
_v3[16] = Val_int(0);
} else {
_v20 = copy_string((*_c1).truncate);
Begin_root(_v20)
_v3[16] = camlidl_alloc_small(1, 0);
Field(_v3[16], 0) = _v20;
End_roots();
}
if ((*_c1).utime == NULL) {
_v3[17] = Val_int(0);
} else {
_v21 = copy_string((*_c1).utime);
Begin_root(_v21)
_v3[17] = camlidl_alloc_small(1, 0);
Field(_v3[17], 0) = _v21;
End_roots();
}
if ((*_c1).open == NULL) {
_v3[18] = Val_int(0);
} else {
_v22 = copy_string((*_c1).open);
Begin_root(_v22)
_v3[18] = camlidl_alloc_small(1, 0);
Field(_v3[18], 0) = _v22;
End_roots();
}
if ((*_c1).read == NULL) {
_v3[19] = Val_int(0);
} else {
_v23 = copy_string((*_c1).read);
Begin_root(_v23)
_v3[19] = camlidl_alloc_small(1, 0);
Field(_v3[19], 0) = _v23;
End_roots();
}
if ((*_c1).write == NULL) {
_v3[20] = Val_int(0);
} else {
_v24 = copy_string((*_c1).write);
Begin_root(_v24)
_v3[20] = camlidl_alloc_small(1, 0);
Field(_v3[20], 0) = _v24;
End_roots();
}
if ((*_c1).statfs == NULL) {
_v3[21] = Val_int(0);
} else {
_v25 = copy_string((*_c1).statfs);
Begin_root(_v25)
_v3[21] = camlidl_alloc_small(1, 0);
Field(_v3[21], 0) = _v25;
End_roots();
}
if ((*_c1).flush == NULL) {
_v3[22] = Val_int(0);
} else {
_v26 = copy_string((*_c1).flush);
Begin_root(_v26)
_v3[22] = camlidl_alloc_small(1, 0);
Field(_v3[22], 0) = _v26;
End_roots();
}
if ((*_c1).release == NULL) {
_v3[23] = Val_int(0);
} else {
_v27 = copy_string((*_c1).release);
Begin_root(_v27)
_v3[23] = camlidl_alloc_small(1, 0);
Field(_v3[23], 0) = _v27;
End_roots();
}
if ((*_c1).fsync == NULL) {
_v3[24] = Val_int(0);
} else {
_v28 = copy_string((*_c1).fsync);
Begin_root(_v28)
_v3[24] = camlidl_alloc_small(1, 0);
Field(_v3[24], 0) = _v28;
End_roots();
}
if ((*_c1).setxattr == NULL) {
_v3[25] = Val_int(0);
} else {
_v29 = copy_string((*_c1).setxattr);
Begin_root(_v29)
_v3[25] = camlidl_alloc_small(1, 0);
Field(_v3[25], 0) = _v29;
End_roots();
}
if ((*_c1).getxattr == NULL) {
_v3[26] = Val_int(0);
} else {
_v30 = copy_string((*_c1).getxattr);
Begin_root(_v30)
_v3[26] = camlidl_alloc_small(1, 0);
Field(_v3[26], 0) = _v30;
End_roots();
}
if ((*_c1).listxattr == NULL) {
_v3[27] = Val_int(0);
} else {
_v31 = copy_string((*_c1).listxattr);
Begin_root(_v31)
_v3[27] = camlidl_alloc_small(1, 0);
Field(_v3[27], 0) = _v31;
End_roots();
}
if ((*_c1).removexattr == NULL) {
_v3[28] = Val_int(0);
} else {
_v32 = copy_string((*_c1).removexattr);
Begin_root(_v32)
_v3[28] = camlidl_alloc_small(1, 0);
Field(_v3[28], 0) = _v32;
End_roots();
}
_v2 = camlidl_alloc_small(29, 0);
{ mlsize_t _c33;
for (_c33 = 0; _c33 < 29; _c33++) Field(_v2, _c33) = _v3[_c33];
}
End_roots()
return _v2;
}
extern void camlidl_ml2c_Fuse_bindings_struct_fuse(value, struct fuse *, camlidl_ctx _ctx);
extern value camlidl_c2ml_Fuse_bindings_struct_fuse(struct fuse *, camlidl_ctx _ctx);
void camlidl_ml2c_Fuse_bindings_struct___fuse_context(value _v1, struct __fuse_context * _c2, camlidl_ctx _ctx)
{
value _v3;
value _v4;
value _v5;
value _v6;
_v3 = Field(_v1, 0);
(*_c2).fuse = (struct fuse *) Field(_v3, 0);
_v4 = Field(_v1, 1);
(*_c2).uid = Int_val(_v4);
_v5 = Field(_v1, 2);
(*_c2).gid = Int_val(_v5);
_v6 = Field(_v1, 3);
(*_c2).pid = Int_val(_v6);
}
value camlidl_c2ml_Fuse_bindings_struct___fuse_context(struct __fuse_context * _c1, camlidl_ctx _ctx)
{
value _v2;
value _v3[4];
_v3[0] = _v3[1] = _v3[2] = _v3[3] = 0;
Begin_roots_block(_v3, 4)
_v3[0] = camlidl_alloc_small(1, Abstract_tag);
Field(_v3[0], 0) = (value) (*_c1).fuse;
_v3[1] = Val_int((*_c1).uid);
_v3[2] = Val_int((*_c1).gid);
_v3[3] = Val_int((*_c1).pid);
_v2 = camlidl_alloc_small(4, 0);
Field(_v2, 0) = _v3[0];
Field(_v2, 1) = _v3[1];
Field(_v2, 2) = _v3[2];
Field(_v2, 3) = _v3[3];
End_roots()
return _v2;
}
value camlidl_Fuse_bindings_fuse_get_context(value _unit)
{
struct __fuse_context *_res;
value _vres;
struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL };
camlidl_ctx _ctx = &_ctxs;
_res = fuse_get_context();
_vres = camlidl_c2ml_Fuse_bindings_struct___fuse_context(&*_res, _ctx);
camlidl_free(_ctx);
return _vres;
}
value camlidl_Fuse_bindings_get_fuse_operations(value _unit)
{
struct fuse_operations *_res;
value _vres;
_res = get_fuse_operations();
_vres = camlidl_alloc_small(1, Abstract_tag);
Field(_vres, 0) = (value) _res;
return _vres;
}
value camlidl_Fuse_bindings_set_fuse_operations(
value _v_op)
{
struct fuse_operation_names const *op; /*in*/
struct fuse_operation_names _c1;
struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL };
camlidl_ctx _ctx = &_ctxs;
op = &_c1;
camlidl_ml2c_Fuse_bindings_struct_fuse_operation_names(_v_op, &_c1, _ctx);
set_fuse_operations(op);
camlidl_free(_ctx);
return Val_unit;
}
value camlidl_Fuse_bindings___fuse_read_cmd(
value _v_f)
{
struct fuse *f; /*in*/
struct fuse_cmd *_res;
value _vres;
f = (struct fuse *) Field(_v_f, 0);
enter_blocking_section();
_res = __fuse_read_cmd(f);
leave_blocking_section();
_vres = camlidl_alloc_small(1, Abstract_tag);
Field(_vres, 0) = (value) _res;
return _vres;
}
value camlidl_Fuse_bindings___fuse_process_cmd(
value _v_f,
value _v_cmd)
{
struct fuse *f; /*in*/
struct fuse_cmd *cmd; /*in*/
f = (struct fuse *) Field(_v_f, 0);
cmd = (struct fuse_cmd *) Field(_v_cmd, 0);
enter_blocking_section();
__fuse_process_cmd(f, cmd);
leave_blocking_section();
return Val_unit;
}
value camlidl_Fuse_bindings_ml_fuse_init(value _unit)
{
ml_fuse_init();
return Val_unit;
}
value camlidl_Fuse_bindings_ml_fuse_main(
value _v_argv,
value _v_op)
{
int argc; /*in*/
str *argv; /*in*/
struct fuse_operations const *op; /*in*/
mlsize_t _c1;
mlsize_t _c2;
value _v3;
struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL };
camlidl_ctx _ctx = &_ctxs;
_c1 = Wosize_val(_v_argv);
argv = camlidl_malloc(_c1 * sizeof(str ), _ctx);
for (_c2 = 0; _c2 < _c1; _c2++) {
_v3 = Field(_v_argv, _c2);
camlidl_ml2c_Fuse_bindings_str(_v3, &argv[_c2], _ctx);
}
argc = _c1;
op = (struct fuse_operations const *) Field(_v_op, 0);
ml_fuse_main(argc, argv, op);
camlidl_free(_ctx);
return Val_unit;
}
value camlidl_Fuse_bindings___fuse_exited(
value _v_f)
{
struct fuse *f; /*in*/
int _res;
value _vres;
f = (struct fuse *) Field(_v_f, 0);
enter_blocking_section();
_res = __fuse_exited(f);
leave_blocking_section();
_vres = Val_int(_res);
return _vres;
} |
OK, thanks. It's exactly the same. So the problem is not camlidl. Can you try to:
|
No dice. It's still whining about the same symbols. |
OK, let's see what symbols are in the library. Could you post me the output of these commands?
|
This is a directory listing of /usr/local/lib.
The first fuse implementation for Mac OS X was MacFUSE. It has been abandoned. The successor of MacFUSE is OSXFUSE. However, MacFUSE had a flaw, a different API than the Linux version. So, file systems had to be rewritten. Seeing the API problem ,another project has sprung up, Fuse4X, and it fixed the API. Since then, Fuxe4X has been merged into OSXFUSE. I only have OSXFUSE installed, but that's why there are so many libraries listed. There is no $ nm -f /usr/local/lib/libfuse.dylib | egrep 'fuse_(exited|(process|read)_cmd)'
$ nm -f /usr/local/lib/libosxfuse.dylib | egrep 'fuse_(exited|(process|read)_cmd)'
0000000000004e4d T _fuse_exited
0000000000004e5b T _fuse_process_cmd
0000000000004d3a T _fuse_read_cmd |
This is what's found in libfuse.dylib. $ nm /usr/local/lib/libfuse.dylib
0000000000000ef4 t __dyld_func_lookup
0000000000000f04 t _libmacfuse_constructor
0000000000000efa T _macfuse_version
U _osxfuse_enable_macfuse_mode
U _osxfuse_version
0000000000000ee0 t dyld_stub_binding_helper |
This is the output on Linux:
So, there is no symbol with the double underscore in osxfuse. If you want, you could try to replace every occurrence of |
I have tried to put make -f Makefile.fusexmp
ocamlopt \
\
unix.cmxa threads.cmxa -thread -I /Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse -ccopt -L/Users/sorin/.opam/system/lib/camlidl -ccopt -L/usr/local/lib -ccopt -L/Users/sorin/.homebrew/lib -ccopt -L/Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse bigarray.cmxa Fuse.cmxa -cclib -lfuse -cclib -lcamlidl -o fusexmp \
fusexmp.cmx
File "_none_", line 1:
Error: Files fusexmp.cmx
and /Users/sorin/.homebrew/lib/ocaml/site-packages/ocamlfuse/Fuse.cmxa
make inconsistent assumptions over interface Fuse_bindings
make[2]: *** [fusexmp] Error 2
make[1]: *** [native-code] Error 2
make: *** [default] Error 2 |
That error means that there is still an old version of the library somewhere in the library path. Try to uninstall the library, check that no file is left in the |
I have got it to work by removing both underscores and using the following commands. It mounts the Hello World file system. CPPFLAGS="-DFUSE_USE_VERSION=26 -I/usr/local/include/osxfuse" INCDIRS="$(opam config var lib)/camlidl make" -C lib install LDFLAGS="-L$(opam config var lib)/camlidl" make -C example I don't think those underscores are correct. I think the compiler should be allowed to add them. By hardcoding those underscores, it causes problems with automatic linking and/or |
Good news. I think you are right about the underscores. Unfortunately the ocamlfuse package is not actively maintained anymore. But I will make some tests on my machine, to check if I can replace those versions of the functions. |
I have got google-drive-ocamlfuse to install. $ opam pin ocamlfuse https://github.com/sorin-ionescu/ocamlfuse.git
$ CPPFLAGS='-DFUSE_USE_VERSION=26 -I/usr/local/include/osxfuse' opam install ocamlfuse
$ opam install google-drive-ocamlfuse |
Well, thanks for your help. I will test the patched version and if everything is fine, I will publish the new version on OPAM. |
You're welcome. |
I appreciate the issue was closed long time ago, but I'm facing a similar problem when trying to install. I'm running OSX 10.10. Install fails with a very similar pattern - looks like OSXFUSE is not being linked up correctly. Both FUSE and opam were installed via Homebrew if that is relevant
|
Attempting to install this on Mac OS X has been an adventure. I had multiple issues with dependencies. After wrestling with ocamlfuse and getting it to install, the last thing remaining is google-drive-ocamlfuse. Unfortunately, it fails to link
src/gdfuse.ml
.The text was updated successfully, but these errors were encountered: