Closed alx closed 11 years ago
Here is the method containing the error:
(* Run a command, read the output into a BigArray.Array1. *)
let subprocess_read_bigarray cmd offset big_array =
log (Printf.sprintf "Command %S" (BatString.join " " cmd));
let out_pipe = SubprocessWithBatIO.open_process_in (Array.of_list cmd) in
let out_fd = SubprocessWithBatIO.descr_of_input out_pipe in
(* Can't seek a pipe. Read and ignore. *)
(* XXX lossy int64 conversion *)
ignore (BatIO.really_nread out_pipe (Int64.to_int offset));
(* Returns how much was read, may raise. *)
let r = Unix_util.read out_fd big_array in
require_normal_exit out_pipe;
r
With the line 150 error on this line:
let r = Unix_util.read out_fd big_array in
I can't really look at this until tomorrow, but for now, Unix_util is supposed to be shipped by ocamlfuse.
Thanks for the tips :)
I'm on debian (raspbian for raspi) and I can't get this line from the readme working:
sudo pacman -S omake ocamlfuse-cvs pcre-ocaml ocaml-batteries
That's probably the place where I'm missing ocamlfuse.
Have a nice night,
Alex
I've retried the installation from the start, and I think it comes from ocamlfuse dependency (I've never touched a ocaml project):
git-fs $ make -C deps/ocamlfuse/lib
make: Entering directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
make[1]: Entering directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
make[1]: `libFuse_stubs.a' is up to date.
ocamlopt -c -thread Result.ml
/bin/sh: 5: ocamlopt: not found
make[1]: *** [Result.cmi] Error 127
make[1]: Leaving directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
make: *** [native-code-library] Error 2
make: Leaving directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
I've tried to look around, ocamlopt doesn't seem available for raspi, so I'm not sure what's the next step.
Thanks for your help :)
The aptitude line in the README is supposed to pull in ocaml-nox, which contains the ocamlopt command. If there's an error at that step the rest isn't likely to succeed.
For some reason the debian source package will build ocamlopt on armel but not armhf (edit: OCaml 4.00 does build ocamlopt on armhf). If you look at ocamlfuse's README.md, it gives alternative build instructions that may work on the raspberry:
cd deps/ocamlfuse
ocaml setup.ml -configure
ocaml setup.ml -build
The git-fs OMakefile should be portable enough to do the rest, so please give it a test.
Thanks, I've now managed to buid ocaml-fuse and I'm back on the ocamlopt: not found
issue.
I'll let you know if I find a way to install OCaml 4.00 on the raspi.
Nice, I've succeeded installing OCaml 4.00 thanks to paparazzi wiki : http://paparazzi.enac.fr/wiki/Installation/RaspberryPi
I've retry the make command then, to get this error.
git-fs $ make -C deps/ocamlfuse/lib
make: Entering directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
make[1]: Entering directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
make[1]: `libFuse_stubs.a' is up to date.
ocamlc -c -thread Fuse_bindings.mli
File "Fuse_bindings.mli", line 37, characters 8-23:
Error: Unbound module Com
make[1]: *** [Fuse_bindings.cmi] Error 2
make[1]: Leaving directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
make: *** [native-code-library] Error 2
make: Leaving directory `/home/alx/code/git-fs/deps/ocamlfuse/lib'
I've tried to install opam
to see if it helps, but I've got this error: Fatal error: OCaml and preprocessor have incompatible versions
Would it help on the Com module error to have opam running?
Com is part of camlidl. After adding the ocaml-rpi repo, you should be able to run the rest of the installation as normal. You should re-run the aptitude line; there should be no need for OPAM. If everything works well with just the extra repo added, I'll mention it in the README.
That said, if things get much more complicated than that, I suggest not using OCaml 4 and building without ocamlopt. In which case you should downgrade OCaml, make a clean clone, and replace the build instructions with this:
git submodule update --init
make -C deps/ocamlfuse/lib byte-code-library
omake
Oh, the ocaml-rpi repo contains just the compiler, it didn't rebuild camlidl or anything else. That won't work. Please go with the non-ocamlopt instructions, I'll be glad to have someone test them.
thanks @g2p, the modified build instructions are working perfectly with the original ocaml-rpi :)
I've updated the README. Thanks!
Hi,
I'd like to use a raspberry-pi as a Sparkleshare media library.
Sparkleshare is directing to use git-fs to mount media libraries, and I've follow the installation instructions until this error.
Could you give me a hint as I'm not use to omake compilations?
Thanks a lot;
Alex