2005-05-27 22:01:22

by Jesper Juhl

[permalink] [raw]
Subject: build failure; CONFIG_HZ* unset if power management is not selected (2.6.12-rc5-mm1)


I just did a "make randconfig" in 2.6.12-rc5-mm1 to see if it would turn
up some unexpected failures - and indeed it did. The randomly generated
config didn't set CONFIG_PM and that in turn resulted in none of
CONFIG_HZ, CONFIG_HZ_100, CONFIG_HZ_250 or CONFIG_HZ_1000 being set
either. This resultes in the following spectacular build failure :


juhl@dragon:~/download/kernel/linux-2.6.12-rc5-mm1$ make
CHK include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/i386/kernel/asm-offsets.s
In file included from include/linux/sched.h:12,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/jiffies.h:42:3: #error You lose.
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:213:31: division by zero in #if
include/linux/jiffies.h:257:30: division by zero in #if
In file included from include/linux/sched.h:12,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/jiffies.h: In function `jiffies_to_msecs':
include/linux/jiffies.h:262: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:262: error: (Each undeclared identifier is reported only once
include/linux/jiffies.h:262: error: for each function it appears in.)
include/linux/jiffies.h:268:36: division by zero in #if
include/linux/jiffies.h: In function `jiffies_to_usecs':
include/linux/jiffies.h:273: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:281:30: division by zero in #if
include/linux/jiffies.h: In function `msecs_to_jiffies':
include/linux/jiffies.h:286: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:294:36: division by zero in #if
include/linux/jiffies.h: In function `usecs_to_jiffies':
include/linux/jiffies.h:299: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h: In function `timespec_to_jiffies':
include/linux/jiffies.h:318: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:324: error: `SHIFT_HZ' undeclared (first use in this function)
include/linux/jiffies.h: In function `jiffies_to_timespec':
include/linux/jiffies.h:337: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h: In function `timeval_to_jiffies':
include/linux/jiffies.h:359: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:363: error: `SHIFT_HZ' undeclared (first use in this function)
include/linux/jiffies.h: In function `jiffies_to_timeval':
include/linux/jiffies.h:375: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h:385:6: division by zero in #if
include/linux/jiffies.h: In function `jiffies_to_clock_t':
include/linux/jiffies.h:386: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h: In function `clock_t_to_jiffies':
include/linux/jiffies.h:397: error: `CONFIG_HZ' undeclared (first use in this function)
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h:416:6: division by zero in #if
include/linux/jiffies.h: In function `jiffies_64_to_clock_t':
include/linux/jiffies.h:417: error: `CONFIG_HZ' undeclared (first use in this function)
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [arch/i386/kernel/asm-offsets.s] Error 2


2005-05-27 22:06:47

by Andrew Morton

[permalink] [raw]
Subject: Re: build failure; CONFIG_HZ* unset if power management is not selected (2.6.12-rc5-mm1)

Jesper Juhl <[email protected]> wrote:
>
> The randomly generated
> config didn't set CONFIG_PM

--- 25/arch/i386/Kconfig~i386-selectable-frequency-of-the-timer-interrupt-fix 2005-05-26 04:18:51.000000000 -0700
+++ 25-akpm/arch/i386/Kconfig 2005-05-26 04:18:51.000000000 -0700
@@ -960,6 +960,8 @@ config SECCOMP

If unsure, say Y. Only embedded should say N here.

+source kernel/Kconfig.hz
+
endmenu


@@ -1116,8 +1118,6 @@ config APM_REAL_MODE_POWER_OFF
a work-around for a number of buggy BIOSes. Switch this option on if
your computer crashes instead of powering off properly.

-source kernel/Kconfig.hz
-
endmenu

source "arch/i386/kernel/cpu/cpufreq/Kconfig"
_

2005-05-27 23:30:01

by Jesper Juhl

[permalink] [raw]
Subject: Re: build failure; CONFIG_HZ* unset if power management is not selected (2.6.12-rc5-mm1)

On Fri, 27 May 2005, Andrew Morton wrote:

> Jesper Juhl <[email protected]> wrote:
> >
> > The randomly generated
> > config didn't set CONFIG_PM
>
> --- 25/arch/i386/Kconfig~i386-selectable-frequency-of-the-timer-interrupt-fix 2005-05-26 04:18:51.000000000 -0700
> +++ 25-akpm/arch/i386/Kconfig 2005-05-26 04:18:51.000000000 -0700
> @@ -960,6 +960,8 @@ config SECCOMP
>
> If unsure, say Y. Only embedded should say N here.
>
> +source kernel/Kconfig.hz
> +
> endmenu
>
>
> @@ -1116,8 +1118,6 @@ config APM_REAL_MODE_POWER_OFF
> a work-around for a number of buggy BIOSes. Switch this option on if
> your computer crashes instead of powering off properly.
>
> -source kernel/Kconfig.hz
> -
> endmenu
>
> source "arch/i386/kernel/cpu/cpufreq/Kconfig"
> _
>
Doesn't seem to apply cleanly to 2.6.12-rc5-mm1 :

patching file arch/i386/Kconfig
Hunk #1 succeeded at 1134 with fuzz 2 (offset 174 lines).
Hunk #2 FAILED at 1292.
1 out of 2 hunks FAILED -- saving rejects to file arch/i386/Kconfig.rej

and trying to fix it up manually still ended me in the same build
failure...

I've attached the .config that shows the problem - just in case...


--
Jesper Juhl


Attachments:
.config (22.41 kB)
problem config