LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 15325 - CMake build does not contain the OCaml bindings
Summary: CMake build does not contain the OCaml bindings
Status: RESOLVED FIXED
Alias: None
Product: Build scripts
Classification: Unclassified
Component: cmake (show other bugs)
Version: trunk
Hardware: All All
: P enhancement
Assignee: whitequark
URL:
Keywords:
Depends on:
Blocks: 15732
  Show dependency tree
 
Reported: 2013-02-21 14:37 PST by José Romildo Malaquias
Modified: 2015-08-11 17:26 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description José Romildo Malaquias 2013-02-21 14:37:14 PST
When building llvm with CMake, there is no option to install the OCaml bindings.

Please, allow building and installing the OCaml bindings with CMake.
Comment 1 Bryce Glover 2015-01-12 16:22:38 PST
I can also confirm that this is true for CMake 3.1.0 running under OS X 10.10.1 Yosemite.  Should we contact the CMake mailing list about this?  The specific error I'm seeing is this:  

-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.

Does this just mean that users who want to set up and maybe use LLVM's OCaml bindings simply need to set some environment variables?  If so, then what should the values of 'OCAMLFIND,' 'OCAML_VERSION,' and 'OCAML_STDLIB_PATH' be?
Comment 2 whitequark 2015-01-12 16:30:42 PST
LLVM actually supports OCaml bindings in the CMake builds since r223071.

It requires ocamlfind, ctypes >= 0.3, and OUnit 2 for unit tests.
Comment 3 Bryce Glover 2015-01-13 14:31:04 PST
Ah, thank you for clarifying that!  I assume that I'll be able to find out how to install ocamlfind, ctypes, and OUnit 2 by performing a few simple Google searches, then?
Comment 4 whitequark 2015-01-13 14:45:08 PST
Yes. Consider using http://opam.ocaml.org/ to simplify the process.
Comment 5 Bryce Glover 2015-01-13 15:42:44 PST
(In reply to comment #4)
> Yes. Consider using http://opam.ocaml.org/ to simplify the process.

That's funny; I just installed OPAM since Google's first hit for 'ocamlfind' was its entry on the OPAM web site!
Comment 6 Bryce Glover 2015-01-13 15:51:56 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Yes. Consider using http://opam.ocaml.org/ to simplify the process.
> 
> That's funny; I just installed OPAM since Google's first hit for 'ocamlfind'
> was its entry on the OPAM web site!

No, wait, that's not what happened…ah, yes, now I remember!  I was looking at https://ocaml.org/docs/install.html#Homebrew, and it said that I should probably run 'brew install opam,' so I did.
Comment 7 Bryce Glover 2015-01-13 15:55:36 PST
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > Yes. Consider using http://opam.ocaml.org/ to simplify the process.
> > 
> > That's funny; I just installed OPAM since Google's first hit for 'ocamlfind'
> > was its entry on the OPAM web site!
> 
> No, wait, that's not what happened…ah, yes, now I remember!  I was looking
> at https://ocaml.org/docs/install.html#Homebrew, and it said that I should
> probably run 'brew install opam,' so I did.

Oh, duh!  Both of my posts are right when you combine certain aspects of them:  I did a Google search for 'install OCamlFind using Homebrew,' and this led me to https://ocaml.org/docs/install.html#Homebrew, which told me to install OPAM, which I will now use to install OCamlFind, ctypes, and OUnit.
Comment 8 Bryce Glover 2015-01-13 15:56:29 PST
Sorry for all the confused posts, by the way; i just wanted to let you know how things were going so that you could see that your advice has helped me.