Version française
Home     About     Download     Resources     Contact us    
Browse thread
compiling virt-mem 0.3.1 with ocaml 3.11.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florent Monnier <fmonnier@l...>
Subject: compiling virt-mem 0.3.1 with ocaml 3.11.0
Hi,

I'm trying to compile "virt-mem" 0.3.1 with ocaml 3.11.0.
The compilation fails with the following files :
kernel.ml, virt_mem_ksyms.ml, virt_mem_mmap.ml, virt_mem_utsname.ml
which use a camlp4 extension.
I have not learned camlp4 yet, so I don't know how to fix this,
could someone tell me how to correct this ?


ocamlfind ocamldep -package \
 unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -package 
gettext-stub -syntax bitstring.syntax kernel.mli virt_mem.mli 
virt_mem_kallsyms.mli virt_mem_ksyms.mli virt_mem_mmap.mli virt_mem_types.mli 
virt_mem_utsname.mli kernel.ml test_mmap.ml virt_mem.ml virt_mem_capture.ml 
virt_mem_dump.ml virt_mem_gettext.ml virt_mem_kallsyms.ml virt_mem_kernels.ml 
virt_mem_ksyms.ml virt_mem_mmap.ml virt_mem_types.ml virt_mem_utils.ml 
virt_mem_utsname.ml virt_mem_version.ml  > .depend

File "kernel.ml", line 1001, characters 6-7:
Parse error: ":" expected after [patt] (in [patt_field])
Preprocessing error on file kernel.ml

File "virt_mem_ksyms.ml", line 175, characters 9-10:
Parse error: ":" expected after [patt] (in [patt_field])
Preprocessing error on file virt_mem_ksyms.ml

File "virt_mem_mmap.ml", line 366, characters 6-7:
Parse error: ":" expected after [patt] (in [patt_field])
Preprocessing error on file virt_mem_mmap.ml

File "virt_mem_utsname.ml", line 47, characters 6-7:
Parse error: ":" expected after [patt] (in [patt_field])
Preprocessing error on file virt_mem_utsname.ml


And I can not just rm .depend to see if it can build from there, because of 
packaging purpose, when a command doesn't return 0 the process just stops!

__________________________

I think bitstring is correctly installed:

$ ls /usr/lib/ocaml/bitstring/
META           bitstring.cmxa            bitstring_persistent.cmx
bitmatch.cmx   bitstring.mli             bitstring_persistent.cmxa
bitstring.a    bitstring_config.cmx      bitstring_persistent.mli
bitstring.cma  bitstring_persistent.a    bitstring_types.cmx
bitstring.cmi  bitstring_persistent.cma  libbitstring.a
bitstring.cmx  bitstring_persistent.cmi  pa_bitstring.cmo


$ cat /usr/lib/ocaml/bitstring/META 
name = "bitstring"
version = "2.0.0"
description = "Bitstrings and bitstring matching"
requires = "unix"
archive(byte) = "bitstring.cma"
archive(native) = "bitstring.cmxa"

package "persistent" (
  requires = "bitstring"
  version = "2.0.0"
  description = "Persistent patterns for bitstring (requires camlp4)"
  archive(byte) = "bitstring_persistent.cma"
  archive(native) = "bitstring_persistent.cmxa"
)

package "syntax" (
  version = "2.0.0"
  description = "Syntax extension: bitstring operators"
  archive(syntax,preprocessor) = "unix.cma bitstring.cma 
bitstring_persistent.cma pa_bitstring.cmo"
  archive(syntax,toploop) = "unix.cma bitstring.cma bitstring_persistent.cma 
pa_bitstring.cmo"
  preprocessor = "camlp4of"
)


__________________________

If I add -verbose on the command line here is what I get :

$ ocamlfind ocamlc -verbose -dtypes -g -syntax bitstring.syntax -package 
unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -package 
gettext-stub -c virt_mem_mmap.ml

Effective set of preprocessor predicates: preprocessor,syntax,bitstring.syntax
Effective set of compiler predicates: 
pkg_unix,pkg_bigarray,pkg_extlib,pkg_libvirt,pkg_xml-light,\
pkg_bitstring.syntax,pkg_str,pkg_fileutils,pkg_gettext.base,\
pkg_gettext.extension,pkg_gettext-stub,syntax,autolink,byte
+ ocamlc.opt -verbose -dtypes -g -c -I /usr/lib/ocaml/extlib \
 -ccopt -I/usr/lib/ocaml/extlib -I /usr/lib/ocaml/libvirt \
 -ccopt -I/usr/lib/ocaml/libvirt -I /usr/lib/ocaml/xml-light \
 -ccopt -I/usr/lib/ocaml/xml-light -I /usr/lib/ocaml/bitstring \
 -ccopt -I/usr/lib/ocaml/bitstring -I /usr/lib/ocaml/fileutils \
 -ccopt -I/usr/lib/ocaml/fileutils -I /usr/lib/ocaml/gettext \
 -ccopt -I/usr/lib/ocaml/gettext -I /usr/lib/ocaml/gettext-stub \
 -ccopt -I/usr/lib/ocaml/gettext-stub -pp camlp4of 
  '-I' '/usr/lib/ocaml/bitstring' \
  'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' \
  virt_mem_mmap.ml
+ camlp4of '-I' '/usr/lib/ocaml/bitstring' 'unix.cma' 'bitstring.cma' \
  'bitstring_persistent.cma' 'pa_bitstring.cmo'  'virt_mem_mmap.ml' 
> /home/blue_prawn/tmp/camlpp033036

File "virt_mem_mmap.ml", line 366, characters 6-7:
Parse error: ":" expected after [patt] (in [patt_field])
File "virt_mem_mmap.ml", line 1, characters 0-1:
Error: Preprocessor error
ocamlc.opt returned with exit code 2


-- 
Thanks

PS: In case there would be interested people, it's not strictly required to be 
a Mandriva user to package (or ponctually help packaging) for Mandriva, 
because there are machines available through ssh where one can do the job.
   So for instance for this current problem that I don't know how to fix 
because I don't know camlp4 yet, a helper someone could log through ssh, fix 
it and commit the fix.
If there's noone interested, just forget it :)