Comment 0 for bug 110954

Revision history for this message
Erkki Seppälä (flux-inside) wrote :

Compiling the following fragment of code succeeds with ocamlc, but
fails with ocamlopt:

(* (try to) compile with: ocamlfind ocamlopt -linkpkg -package
   camomile camomileBug.ml *)
let _ =
  let module E = Camomile.CharEncoding in
    E.recode_string E.utf8 E.utf8 ""

This produces the linker errors (list truncated for brevity):
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlBitsvect'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlBytesvect'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlAvlTree'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlISet'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlIMap'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlTbl31'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlByte_labeled_dag'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlXArray'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlOOChannel'
/usr/lib/ocaml/3.09.1/camomile/camomile.a(camomile.o): In function `camlCamomile__entry': undefined reference to `camlUChar'
...

Apparently something related to building native libraries has been
done, because some patches related to that are used during the build
process, and also camomile.cmxa is produced. No dllcamomile.so,
though.