Automic VaultAutomic Vault

brew

Install libcmph with Homebrew, apk, apt, MacPorts, Nix

C minimal perfect hashing library. Version 2.0.2 via Homebrew; verified 2026-06-19.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install libcmph

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install cmph

MacPorts ports tree · textproc/cmph/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add libcmph

Alpine Linux edge package indexes · libcmph · source: dl-cdn.alpinelinux.org

Debian aptverified · 92%
sudo apt install libcmph-dev

Debian stable package indexes · libcmph-dev · source: deb.debian.org

Nixverified · 92%
nix profile install nixpkgs#cmph

nixpkgs package indexes · pkgs/by-name/cm/cmph/package.nix · source: api.github.com

overview

Package summary

C minimal perfect hashing library

Commands and aliases

  • cmph

history

Project history and usage

CMPH is a C library and command-line tool for building minimal perfect hash functions. It targets static key sets where compact storage and collision-free lookup matter more than insertion or deletion.

Project history

The CMPH site frames the project around a gap in free software support for minimal perfect hashing, distinguishing it from GNU gperf by emphasizing very large key sets rather than small generated perfect-hash functions. Its documentation collects several algorithms, including CHD, BDZ, BMZ, BRZ, CHM, and FCH.

By the 1.x and 2.x news entries, CMPH had grown beyond a single algorithm implementation into a practical library with packed-function support, memory-mappable output, an external-memory BRZ path for very large sets, and an experimental C++ interface for map-like use cases.

Adoption history

CMPH has remained a niche but durable package because minimal perfect hashes are a specialized data-structure tool. It appears in Homebrew, Debian and Ubuntu development packages, MacPorts, Nix, Alpine, and other package collections for developers who need static dictionary or key-index construction.

How it is used

Typical usage is offline construction of a hash function from a fixed key set, followed by storage or embedding of the generated function. The official examples show the C API creating a minimal perfect hash from an in-memory vector and dumping it to a file.

Why package nerds care

CMPH is the kind of package that matters disproportionately to systems and search developers: it packages academic minimal-perfect-hashing algorithms into a reusable C interface and a small CLI. Its appeal is that it turns a static corpus into dense one-probe lookup tables without hauling in a database.

Timeline

  • 0.9: CHD and CHD_PH support highlighted for compact internal-memory minimal perfect hashes.
  • 1.0: Bugfix-only release before a planned revamp of code and algorithms.
  • 1.1: CHD_PC bug fix and test reorganization.
  • 2.0: Warning cleanup and experimental C++ mph_map and mph_index interface.

Related projects

  • Related projects and concepts include GNU gperf, static hash tables, CHD, BDZ, BMZ, BRZ, CHM, and FCH minimal-perfect-hashing algorithms.

security posture

Risk level: green

library-like package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • library-like package without higher-risk signals

Signals

  • metadata:library-like

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 13 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
cmphcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version2.0.2
manager updated2026-06-19
local dataok
upstreamnot checked
latest detectednot detected

https://cmph.sourceforge.net/

install metadata

Package metadata

Package keybrew:libcmph
Version2.0.2
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/libcmph
Homepagehttps://cmph.sourceforge.net/
Repositoryhttps://sourceforge.net/p/cmph/git
Upstream docshttps://cmph.sourceforge.net/
LicenseLGPL-2.1-only OR MPL-1.1
Source archivehttps://downloads.sourceforge.net/project/cmph/v2.0.2/cmph-2.0.2.tar.gz
Last updated2026-06-19T12:31:49-07:00
Pulseupdated
Bottleavailable (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namelibcmph
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

apk95%

libcmph 2.0.2-r6

A minimal perfect hash C library

https://cmph.sourceforge.net/

sudo apk add libcmph
  • License: LGPL-2.0-or-later AND MPL-1.1
  • Architecture: x86_64
  • Source Package: cmph
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Libcmph
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: libcmph from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
MacPorts94%

cmph

sudo port install cmph
  • installed executable or alias match
  • Matched by: Cmph
MacPorts ports tree · api.github.com · MacPorts ports tree: textproc/cmph/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Debian apt92%

libcmph-dev 2.0.2-3.1

C Minimal Perfect Hashing Library development files

http://cmph.sourceforge.net

sudo apt install libcmph-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: cmph
  • 1 dependencies
  • installed executable or alias match
  • Matched by: Cmph
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libcmph-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

libcmph-tools 2.0.2-3.1

C Minimal Perfect Hashing Library command line utilities

http://cmph.sourceforge.net

sudo apt install libcmph-tools
  • Section: utils
  • Architecture: amd64
  • Source Package: cmph
  • 2 dependencies
  • installed executable or alias match
  • Matched by: Cmph
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libcmph-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

libcmph0t64 2.0.2-3.1

C Minimal Perfect Hashing Library

http://cmph.sourceforge.net

sudo apt install libcmph0t64
  • Section: libs
  • Architecture: amd64
  • Source Package: cmph
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: Cmph
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libcmph0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix92%

cmph

nix profile install nixpkgs#cmph
  • installed executable or alias match
  • Matched by: Cmph
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/cm/cmph/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt92%

libcmph-dev 2.0.2-3.1build1

C Minimal Perfect Hashing Library development files

http://cmph.sourceforge.net

sudo apt install libcmph-dev
  • Section: universe/interpreters
  • Architecture: amd64
  • Source Package: cmph
  • 1 dependencies
  • installed executable or alias match
  • Matched by: Cmph
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libcmph-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt92%

libcmph-tools 2.0.2-3.1build1

C Minimal Perfect Hashing Library command line utilities

http://cmph.sourceforge.net

sudo apt install libcmph-tools
  • Section: universe/utils
  • Architecture: amd64
  • Source Package: cmph
  • 2 dependencies
  • installed executable or alias match
  • Matched by: Cmph
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libcmph-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt92%

libcmph0t64 2.0.2-3.1build1

C Minimal Perfect Hashing Library

http://cmph.sourceforge.net

sudo apt install libcmph0t64
  • Section: universe/libs
  • Architecture: amd64
  • Source Package: cmph
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: Cmph
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libcmph0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk92%

cmph 2.0.2-r6

A minimal hash C library - utility application

https://cmph.sourceforge.net/

sudo apk add cmph
  • License: LGPL-2.0-or-later AND MPL-1.1
  • Architecture: x86_64
  • Source Package: cmph
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: Cmph
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cmph from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk92%

cmph-dev 2.0.2-r6

A minimal hash C library - utility application (development files)

https://cmph.sourceforge.net/

sudo apk add cmph-dev
  • License: LGPL-2.0-or-later AND MPL-1.1
  • Architecture: x86_64
  • Source Package: cmph
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: Cmph
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cmph-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk92%

cmph-doc 2.0.2-r6

A minimal hash C library - utility application (documentation)

https://cmph.sourceforge.net/

sudo apk add cmph-doc
  • License: LGPL-2.0-or-later AND MPL-1.1
  • Architecture: x86_64
  • Source Package: cmph
  • installed executable or alias match
  • Matched by: Cmph
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cmph-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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