Question

I am trying to learn Ocaml using Real World Ocaml. I installed ocaml using MacPorts. Now, I am trying to install ocaml-core-extended:

$ sudo port install ocaml-core-extended

but it fails while installing dependency ocaml-bin-prot:

Here is the relevant part from the build log:

:notice:build --->  Building ocaml-bin-prot
:debug:build Executing org.macports.build (ocaml-bin-prot)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build 
:info:build getconf: no such configuration parameter `LFS64_CFLAGS'
:info:build ocamlfind ocamldep -pp 'cpp -traditional -undef -w -DARCH_SIXTYFOUR' -package unix -package bigarray -modules lib/type_class.mli > lib/type_class.mli.depends
:info:build + ocamlfind ocamldep -pp 'cpp -traditional -undef -w -DARCH_SIXTYFOUR' -package unix -package bigarray -modules lib/type_class.mli > lib/type_class.mli.depends
:info:build File "lib/type_class.mli", line 68, characters 16-20:
:info:build Error: Syntax error
:info:build Command exited with code 2.
:info:build E: Failure("Command '/opt/local/bin/ocamlbuild lib/libbin_prot_stubs.a lib/dllbin_prot_stubs.so lib/bin_prot.cma lib/bin_prot.cmxs lib/bin_prot.cmxa lib/bin_prot.a syntax/pa_bin_prot.cma -tag debug' terminated with error code 10")
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build 
:info:build Exit code: 1
:error:build org.macports.build for port ocaml-bin-prot returned: command execution failed

I looked at the lib/type_class.mli and I have no clue why there would be a syntax error there. It is just a macro expansion. I would like my bug report to be a little better than "here's a problem".

So, has anyone encountered this failure? Any hints?

 $ uname -a
Darwin zzzz.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
 root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
 $ ocaml -version
The OCaml toplevel, version 4.01.0
 $ cpp --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
Était-ce utile?

La solution

I am assuming the specific problems I had are more related to the transition to Mavericks than anything else.

In the mean time, I decided to install opam with ocamlbrew, and everything worked very smoothly.

I was able to set up my environment following the instructions.

Autres conseils

What is the version of core library? Looks like the library is not updated for OCaml 4.01, probably the port is old and haven't catched up yet..

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top