effuse / profuse

An OCaml implementation of the FUSE protocol versions 7.8 and 7.23
ISC License
30 stars 7 forks source link

`make test` is broken on OSX #1

Open samoht opened 10 years ago

samoht commented 10 years ago
$ make test
ocaml setup.ml -build
/Users/thomas/.opam/system/bin/ocamlfind ocamlopt -shared -linkall lib/profuse.cmxa -o lib/profuse.cmxs
/Users/thomas/.opam/system/bin/ocamlfind ocamlopt -shared -linkall linux/linux.cmxa -o linux/linux.cmxs
ocaml setup.ml -test
ocamlfind ocamlopt -o run_test -package oUnit -package alcotest -package ctypes -package fd-send-recv -package unix-unistd -package unix-errno -package unix-dirent -package unix-sys-stat -package unix-fcntl -package lwt.unix -package lwt.preemptive -g -thread \
        -I ../_build/lib -I ../_build/linux \
        ../_build/lib/opcode.cmx \
        ../_build/lib/fuse.cmx \
        ../_build/lib/view.cmx \
        ../_build/lib/struct_common.cmx \
        ../_build/lib/struct_linux_7_8.cmx \
        ../_build/lib/struct_osx_7_8.cmx \
        ../_build/lib/struct.cmx \
        ../_build/lib/in_common.cmx \
        ../_build/lib/in_linux_7_8.cmx \
        ../_build/lib/in_osx_7_8.cmx \
        ../_build/lib/in.cmx \
        ../_build/lib/out_common.cmx \
        ../_build/lib/out_linux_7_8.cmx \
        ../_build/lib/out_osx_7_8.cmx \
        ../_build/lib/out.cmx \
        ../_build/linux/profuse.cmx \
        ../_build/linux/lofs.cmx \
        -linkpkg test.ml
Undefined symbols for architecture x86_64:
  "_ffi_closure_alloc", referenced from:
      _ctypes_make_function_pointer in libctypes-foreign-base_stubs.a(ffi_call_stubs.o)
  "_ffi_prep_closure_loc", referenced from:
      _ctypes_make_function_pointer in libctypes-foreign-base_stubs.a(ffi_call_stubs.o)
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

I suspect this is expected because this isrunning linux tests on OSX, but that would be good to fail more graciously.

samoht commented 10 years ago

Seems to be related to https://github.com/ocamllabs/ocaml-ctypes/issues/74

dsheets commented 10 years ago

I believe this issue is a general ctypes problem as you indicate. Once you clear it, you will surely find further issues with ctypes-on-osx. In particular, I believe a new mounting procedure will need to be defined. Probably linux/profuse.ml should be functorized and placed into lib/.

@yallop will eventually bring back the Mac Mini (:-P) and we can rack it for remote test builds. Alternately, I will probably hook up my MacBook Air with 10.6 and broken screen in the next few days for testing if I can work around the display damage.

dsheets commented 10 years ago

While the tests still fail on OS X, the ctypes problem has been temporarily addressed in HEAD using the pkg-config solution described in ocamllabs/ocaml-ctypes#74.