Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 414803 - sys-power/powertop-1.98 has missing virtual/pkgconfig DEPEND
Summary: sys-power/powertop-1.98 has missing virtual/pkgconfig DEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 358869 434588 (view as bug list)
Depends on:
Blocks: 432180
  Show dependency tree
 
Reported: 2012-05-05 23:10 UTC by Nikoli
Modified: 2012-09-12 05:35 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for ebuilds, works fine for me (powertop-2.ebuilds.patch,1.27 KB, text/plain)
2012-05-12 12:37 UTC, Nikoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2012-05-05 23:10:55 UTC
>>> Configuring source in /var/tmp/portage/sys-power/powertop-1.98/work/powertop-1.98 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-power/powertop-1.98/work/powertop-1.98 ...
make -j9 
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
Makefile:49: *** Cannot find development files for any supported version of libnl.  Stop.
 * ERROR: sys-power/powertop-1.98 failed (compile phase):


After installing dev-util/pkgconfig it builds fine.
Comment 1 Nikoli 2012-05-12 04:39:56 UTC
Same problem with powertop-2.0
Comment 2 Nikoli 2012-05-12 12:37:47 UTC
Created attachment 311503 [details]
patch for ebuilds, works fine for me

Patch for powertop-2.0.ebuild and powertop-9999.ebuild
CONFIG_CHECK is based on README and has several additions:
1) CONFIG_PERF_COUNTERS is obsolete and does nothing now, replaced with CONFIG_PERF_EVENTS
2) CONFIG_SND_AC97_POWER_SAVE is replaced with CONFIG_SND_HDA_POWER_SAVE for modern hardware
3) CONFIG_DEBUG_FS is required, if disabled powertop will exit with error "Failed to mount debugfs!\n"
4) CONFIG_X86_MSR is required for intel cpu, powertop will not work when this optio is disabled
Comment 3 Nikoli 2012-05-12 16:18:56 UTC
ACPI_PROCFS_POWER is not required, powertop2 works fine without any warning.
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-06 17:31:46 UTC
+  06 Sep 2012; Rick Farina <zerochaos@gentoo.org> powertop-2.1.ebuild:
+  address dep issues, missing pkgconfig and libnl:3 requires slot

The bug title has been fixed, do we really NEED all those config checks? does powertop fail to build/run without them?
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-10 20:09:46 UTC
*** Bug 358869 has been marked as a duplicate of this bug. ***
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-10 20:10:09 UTC
*** Bug 434588 has been marked as a duplicate of this bug. ***
Comment 7 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-10 20:20:08 UTC
I have added as follows:


pkg_setup() {
        CONFIG_CHECK="
                X86_MSR
                DEBUG_FS
                ~PERF_EVENTS
                ~TRACEPOINTS
                ~NO_HZ
                ~HIGH_RES_TIMERS
                ~HPET_TIMER
                ~ACPI_PROCFS_POWER
                ~CPU_FREQ_STAT
                ~CPU_FREQ_GOV_ONDEMAND
                ~SND_HDA_POWER_SAVE
                ~USB_SUSPEND
                ~TIMER_STATS
                ~EVENT_POWER_TRACING_DEPRECATED
                ~TRACING
        "
        linux-info_pkg_setup
}


This makes X86_MSR and DEBUG_FS required, and warns on the rest. If there are any CRITICAL failures that would make me reassess this choice, please open a new bug with specifics.


+  10 Sep 2012; Rick Farina <zerochaos@gentoo.org> +powertop-2.1-r1.ebuild:
+  properly check required kernel options, based on bug #414803


Thanks for your help all
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2012-09-11 05:20:29 UTC
Rick, half of these are unnecessary in that they are optional with sane fallbacks, a couple are hardware specific, and a couple have performance impacts.  I know they're only set to warn but the warning message is a bit scary.  I think we should go through the code and figure out which are actually necessary and print a message about the others as suggestions after installation.
Comment 9 Nikoli 2012-09-11 07:02:26 UTC
Rick, thank you for updating ebuild, but 'CONFIG_ACPI_PROCFS_POWER' option is obsolete and is not required, please remove it from ebuild:
https://github.com/fenrus75/powertop/commit/846b7e0a65a6958af44cb64c13de3c09cb4cd3f9

Also what about updating live ebuild?

Ryan, "a couple have performance impacts" which? If something makes my systems slower and is not really required, i want to disable it.
Comment 10 Nikoli 2012-09-11 07:07:12 UTC
And sys-libs/zlib is not DEPEND or RDEPEND. powertop does not link to it or use headers, there was README update about this change:
https://github.com/fenrus75/powertop/commit/ec62f9fb93c44c8606e483c15060bbc2aedd78ab
Comment 11 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-11 12:23:19 UTC
(In reply to comment #8)
> Rick, half of these are unnecessary in that they are optional with sane
> fallbacks, a couple are hardware specific, and a couple have performance
> impacts.  I know they're only set to warn but the warning message is a bit
> scary.  I think we should go through the code and figure out which are
> actually necessary and print a message about the others as suggestions after
> installation.

The ones required by the code (afaik) are currently fatal, the rest are simply warnings.  I realize the warning is a little scary, but it's just a warning.  I noted above the config checks that some of the settings may decrease performance.
Comment 12 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-11 12:23:43 UTC
(In reply to comment #10)
> And sys-libs/zlib is not DEPEND or RDEPEND. powertop does not link to it or
> use headers, there was README update about this change:
> https://github.com/fenrus75/powertop/commit/
> ec62f9fb93c44c8606e483c15060bbc2aedd78ab

Fixed thanks
Comment 13 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-11 12:27:00 UTC
(In reply to comment #9)
> Rick, thank you for updating ebuild, but 'CONFIG_ACPI_PROCFS_POWER' option
> is obsolete and is not required, please remove it from ebuild:
> https://github.com/fenrus75/powertop/commit/
> 846b7e0a65a6958af44cb64c13de3c09cb4cd3f9
fixed thanks
> 
> Also what about updating live ebuild?
I'll look at it when I have time (ie not today) but honestly (and this may be my hardened system talking) I find powertop 2.x nearly useless compared to powertop 1.x.  Even with the kernel patches it seems a lot of the stuff simply doesn't display.


Also, I can't seem to enable any of these options locally for testing:

 *   CONFIG_TRACEPOINTS:	 is not set when it should be.
 *   CONFIG_EVENT_POWER_TRACING_DEPRECATED:	 is not set when it should be.
 *   CONFIG_TRACING:	 is not set when it should be.

If anyone wants to tell me where to find this stuff in menuconfig I wouldn't mind :-)

Thanks
Comment 14 Nikoli 2012-09-11 12:43:05 UTC
I have several hardened desktops with these options enabled. They will not appear in your 'make nconfig' (why are you still using menuconfig?) because you they should be selected only automatically or because you did not enable some deps.

Try using 'pushd /usr/src/linux && grep TRACING -a9 $(find -name Kconfig)'
Read kernel/trace/Kconfig or just enable FTRACE.


$ cat kernel/trace/Kconfig|grep 'config EVENT_POWER_TRACING_DEPRECATED' -A14
config EVENT_POWER_TRACING_DEPRECATED
        depends on EVENT_TRACING
        bool "Deprecated power event trace API, to be removed"
        default y
        help
          Provides old power event types:
          C-state/idle accounting events:
          power:power_start
          power:power_end
          and old cpufreq accounting event:
          power:power_frequency
          This is for userspace compatibility
          and will vanish after 5 kernel iterations,
          namely 3.1.

I can show my kernel config if you need it.
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2012-09-12 05:35:37 UTC
> Also, I can't seem to enable any of these options locally for testing:
> 
>  *   CONFIG_TRACEPOINTS:	 is not set when it should be.
>  *   CONFIG_EVENT_POWER_TRACING_DEPRECATED:	 is not set when it should be.
>  *   CONFIG_TRACING:	 is not set when it should be.
> 
> If anyone wants to tell me where to find this stuff in menuconfig I wouldn't
> mind :-)

menuconfig has a built in search.  hit / and then type in the option without the leading "CONFIG_".