English version
Accueil propos Tlchargement Ressources Contactez-nous

Ce site est rarement mis jour. Pour les informations les plus rcentes, rendez-vous sur le nouveau site OCaml l'adresse ocaml.org.

Browse thread
Issue to compile a program with camlp4 in OCaml 3.10.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-22 (20:41)
From: David MENTRE <dmentre@l...>
Subject: Issue to compile a program with camlp4 in OCaml 3.10.0

I'm trying to compile an OCaml program I haven't written. I'm compiling
it on an Ubuntu 8.04, OCaml 3.10.0.

The compilation fails with following error:
ocamlopt -pp "camlp4o pa_op.cmo" -I src                      -c src/common.ml
File "src/common.ml", line 5, characters 101-102:
Parse error: "in" expected after [binding] (in [expr])
Preprocessor error

Here is the beginning of the relevant file:
(** Common utility functions. *)

(* space *)

let heap_size () : float = float_of_int (Gc.stat ()).Gc.heap_words *. float_of_int (Sys.word_size / 8)  (* in bytes *)


This expression seems correct to me. Is this issue related to one of the
fixes on camlp4 that where made in 3.10.1?

Any idea how to work around this issue (without recompiling latest ocaml
and all the needed libraries)?

Sincerly yours,
GPG/PGP key: A3AD7A2A David MENTRE <dmentre@linux-france.org>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A