Diagnosing Missing Features in Gentoo After USE Flag Changes
When a rebuilt Gentoo package lacks an expected feature, the cause is often a stale build or a per-package USE flag that never reached the compiler. This guide walks through ordered checks, previews, and targeted rebuilds.
29 Oct 2026, 18:39 UTC

You enabled a USE flag, rebuilt the package, and the feature is still absent. In Gentoo, that usually means the flag never reached the compiler, or the installed files predate the configuration change. The useful takeaway: emerge -pv shows what Portage would build, while equery uses shows what the installed package actually contains. If those two disagree, a rebuild is pending.
Recognizable condition
The symptom is a mismatch between configuration and behavior. For example, after adding ssl to /etc/portage/package.use for net-misc/curl, the tool still cannot open HTTPS URLs, or a library that should link against OpenSSL does not. The same pattern appears when a driver, Python binding, or Qt frontend is missing after a world update.
Quick cause map
| Symptom | Likely cause | Quick check |
|---|---|---|
| Package lacks expected feature (e.g., no HTTPS in curl) | USE flag not enabled at build time | emerge -pv net-misc/curl |
| Build fails after editing make.conf | Incompatible CFLAGS or removed dependency | Review the compile error and CFLAGS in /etc/portage/make.conf |
| New dependency not pulled in | --newuse not run after flag change | emerge -pv --update --deep --newuse @world |
| Flag set but installed binary unchanged | Package not rebuilt since configuration edit | equery uses net-misc/curl |
Ordered diagnostic checks
1. Inspect global defaults
Run as root:
cat /etc/portage/make.conf
Look for USE and CFLAGS. Global USE applies to every package unless overridden. Aggressive CFLAGS (for example, unstable optimization levels combined with -march=native) can also cause silent miscompilation or hard build failures on specific hardware.
2. Inspect per-package overrides
Gentoo reads either the single file /etc/portage/package.use or the directory /etc/portage/package.use/. A concrete entry looks like:
net-misc/curl ssl
Check for typos in the category/package name and for conflicting entries spread across multiple files.
3. Preview the pending build
Run as root (or a user with Portage permissions):
emerge -pv net-misc/curl
Expected check: the USE line in the output includes ssl. If it does not, the flag is not being applied to this package. Risk: none; this is read-only.
4. Verify active flags on installed files
Install app-portage/gentoolkit if needed, then run:
equery uses net-misc/curl
Expected check: ssl appears in the list of active flags. If emerge -pv shows the flag but equery uses does not, the installed version was built before the change.
5. Determine whether a rebuild is pending
Run as root:
emerge -pv --update --deep --newuse @world
If net-misc/curl appears in the calculated list, the system knows the flag changed and a rebuild is required. If it does not appear, the flag may be masked, forced by the profile, or already satisfied.
Fixes tied to findings
Finding: the flag is absent from configuration
Add it to /etc/portage/package.use (or a file in /etc/portage/package.use/):
net-misc/curl ssl
Then rebuild only that package:
emerge --update --deep --newuse net-misc/curl
Risk: this changes system state and may pull in new dependencies. There is no atomic rollback; reverting means removing the flag and rebuilding again.
Finding: the flag is set but the package was not rebuilt
Run the world update as root:
emerge --update --deep --newuse @world
This rebuilds every package whose active USE set changed. Risk: long compile times and broad system changes. Verify disk space and review the merge list before confirming.
Finding: a dependency blocks the flag
Enabling ssl on curl may require a compatible dev-libs/openssl build. If Portage reports a conflict, adjust the dependency's USE flags in /etc/portage/package.use rather than forcing the parent package. Example:
dev-libs/openssl bindist
Then re-run the preview to confirm the conflict resolves.
Finding: aggressive CFLAGS cause build failures
If the build fails with compiler errors after a make.conf edit, comment out experimental flags and restore a conservative baseline such as:
CFLAGS="-O2 -pipe"
Rebuild the failed package. Risk: performance may change; this is a correctness-first trade-off.
Escalation criteria
- Portage reports an unresolvable dependency cycle or a masked USE flag that the profile forces.
- The package builds successfully but the feature is still missing at runtime, suggesting an upstream bug.
- Compiler errors persist after reverting
CFLAGSto defaults. - You need to override a profile-forced flag; this often requires a custom profile or a justified
package.useentry, and is best discussed on Gentoo support channels or Bugzilla.
Limitations and verification
USE flags only affect future builds. Already-installed packages keep their compiled feature set until rebuilt. emerge -pv is a preview, not a report of the current installation. Some flags are controlled by the selected profile and cannot be changed without explicit overrides.
To verify the fix, re-run emerge -pv net-misc/curl and equery uses net-misc/curl after the rebuild. Both should list ssl. Then confirm the runtime behavior—for example, check that the tool's version or help output advertises the expected protocol or library support.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.