Status of Ocaml bindings

Hi all,

I'm interested in the LLVM Ocaml bindings so I pulled the current
sources from SVN and built them. When I ran the test suite I got the
following stats:

    # of expected passes 2631
    # of unexpected failures 7
    # of expected failures 11

It looks like some of the failures were due to the Ocaml parts of the
tests:

    FAIL: /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/analysis.ml
    Failed with unknown error (or has stderr output) at line 1
    while running: /usr/bin/ocamlc.opt -cc g++ -I /home/erikd/Hack/SVN/llvm/Debug/lib/ocaml
      -warn-error A llvm.cma llvm_analysis.cma /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/analysis.ml
      -o analysis.ml.tmp
    /tmp/camlprim265f17.c:911: warning: deprecated conversion from string constant to 'char*'

and

    FAIL: /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/bitreader.ml
    Failed with unknown error (or has stderr output) at line 1
    while running: /usr/bin/ocamlc.opt -cc g++ -I /home/erikd/Hack/SVN/llvm/Debug/lib/ocaml
      -warn-error A llvm.cma llvm_bitreader.cma llvm_bitwriter.cma
      /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/bitreader.ml -o bitreader.ml.tmp
    /tmp/camlprim69f718.c:917: warning: deprecated conversion from string constant to 'char*'

and so on.

What is the status of these bindings? Are they supposed to be working?

My system is Ubuntu Linux (Hardy Heron release) on x86. The compilers
I'm using are:

    gcc 4.2.3
    g++ 4.2.3
    ocaml 3.10.0

and were all installed from binary packages. I also tried gcc/g++
version 3.4.6, but that wouldn't even compile llvm.

Any clues?

Cheers,
Erik

Hi all,

I'm interested in the LLVM Ocaml bindings so I pulled the current
sources from SVN and built them. When I ran the test suite I got the
following stats:

   # of expected passes 2631
   # of unexpected failures 7
   # of expected failures 11

It looks like some of the failures were due to the Ocaml parts of the
tests:

   FAIL: /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/analysis.ml
   Failed with unknown error (or has stderr output) at line 1
   while running: /usr/bin/ocamlc.opt -cc g++ -I /home/erikd/Hack/SVN/llvm/Debug/lib/ocaml
     -warn-error A llvm.cma llvm_analysis.cma /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/analysis.ml
     -o analysis.ml.tmp
   /tmp/camlprim265f17.c:911: warning: deprecated conversion from string constant to 'char*'

and

   FAIL: /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/bitreader.ml
   Failed with unknown error (or has stderr output) at line 1
   while running: /usr/bin/ocamlc.opt -cc g++ -I /home/erikd/Hack/SVN/llvm/Debug/lib/ocaml
     -warn-error A llvm.cma llvm_bitreader.cma llvm_bitwriter.cma
     /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/bitreader.ml -o bitreader.ml.tmp
   /tmp/camlprim69f718.c:917: warning: deprecated conversion from string constant to 'char*'

and so on.

What is the status of these bindings? Are they supposed to be working?

They're working fine for me (I'm using ocamlopt rather than ocamlc though).
The ocaml part of the testsuite works fine for me too but I have an
older gcc (4.1.2), maybe that's why.

Any clues?

This error is in some temporary C file output by ocamlc. The only way
to fix that is probably to modify ocamlc.

I suggest using gcc rather than g++ for this: replace '-cc $(CXX)' by
'-cclib -lstdc++' in the site.exp target of test/Makefile

Olivier Andrieu wrote:

They're working fine for me (I'm using ocamlopt rather than ocamlc though).

Is there a way to tell it to use ocamlopt instead of the byte code
compiler?

I suggest using gcc rather than g++ for this: replace '-cc $(CXX)' by
'-cclib -lstdc++' in the site.exp target of test/Makefile

That fixed it for me. Thanks.

Cheers,
Erik