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
3
votes
1 answer

Building library with ocamlbuild, installing it with ocamlfind - what's the best practice?

I'm using ocamlbuild to compile an OCaml library via a mylib.mllib file that lists the modules comprising the library. Afterwards I want to install the library files using ocamlfind. Unlike binary files built with ocamlbuild, all the library files…
Christian Lindig
  • 1,216
  • 1
  • 9
  • 24
3
votes
1 answer

error while installing ocamlfind.1.3.3 configure: m4 not in PATH; this is required

configure: m4 not in PATH; this is required I wonder how I can fix this. Thanks a lot! (I tried to copy the m4 folder to that path but it is not working) ==== ERROR [while installing ocamlfind.1.3.3] ==== # opam-version 1.0.0 # os …
user2608042
3
votes
1 answer

Build native executable with profile information using Ocamlbuild

How to build with enabled profile information using Ocamlbuild? It seems -p doesn't work there. Now, I use ocamlopt for this. For example, $ ocamlfind ocamlopt -c -p -thread -package core test.ml $ ocamlfind ocamlopt -p -o test -thread -package core…
Stas
  • 11,571
  • 9
  • 40
  • 58
3
votes
1 answer

Passing options to camlp4 with ocamlbuild

I'm using ocamlbuild's native support for ocamlfind to simplify my project's build process. File foo.ml relies on conditional compilation using camlp4's macros. The _tags file contains the following: : package(camlp4.macro),…
Jon Smark
  • 2,528
  • 24
  • 31
2
votes
0 answers

Ocalmlfind cannot find Z3 package

I have installed z3 package from here https://github.com/Z3Prover/z3.git However ocamlfind is not able for find it. if i run which z3, it lists where the component is installed. However, Ocamlfind is not able to find it. Steps followed to install…
harin04
  • 271
  • 5
  • 16
2
votes
2 answers

Installing ocamlfind.1.8.0 on macOS Sierra

I'm follwing dev.realworldocaml.org to learn OCaml. I'm stuck at installing where I can't get access to the ocamlfind library. My default ocaml is 4.07.0 installed via homebrew: PrisBook:~ prisc_000$ brew list…
armand
  • 693
  • 9
  • 29
2
votes
1 answer

Compiling with external library (OASIS, OCamlfind)

I have a new project I'm trying to compile with OASIS. All my packages but one are installed with opam. My _oasis file looks like this : (* usual package fields *) Executable myexe Path: src BuildTools: ocamlbuild MainIs: myexe.ml …
Lhooq
  • 4,281
  • 1
  • 18
  • 37
2
votes
1 answer

Using ocamlmktop with ocamlbuild

I have a project that builds successfully using ocamlbuild. However, I would also like an easy way to interact with the project's individual functions from different modules via the toplevel but my attempts at using ocamlmktop haven't worked out as…
SaxSalute
  • 349
  • 2
  • 8
2
votes
2 answers

Decent ocamlfind documentation

I use ocaml with emacs tuareg mode, as a new user I don't really know much about all the ocaml tools... Recently I installed ocaml-wlc with opam, it's a binding for wayland library in ocaml. I have tried to import the library with open in my code…
2
votes
1 answer

Why ocamlfind cannot find installed library (camlp4)

I have a OCaml library installed. To prove that I have this: $ ~/.opam/bin/opam install camlp4 [NOTE] Package camlp4 is already installed (current version is 4.02+system). And this: $ ls `ocamlc -where`/camlp4* Camlp4.cmi Camlp4Bin.cmx …
neversaint
  • 60,904
  • 137
  • 310
  • 477
2
votes
1 answer

OCamlfind build fails

When I try to install ocamlfind using opam install ocamlfind, compilation fails and gives this message: #=== ERROR while installing ocamlfind.1.5.5 ===================================# # opam-version 1.2.0 # os darwin # command make…
Michael Dickens
  • 1,454
  • 4
  • 18
  • 26
2
votes
1 answer

Why are some standard ocaml libraries opam packages and some are not?

I see the base-unix package in the OCaml opam repository . It is described as the "Unix library distributed with the OCaml compiler". Some other libraries that are also distributed with the OCaml compiler do not have their own package. For instance,…
Abdallah
  • 335
  • 1
  • 7
2
votes
1 answer

(OCamlfind) build library with dependencies to Core

I'm trying to build a small library that has dependencies to Core and Core_extended. I followed the instructions under Where to place a shared utility module in OCaml? and installed the library in ocamlfind (declaring a dependency to Core_extended…
1
vote
1 answer

ocamlfind does not find a package installed with godi

I tried to compile a OMakefile with omake. I installed all needed packages with GODI. GODI shows me these packages as installed. Ocamlfind does not find all of these packages. With ocamlfind list it show only some. The packages it did not find are:…
Gens
  • 11
  • 2
1
vote
0 answers

Merlin is not picking up dependencies in a nix flake shell

I have a flake containing a dev shell pinning all the dependencies required to develop a given OCaml program, including an actual OCaml compiler, merlin, findlib and the OCaml libraries. For instance, if the project only depended on Graphics, it…
jthulhu
  • 7,223
  • 2
  • 16
  • 33