OCaml bindings broken in trunk

I've recently upgraded my project-local copy of LLVM from 3.1svn to the latest 3.2svn, and all hell broke loose in my attempts to build OCaml projects.

Trying to narrow it down, I tried testing examples/OCaml-Kaleidoscope and eventually test/Bindings, only to discover that literally nothing in the repository which uses the OCaml bindings seems to build in the current trunk:

- OCaml-Kaleidoscope/Chapter{2-6} fail early with apparent Makefile misconfigurations
- test/Bindings/OCaml/* fail to link for lack of `_LLVMConstInlineAsm`, which is also the first (of many) symbols I struggled to link correctly in my own project after upgrading and rebuilding.

Is this a known state of affairs?

This came up first on OS X 10.8.1, Homebrew OCaml 3.12.1, and a fresh bare checkout of trunk@163420. I reproduced it exactly on Ubuntu 12.04 (with stock OCaml 3.12.1 and trunk@163420).

Thanks.

The linking issue is a recent breakage.
I traced it back to r163175. Basically LLVMConstInlineAsm() got an additional parameter, but the C headers and the OCaml bindings were not updated accordingly.

About the miscompilations, can you provide further details?

Nuno

The linking issue is a recent breakage.
I traced it back to r163175. Basically LLVMConstInlineAsm() got an additional parameter, but the C headers and the OCaml bindings were not updated accordingly.

r163175 was my change. I'm not familiar with the OCaml project. If I'm responsible for updating said C headers/OCaml bindings, would someone mind pointing me in the right direction? If not, let me know if I can be of assistance.

Chad

Didn't Benjamin already fix this in svn 163502?

Didn't Benjamin already fix this in svn 163502?

Looks that way..

To confirm: yes, this was fixed promptly.

As for the OCaml-Kaleidoscope examples, I am not sufficiently familiar
with the OCamlMakefile setup used here, but it fails almost
immediately on building any of the chapters, e.g.:

/llvm/examples/OCaml-Kaleidoscope/Chapter2$ make
../../../bindings/ocaml/Makefile.ocaml:355: warning: overriding
commands for target
`llvm/Release+Asserts/examples/OCaml-Kaleidoscope-Ch2'
/llvm/Makefile.rules:1516: warning: ignoring old commands for target
`/llvm/Release+Asserts/examples/OCaml-Kaleidoscope-Ch2'
../../../bindings/ocaml/Makefile.ocaml:355: warning: overriding
commands for target
`/llvm/Release+Asserts/examples/OCaml-Kaleidoscope-Ch2'
/llvm/Makefile.rules:1516: warning: ignoring old commands for target
`/llvm/Release+Asserts/examples/OCaml-Kaleidoscope-Ch2'
llvm[0]: Compiling optimized ast.ml for Release+Asserts build
make: *** No rule to make target `token.cmx', needed by
`/llvm/examples/OCaml-Kaleidoscope/Chapter2/Release+Asserts/lexer.cmx'.
Stop.

Thanks, all.