Questions tagged [ocamlfind]

Findlib is a library manager for Objective Caml. It provides a convention how to store libraries, and a file format ("META") to describe the properties of libraries. There is also a tool (ocamlfind) for interpreting the META files, so that it is very easy to use libraries in programs and scripts.

Findlib is a library manager for Objective Caml. It provides a convention how to store libraries, and a file format ("META") to describe the properties of libraries. There is also a tool (ocamlfind) for interpreting the META files, so that it is very easy to use libraries in programs and scripts.

The information in META includes version string, compiler options for using the library, and dependencies on other libraries. Writing META files is straight-forward, and comes close to filling out a template.

The ocamlfind tool makes it very easy to use libraries from O'Caml programs. Basically, ocamlfind is a compiler driver that interprets some additional command-line switches for selecting libraries. It is also possible to use ocamlfind as query tool to extract data from the library base.

After years of development, Findlib is now the de-facto standard for library management in O'Caml. A lot of free software for O'Caml now requires that Findlib is available on the system. Distributions like GODI and Debian ensure that all libraries come with META files.

77 questions
11
votes
1 answer

Use several modules in OCaml utop

I'm reading an OCaml project recently and I want to put the source files in the utop so I can do some experiments. Suppose I have two files amodule.ml, bmodule.ml. bmodule.ml will use functions defined in amodule.ml, for example, bmodule use…
KUN
  • 527
  • 4
  • 18
9
votes
2 answers

ocamlfind cannot see installed package

I wanted to compile my project using command: ocamlfind ocamlopt -package ocamlnet -package batteries -package unix -linkpkg oauth.ml but I'm getting following error: ocamlfind: Package `ocamlnet' not found make: *** [oauth.cmi] Error 2 After some…
Stephen Dedalus
  • 227
  • 1
  • 2
  • 9
7
votes
2 answers

ocamlfind: command not found

I'm running into an issue installing a package that's reliant on ocamlfind. I'm getting an ocamlfind: command not found error when running make. I have installed ocamlfind with the OCaml package manager and have tried reinstalling using opam…
Bard117
  • 233
  • 1
  • 3
  • 10
6
votes
1 answer

How can the ocamlfind/ocamlbuild toolchain be used with project-local copies of packages?

I am trying to keep my project self-contained, with all major 3rd party library dependencies built and referenced within the project repository. The main ocaml portions of my project rely on ocamlbuild. But for complex packages like Batteries…
jrk
  • 2,896
  • 1
  • 22
  • 35
6
votes
1 answer

Does Ocaml OPAM detect prior installed Ocaml packages?

I recently installed OPAM as per instructions to give it a try and it looks nice and I'd like to use it. However, it fails to detect previously installed OCAML packages that I installed manually before I choose to give OPAM a try. The first thing…
paul
  • 113
  • 4
5
votes
1 answer

Type of generated fold, iter and map not coherent with ppx_deriving documentation

I am struggling to properly set up my OCaml environment to use ppx derivers map, fold and iter, as devined here: https://github.com/ocaml-ppx/ppx_deriving#plugins-iter-map-and-fold My minimal example is here (I am using Base since this is a library…
5
votes
1 answer

OCaml: how to solve findlib warnings of multiple `cmi`s

Now I try to write a compiler using ocamlfind and some packages, especially ppx_sexp_conv with opam. Somehow dependencies of ppx_sexp_conv require compiler-libs so the compilation option -I ~/.opam/VERSION/lib/compiler-libs is added when compiling…
nomaddo
  • 416
  • 3
  • 12
5
votes
3 answers

Using merlin in vim for coq plugin development in ocaml

I installed Coq with opam and want to make a Coq plugin. I managed to compile some plugin examples using coq_makefile, but it would be great if I could use merlin in vim for type information and completion for Coq libraries. Is there a way in which…
Nico Lehmann
  • 177
  • 6
4
votes
1 answer

ocamlfind, where to find/how to build?

I know next to nothing about ocaml, but I want to install Coccinelle (on cygwin), which has a dependency to the binary ocamlfind. However, installing either ocaml-3.11.0-win-mgw.exe or ocaml-3.11.0-win-msvc.exe from…
hlovdal
  • 26,565
  • 10
  • 94
  • 165
4
votes
1 answer

ocamlfind: Package `lablgtk2.gnomecanvas' not found on ubuntu 17.04

I am trying to install Frama-C gui Phosphorus from repository (6aa64) on Ubuntu 17.04 (Zesty). Frama-C opam works fine but it lacks the GUI as far as I can tell + I might want to patch frama-C later on so I would like to be able to compile it…
mattator
  • 319
  • 3
  • 12
4
votes
3 answers

oasis picks up wrong ocamlbuild

I try to compile an Ocaml project with an Ocaml version provided by Opam. My ocamlbuild, ocamlfind, and oasis seem OK : /Users/fred/.opam/4.02.1/bin/ocamlbuild dhcp-182-73:compil fred$ which…
Godev
  • 316
  • 1
  • 4
  • 12
4
votes
3 answers

Compiling C lib and OCaml exe using it, all using ocamlfind

I'm trying to work out how to use ocamlfind to compile a C library and an OCaml executable using that C library. I put together a set of rather silly example files. % cat sillystubs.c #include #include #include…
Magnus
  • 4,644
  • 1
  • 33
  • 49
4
votes
3 answers

Using "ocamlfind" to make the OCaml compiler and toplevel find (project specific) libraries

I'm trying to use ocamlfind with both the OCaml compiler and toplevel. From what I understood, I need to place the required libraries in the _tags file at the root of my project, so that the ocamlfind tool will take care of loading them - allowing…
CharlieP
  • 993
  • 7
  • 19
4
votes
1 answer

Setting up an Ocaml library using 'ocamlfind install' and then using the library in ocamlbuild

I followed the instructions here for setting installing a library in site-lib using ocamlfind install. I had two libraries: one called logic and another called boolean. In each case I installed the .cmo, .cmx, .cmi and .mli files in the library,…
aneccodeal
  • 8,531
  • 7
  • 45
  • 74
3
votes
2 answers

I've got hardcoded paths in my Makefile - how to use ocamlfind to eliminate those? (or how to use ocamlbuild or omake instead)

I'm trying to build an ocaml project which requires a camlp4 extension (pa_deriving in this case). Here's my Makefile: include ./Makefile.config OCAMLC := ${OCAMLFIND} ocamlc OCAMLOPT := ${OCAMLFIND} ocamlopt OCAMLDEP := ${OCAMLFIND}…
aneccodeal
  • 8,531
  • 7
  • 45
  • 74
1
2 3 4 5 6