macOS
brew install gperflocal Homebrew formula metadata
sudo port install gperfMacPorts ports tree · devel/gperf/Portfile · source: api.github.com
brew
Perfect hash function generator. Version 3.3 via Homebrew; verified from local package data.
install
brew install gperflocal Homebrew formula metadata
sudo port install gperfMacPorts ports tree · devel/gperf/Portfile · source: api.github.com
sudo apk add gperfAlpine Linux edge package indexes · gperf · source: dl-cdn.alpinelinux.org
sudo apt install gperfDebian stable package indexes · gperf · source: deb.debian.org
sudo dnf install gperfFedora Rawhide package metadata · gperf · source: dl.fedoraproject.org
nix profile install nixpkgs#gperfnixpkgs package indexes · pkgs/by-name/gp/gperf/package.nix · source: api.github.com
sudo pacman -S gperfArch Linux sync databases · gperf · source: geo.mirror.pkgbuild.com
sudo zypper install gperfopenSUSE Tumbleweed package metadata · gperf · source: download.opensuse.org
choco install gperfChocolatey community package catalog · gperf · source: community.chocolatey.org
winget install --id oss-winget.gperf -eWindows Package Manager source index · oss-winget.gperf · source: cdn.winget.microsoft.com
overview
Perfect hash function generator
history
GNU gperf is the GNU perfect hash function generator: it reads a static set of keywords and emits C or C++ lookup code designed for collision-free recognition with one string comparison.
The GNU manual says the gperf utility was written in GNU C++ by Douglas C. Schmidt, with the general idea inspired by Keith Bostic's C algorithm distributed to net.sources around 1984. The manual frames the GNU program as a heavily modified, enhanced, and extended implementation created at the University of California, Irvine.
gperf belongs to the classic Unix compiler-tool family. Its input format resembles tools such as lex in using declarations and `%%` separators, while its output is ordinary C or C++ source that can be checked into or generated during builds.
GNU documents gperf as useful for static search sets such as compiler reserved words, assembler instruction opcodes, and shell built-ins. That made it attractive in source-based packaging ecosystems because generated lookup tables can be fast, deterministic, and dependency-light.
The GNU project page distributes gperf through the GNU FTP mirror network and points development to the Savannah project, placing it in the same distribution pattern as many older GNU build-time utilities. Homebrew, Debian, Ubuntu, Fedora, Arch, Nix, MacPorts, Chocolatey, and other package systems carry packages for it in the input metadata, reflecting its role as a small but widely available build dependency.
A user supplies a keyword file, optionally including struct declarations and gperf declarations, and gperf writes generated lookup code. The GNU page describes options for C or C++ output, switch statements or nested if statements instead of a hash table, and algorithm tuning.
Typical use is not interactive end-user work but build-time code generation. Projects use it when a fixed vocabulary needs fast membership tests without maintaining handwritten hash tables.
Package maintainers care about gperf because it often appears as a small build requirement that is easy to miss when bootstrapping language runtimes, compilers, and parser-heavy tools. It is old, tiny, and boring in the good way: a generated C file is easier to ship than a runtime dependency.
It also illustrates a packaging distinction between generated artifacts and generators. Some upstreams ship generated source, while others require gperf at build time, so package recipes need to know whether gperf is a native build tool or merely an optional maintainer tool.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
gperf | cli | global executable |
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.
https://www.gnu.org/software/gperf/
install metadata
| Package key | brew:gperf |
|---|---|
| Version | 3.3 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/gperf |
| Homepage | https://www.gnu.org/software/gperf/ |
| Repository | https://git.savannah.gnu.org/cgit/gperf.git |
| Upstream docs | https://www.gnu.org/software/gperf |
| License | GPL-3.0-or-later |
| Source archive | https://ftpmirror.gnu.org/gnu/gperf/gperf-3.3.tar.gz |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gperf |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
gperf 3.2.1-1
Perfect hash function generator
http://www.gnu.org/software/gperf/
sudo apt install gperfgperf
nix profile install nixpkgs#gperfgperf 3.1-1build1
Perfect hash function generator
http://www.gnu.org/software/gperf/
sudo apt install gperfgperf 3.3-r0
Perfect hash function generator.
https://www.gnu.org/software/gperf/
sudo apk add gperfgperf-doc 3.3-r0
Perfect hash function generator. (documentation)
https://www.gnu.org/software/gperf/
sudo apk add gperf-docgperf 3.2.1-3.fc44
A perfect hash function generator
http://www.gnu.org/software/gperf/
sudo dnf install gperfgperf 3.3-2
Perfect hash function generator
https://www.gnu.org/software/gperf/
sudo pacman -S gperfgperf 3.3-1.3
A Compiler Tool for Generating Perfect Hash Functions
https://gnu.org/software/gperf/
sudo zypper install gperfgperf
sudo port install gperfgperf
choco install gperfoss-winget.gperf
winget install --id oss-winget.gperf -esource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.