The ebuild should verify that the kernel option CONFIG_OPROFILE is enabled ("m" or "y"). Note it is available only when CONFIG_PROFILING=y. The ebuild checks the version of my kernel, but not this. Granted, there is a runtime check that tipped me off, but a warning at build time could have saved me the hassle. Reproducible: Always Steps to Reproduce: 1. build oprofile on system where `grep 'CONFIG_OPROFILE=n' /usr/src/linux/.config` 2. build succeeds. 3. opcontrol --init says it can't load module oprofile. get confused. Actual Results: build succeeds. opcontrol --init says it can't load module oprofile. get confused. Expected Results: ebuild checks my kernel, warns me that I need to build this module for the package to work. Does not prevent me from building package. I'm using sys-kernel/gentoo-sources-2.6.26-r1 on latest ~x86, not that it matters.
Fixed in CVS :) Thanks for the useful suggestion.