---
name: "port-resolve-lib-helper"
section: "1"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/port-resolve-lib-helper"
---

# port-resolve-lib-helper(1)

resolve library specs during ports build

## NAME

**port-resolve-lib-helper** – resolve library specs during ports build

## SYNOPSIS

**port-resolve-lib-helper** \[**-needed**\] \[**-silent**\] *spec* *...*

## DESCRIPTION

**port-resolve-lib-helper** resolve library specs against a list of installed libraries. **port-resolve-lib-helper** takes a list of file names with full path on stdin, and matches each library *spec* against those libraries, using [library-specs(7)](/library-specs/7.md) conventions.

In particular, X11BASE and LOCALBASE are used to locate X11 libraries and port libraries.

**port-resolve-lib-helper** will print the best libraries found in a format suitable for **@wantlib**( see [pkg\_create(1)](/pkg_create/1.md)).

Each *spec* not found will result in an error message and exit code.

If the option **-silent** is used, nothing will be displayed.

The option **-needed** is used to sort out LIB\_DEPENDS: **port-resolve-lib-helper** will succeed if at least one of the libraries matches against a shared library passed on the command line.

This is a helper script used by [bsd.port.mk(5)](/bsd.port.mk/5.md) to complete all wantlib information for [pkg\_create(1)](/pkg_create/1.md) and other tools.
