User:Sam/Drafts/QA warnings

From Gentoo Wiki
Jump to:navigation Jump to:search

Trying to make a list of Gentoo's QA warnings, what they're for, how to fix them, and how to silence/suppress them when appropriate.


FLAGS not respected

Motivation: See devmanual.

CFLAGS, CXXFLAGS, ...

Motivation:

Fix: Fix the build system to respect the user's flags. For homebrew Makefiles, it may be sufficient to just pass arguments to emake: emake CFLAGS="${CFLAGS}" ...

Prerequisites:

  • Include -frecord-gcc-switches in all of CFLAGS, CXXFLAGS, FCFLAGS, FFLAGS

Examples:

Caveats:

  • Doesn't apply for e.g. Rust, Go. In such cases, set QA_FLAGS_IGNORED (regex of files to ignore).


LDFLAGS

Motivation:

Fix: Fix the build system to respect the user's flags. For homebrew Makefiles, it may be sufficient to just pass arguments to emake: emake LDFLAGS="${LDFLAGS}" ...

Prerequisites:

  • Include -Wl,--defsym=__gentoo_check_ldflags__=0" in LDFLAGS

Examples:

Caveats:

  • Doesn't apply for e.g. Rust, Go. In such cases, set QA_FLAGS_IGNORED (regex of files to ignore).


pkg-config

pkg-config files with mismatched Version

Motivation: Avoid packages accidentally having "null versions" like 0.0.0 or "-git" which break reverse dependencies. Often happens when building from snapshots instead of release tarballs.

Fix: May need to pass a parameter to econf or similar, or report the issue upstream.

Prerequisites: Use Portage 3.0.31 or newer.

Examples:

Caveats:

  • The warning will fire for installed libraries which may have different versioning from the main package. See bug #858233.
  • If the ebuild version is supposed to be different from the pkg-config Version following some pattern (e.g. extra digit), set QA_PKGCONFIG_VERSION in the ebuild to the version it should be compared with.