# Install ocamlbuild with Homebrew, apk, apt, pacman

Generic build tool for OCaml. Version 0.16.1 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:ocamlbuild
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ocamlbuild
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add ocaml-ocamlbuild
```

  Evidence: Alpine Linux edge package indexes: ocaml-ocamlbuild from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install ocamlbuild
```

  Evidence: Debian stable package indexes: ocamlbuild from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- pacman (92%):

```sh
sudo pacman -S ocamlbuild
```

  Evidence: Arch Linux sync databases: ocamlbuild from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:ocamlbuild
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ocamlbuild>
- **Version:** 0.16.1
- **Source summary:** Generic build tool for OCaml
- **Homepage:** <https://github.com/ocaml/ocamlbuild>
- **Repository:** <https://github.com/ocaml/ocamlbuild>
- **Upstream docs:** <https://github.com/ocaml/ocamlbuild#readme>
- **License:** LGPL-2.0-only WITH OCaml-LGPL-linking-exception
- **Source archive:** <https://github.com/ocaml/ocamlbuild/archive/refs/tags/0.16.1.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- ocamlbuild (cli)
- ocamlbuild.byte (cli)
- ocamlbuild.native (cli)
- ocamlbuild (alias)
- ocamlbuild.byte (alias)
- ocamlbuild.native (alias)

## Dependencies

- ocaml

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.16.1
- Local data: ok
- Upstream repository: https://github.com/ocaml/ocamlbuild
- Upstream latest detected: 0.16.1 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

ocamlbuild is the legacy OCaml build manager: a rule-based tool that automates compilation of OCaml libraries and programs with minimal project metadata. It predates Dune's dominance and remains packaged for older projects, tutorials, and build systems that still invoke ocamlbuild.

### Project history

ocamlbuild was included in the OCaml compiler distribution from OCaml 3.10.0 in May 2007 through OCaml 4.02.3 in July 2015, according to the project's Changes file. OCaml 4.03 split ocamlbuild out as an independent project hosted at github.com/ocaml/ocamlbuild, part of a broader effort to move tools out of the compiler distribution.

### Adoption history

For years, ocamlbuild was the standard bundled answer for medium-sized OCaml projects that needed more automation than raw Makefiles. The upstream README documents the later ecosystem shift: between January and June 2019, 77 newly released public OCaml packages used ocamlbuild while 544 used Dune.

### How it is used

Developers use ocamlbuild by asking it to build targets such as native executables, bytecode executables, or libraries; it infers dependencies and applies built-in OCaml compilation rules. More complex projects customize behavior with small text files and OCaml plugin code.

### Why package nerds care

ocamlbuild is significant because it shows the OCaml toolchain's unbundling path. A tool that used to ship with the compiler became an opam and distro package, so package managers had to make explicit what older compiler installations provided implicitly.

### Timeline

- 2007-05: OCaml 3.10.0 began shipping ocamlbuild in the compiler distribution.
- 2015-07: OCaml 4.02.3 was the last compiler release in the bundled ocamlbuild period documented by the ocamlbuild Changes file.
- 2016: OCaml 4.03 split ocamlbuild into an independent project.
- 2019-01 to 2019-06: The ocamlbuild README recorded 77 new public packages using ocamlbuild versus 544 using Dune.
- 2025-02-13: The GitHub releases page lists OCamlbuild 0.16.1.

### Related projects

- Dune is the successor build system recommended by the ocamlbuild README for new projects. ocamlfind/findlib integrates with ocamlbuild-era projects by supplying package flags, while opam installs ocamlbuild as a separate package for compiler switches that need it.

### Sources

- <https://formulae.brew.sh/formula/ocamlbuild>
- <https://github.com/ocaml/ocamlbuild>
- <https://github.com/ocaml/ocamlbuild/blob/master/Changes>
- <https://ocaml.org/manual/4.02/ocamlbuild.html>
- <https://ocaml.org/manual/4.03/manual032.html>
- <https://ocaml.org/releases/4.03.0>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ocamlbuild
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - ocamlbuild - 0.16.1-1+b1: normalized package name match | Debian stable package indexes: ocamlbuild from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Build tool for building OCaml libraries and programs | https://github.com/ocaml/ocamlbuild/
- Ubuntu apt - ocamlbuild - 0.14.3-1: normalized package name match | Ubuntu 24.04 LTS package indexes: ocamlbuild from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Build tool for building OCaml libraries and programs | https://github.com/ocaml/ocamlbuild/
- apk - ocaml-ocamlbuild - 0.14.1-r5: normalized package name match | Alpine Linux edge package indexes: ocaml-ocamlbuild from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic build tool with built-in rules for building OCaml library and programs (library & development files) | https://github.com/ocaml/ocamlbuild
- apk - ocamlbuild - 0.14.1-r5: normalized package name match | Alpine Linux edge package indexes: ocamlbuild from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic build tool with built-in rules for building OCaml library and programs | https://github.com/ocaml/ocamlbuild
- apk - ocamlbuild-doc - 0.14.1-r5: normalized package name match | Alpine Linux edge package indexes: ocamlbuild-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic build tool with built-in rules for building OCaml library and programs (documentation) | https://github.com/ocaml/ocamlbuild
- pacman - ocamlbuild - 0.16.1-5: normalized package name match | Arch Linux sync databases: ocamlbuild from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Build tool that has built-in rules for building OCaml libraries and programs | https://github.com/ocaml/ocamlbuild


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [ocaml](https://www.automicvault.com/pkg/brew/ocaml/) - Runtime dependency declared by Homebrew.
- [ant](https://www.automicvault.com/pkg/brew/ant/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [bmake](https://www.automicvault.com/pkg/brew/bmake/) - Shares av.db curated category or tags: build-system, build-tools, cli, developer-tools.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Shares av.db curated category or tags: build-system, build-tools, cli, developer-tools.
- [dub](https://www.automicvault.com/pkg/brew/dub/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [fobis](https://www.automicvault.com/pkg/brew/fobis/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [fpm](https://www.automicvault.com/pkg/brew/fpm/) - Shares av.db curated category or tags: build-system, build-tools, cli, developer-tools.
- [fypp](https://www.automicvault.com/pkg/brew/fypp/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [grunt-cli](https://www.automicvault.com/pkg/brew/grunt-cli/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [melange](https://www.automicvault.com/pkg/brew/melange/) - Local metadata places this package in an adjacent workflow. Shared terms: build, build-system, build-tools, cli, developer.
- [father](https://www.automicvault.com/pkg/npm/father/) - Local metadata places this package in an adjacent workflow. Shared terms: build, build-tool, build-tools, cli, developer.
- [unbuild](https://www.automicvault.com/pkg/npm/unbuild/) - Local metadata places this package in an adjacent workflow. Shared terms: build, build-system, build-tools, cli, developer.

## Combined YAML source

View the package source record on GitHub. [combined/ocamlbuild.yml](https://github.com/automic-vault/db/blob/main/combined/ocamlbuild.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
