# Install camlp5 with Homebrew, apt, MacPorts, pacman

Preprocessor and pretty-printer for OCaml. Version 8.05.02 via Homebrew; verified 2026-07-01.

## Install

```sh
sudo av install brew:camlp5
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install camlp5
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install camlp5
```

  Evidence: MacPorts ports tree: lang/camlp5/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install camlp5
```

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

- pacman (92%):

```sh
sudo pacman -S camlp5
```

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

## Package facts

- **Package key:** brew:camlp5
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/camlp5>
- **Version:** 8.05.02
- **Source summary:** Preprocessor and pretty-printer for OCaml
- **Homepage:** <https://camlp5.github.io/>
- **Repository:** <https://github.com/camlp5/camlp5>
- **Upstream docs:** <https://camlp5.github.io/doc/html>
- **License:** BSD-3-Clause
- **Source archive:** <https://github.com/camlp5/camlp5/archive/refs/tags/8.05.02.tar.gz>
- **Last updated:** 2026-07-01T00:08:52Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- camlp5 (cli)
- camlp5o (cli)
- camlp5o.opt (cli)
- camlp5r (cli)
- camlp5r.opt (cli)
- camlp5sch (cli)
- mkcamlp5 (cli)
- mkcamlp5.opt (cli)
- ocpp5 (cli)
- camlp5 (alias)
- camlp5o (alias)
- camlp5o.opt (alias)
- camlp5r (alias)
- camlp5r.opt (alias)
- camlp5sch (alias)
- mkcamlp5 (alias)
- mkcamlp5.opt (alias)
- ocpp5 (alias)

## Dependencies

- camlp-streams
- ocaml
- pcre2

## Build dependencies

- ocaml-findlib
- opam
- pkgconf

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 8.05.02
- Package-manager updated: 2026-07-01
- Local data: ok
- Upstream repository: https://github.com/camlp5/camlp5
- Upstream latest detected: 8.05.02 (current)
## Project history and usage

Camlp5 is an OCaml preprocessor and pretty-printer used to extend or redefine OCaml syntax, convert between syntaxes, and build parsing or pretty-printing extensions.

### Project history

The official Camlp5 about page traces its ideas to Michel Mauny in the 1990s. Daniel de Rauglaudre implemented the first version in 1996 under the name Camlp4, where the four Ps meant Pre-Processor-Pretty-Printer.

In 2002, Camlp4 maintenance moved to Michel Mauny and was later extended by Nicolas Pouillard with different design ideas and some incompatibilities. In 2006, de Rauglaudre restarted the original line of work and renamed it Camlp5.

The current GitHub README says Camlp5 was originally written by Daniel de Rauglaudre, with maintenance and upgrades by Chet Murthy. It also notes a newer 8.x line that differs substantially from the 7.x releases and is tested against modern OCaml versions.

### Adoption history

Camlp5 has long lived in the OCaml toolchain's syntax-extension culture. Its official docs describe use as a shell command, as an OCaml compiler preprocessor through -pp, and inside the OCaml toplevel.

The package metadata in this batch shows Camlp5 in Homebrew, Debian, Ubuntu, MacPorts, and Arch, reflecting its role as a durable compatibility package for OCaml projects that still rely on Camlp5 syntax extensions or revised syntax.

### How it is used

Common shell commands include camlp5o for ordinary OCaml syntax and camlp5r for revised syntax. The docs show invoking them through ocamlc -pp and loading camlp5o.cma or camlp5r.cma in the OCaml toplevel.

Developers use Camlp5 to write parsing and printing kits, extensible grammars, quotations, macros, syntax extensions, and pretty-printers. It is also used to convert OCaml programs from one syntax to another and to inspect syntax-extension output.

### Why package nerds care

Camlp5 matters to package nerds because it is both a real tool and an archaeological layer in OCaml packaging. It preserves a branch of the Camlp4 preprocessor tradition that many older OCaml packages and syntax experiments depended on.

It is also a reminder that language ecosystems carry syntax tooling as compatibility debt. Keeping Camlp5 packaged means old source distributions, revised-syntax code, and pre-ppx extension workflows can still be built on modern Unix systems.

### Timeline

- 1990s: Michel Mauny expresses ideas that later feed into Camlp5.
- 1996: Daniel de Rauglaudre implements the first version as Camlp4.
- 2002: Camlp4 maintenance moves and later evolves with incompatible design changes.
- 2006: Daniel de Rauglaudre restarts the original line as Camlp5.
- 2016: camlp5/camlp5 GitHub repository is created.
- 2021: Camlp5 8.00 release appears in the GitHub releases feed.
- 2026: Current repository activity shows ongoing maintenance for modern OCaml compatibility.

### Related projects

- Camlp4 is the predecessor and divergence point described by the official Camlp5 history.
- OCaml is the language and compiler toolchain Camlp5 preprocesses.
- The OCaml ppx ecosystem is the modern comparison point for many syntax-extension workflows, although Camlp5 remains its own preprocessor line.
- JoCaml is mentioned in the GitHub README as historically supported by older Camlp5 versions.

### Sources

- <https://api.github.com/repos/camlp5/camlp5/releases>
- <https://camlp5.github.io/doc/html>
- <https://camlp5.github.io/doc/html/about.html>
- <https://github.com/camlp5/camlp5>
- <https://github.com/camlp5/camlp5/blob/master/README.md>
- input.json source_facts.package-manager


## Security Notes

No matching local secret-handling manifest was found for camlp5. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** camlp5
- **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 - camlp5 - 8.03.01-1+b7: normalized package name match | Debian stable package indexes: camlp5 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Pre Processor Pretty Printer for OCaml - classical version | https://camlp5.github.io/
- Ubuntu apt - camlp5 - 8.02.01-2build6: normalized package name match | Ubuntu 24.04 LTS package indexes: camlp5 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Pre Processor Pretty Printer for OCaml - classical version | https://camlp5.github.io/
- pacman - camlp5 - 8.05.01-1: normalized package name match | Arch Linux sync databases: camlp5 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A preprocessor-pretty-printer of OCaml. | https://camlp5.github.io/
- MacPorts - camlp5: normalized package name match | MacPorts ports tree: lang/camlp5/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [ocaml](https://www.automicvault.com/pkg/brew/ocaml/) - Runtime dependency declared by Homebrew.
- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [ocaml-findlib](https://www.automicvault.com/pkg/brew/ocaml-findlib/) - Build dependency declared by Homebrew.
- [opam](https://www.automicvault.com/pkg/brew/opam/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ledit](https://www.automicvault.com/pkg/brew/ledit/) - Popular package that depends on this formula.
- [odinfmt](https://www.automicvault.com/pkg/brew/odinfmt/) - Shares av.db curated category or tags: cli, developer-tools, language-tooling.
- [btparse](https://www.automicvault.com/pkg/brew/btparse/) - Shares av.db curated category or tags: cli, developer-tools, parser.
- [cmark](https://www.automicvault.com/pkg/brew/cmark/) - Shares av.db curated category or tags: cli, developer-tools, parser.
- [cmark-gfm](https://www.automicvault.com/pkg/brew/cmark-gfm/) - Shares av.db curated category or tags: cli, developer-tools, parser.
- [comby](https://www.automicvault.com/pkg/brew/comby/) - Shares av.db curated category or tags: cli, developer-tools, parser.
- [comrak](https://www.automicvault.com/pkg/brew/comrak/) - Shares av.db curated category or tags: cli, developer-tools, parser.
- [cpp-peglib](https://www.automicvault.com/pkg/brew/cpp-peglib/) - Shares av.db curated category or tags: cli, developer-tools, parser.
- [cppp](https://www.automicvault.com/pkg/brew/cppp/) - Shares av.db curated category or tags: cli, developer-tools, preprocessor.
- [crystalline](https://www.automicvault.com/pkg/brew/crystalline/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, language, pcre2.

## Combined YAML source

View the package source record on GitHub. [combined/camlp5.yml](https://github.com/automic-vault/db/blob/main/combined/camlp5.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
