CHECK-LIB-DEPENDS(1)

NAME
check-lib-depends - scan port for shared libraries

SYNOPSIS
check-lib-depends [-fimoqx] [-B destdir] [-d pkgrepo] [-D directory] [-F missing] [-O dest] [-S VAR=value] [-s source] [package ...]

DESCRIPTION
check-lib-depends scans a port or package for shared libraries, and verify that all of them are properly recorded.

check-lib-depends can either scan files from a built port after the fake stage from the WRKINST directory, or look directly inside a package.

Likewise, it can also verify dependencies off installed packages, or figure them out directly from the port directory.

check-lib-depends actually consists of two distinct stages:

•   scan all binaries inside a package to extract libraries and rpaths, using objdump(1) or ldd(1).

•   compare those libraries against the port's registered dependencies and report problems.

The options are as follows:

-B destdir
    Scan files under destdir.

-d pkgrepo
    Look for all needed packages under directory pkgrepo.

-D directory
    Create debug log files under directory that show in more details the run of objdump(1).

-f  Give full reports of every file that requires a missing library.

-F missing
    Works in tandem with -S. Allow backsubstituting even if the missing library is actually not part of the actual WANTLIB of the package. Mostly used to waive the presence of pthread, a mandatory dependency of C++ libraries on some architectures.

-i  Read packing-list from standard input.

-m  Always show progress-meter, even if not run from terminal.

-o  Scan binaries using ldd(1), which also works for old a.out binaries, instead of objdump(1), which only works for elf(5) binaries.

-O dest
    Save result of first stage in file dest.

-q  Be quiet, do not emit ‘Extra:’ wantlibs unless there's also an actual problem.

-S var=value
    recognize list of libraries listed in a variable, and replace said list with variable value. For instance, -S COMPILER_LIBCXX=stdc++ will replace ‘stdc++’ with ‘${COMPILER_LIBCXX}’ in WANTLIB lists for compatibility with both clang and gcc. Order matters. The first -S option will be handled first.

-s src
    Don't scan, directly read result of first stage from file src.

-x  Don't show progress-meter, even if run from terminal.

If no package is given, and the -i option is used, check-lib-depends will retrieve the packing-list from stdin, and scan the package according to other options.

SEE ALSO
ldd(1), objdump(1), bsd.port.mk(5), elf(5)

BUGS
Currently, check-lib-depends doesn't handle libraries living in subdirectories of ‘${LOCALBASE}’ correctly.