1

Hevea is a LaTeX to HTML converter, available from http://pauillac.inria.fr/~maranget/hevea/index.html

I am trying (and failing) to compile hevea on a CentOS machine for which the yum repositories do not seem to have a package. I have installed the packaged Objective Caml compiler as follows:

$ uname -a
Linux ppserver 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05
UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ sudo yum install ocaml
...
$ /usr/bin/ocamlc.opt -v
The Objective Caml compiler, version 3.11.2
Standard library directory: /usr/lib64/ocaml

Attempting to compile hevea gives:

$ wget http://pauillac.inria.fr/~maranget/hevea/distri/hevea-2.19.tar.gz
$ tar -zxvf hevea-2.19.tar.gz
$ cd hevea-2.19
[hevea-2.19]$ make
sh ocb.sh opt
/usr/bin/ocamldep.opt -modules hevea.ml > hevea.ml.depends
/usr/bin/ocamldep.opt -modules auxx.mli > auxx.mli.depends
...
/usr/bin/ocamlc.opt -c -w +a-4-9-41-45 -annot -o videoc.cmi videoc.mli
/usr/bin/ocamlc.opt -c -w +a-4-9-41-45 -annot -o zyva.cmi zyva.mli
+ /usr/bin/ocamlc.opt -c -w +a-4-9-41-45 -annot -o infoRef.cmo infoRef.ml
File "infoRef.mll", line 127, characters 2-12:
Error: Unbound value String.map
Command exited with code 2.
make: *** [ocb-opt] Error 10

This is the code triggering the error,

let verifie name =
  String.map
    (fun c -> match c  with
    | '\t'
    | ','
    | '\n' -> ' '
    | '.' -> '-'
    |  _ -> c)
    name
;;

My guess is something has changed in the Objective Caml compiler and the hevea code needs some slight update? I have emailed Luc Maranget and will post any reply here [see below].

3
  • Welcome to TeX SE! I think this is probably off-topic for this site, and almost certainly not the best place to ask it. Mostly questions here are about using the software rather than compiling it - I suspect you'd get better help on one of the sites dedicated to Unix/Linux or whatever. I'm not going to vote to close right now, though, because I'm far from sure about the site policy on this.
    – cfr
    Dec 17 '14 at 18:46
  • The current version of OCaml is 4.02.1. Is there a particular reason why you are using 3.11.2? Dec 17 '14 at 19:14
  • It was the OCaml compiler available via the yum repositories on this machine, and thus the easiest one to install. This turned out to be too old (much older than I had guessed)
    – peterjc
    Dec 18 '14 at 9:35
1

From an email reply from Luc Maranget,

You simply need an ocaml compiler more recent than 3.11.2, ideally the current version ... String.map was introduced un OCaml 4.00.0

In any case I sugest that you upgrade your installation of OCaml to the current version. The ocaml provided by your linux distribution is obsolete, as OCaml 3.11.2 was released in January 2010. A convenient mean to install OCaml is by the means of opam http://opam.ocamlpro.com/

Hopefully this Q&A will help someone else in future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.