[LLVMdev] Status of Ocaml bindings

Olivier Andrieu oandrieu at gmail.com
Thu Jul 31 06:31:09 PDT 2008


On Thu, Jul 31, 2008 at 12:32, Erik de Castro Lopo <mle+cl at mega-nerd.com> wrote:
> 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



More information about the llvm-dev mailing list