Bug 91597 - kernel-source does not compile when using module versioning
Summary: kernel-source does not compile when using module versioning
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-05-25 13:09 UTC by Carlo Wood
Modified: 2007-04-18 16:54 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-05 15:36:32 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Carlo Wood 2003-05-25 13:09:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
When using


make modules

fails, because rhconfig.h is not #included.
As a result, the macro _ver_str is not defined
and all symbols (using loops_per_jiffy as example)
get the form


in the preprocessed source,
instead of the intended


I was able to fix this by adding
#include <linux/rhconfig.h>
at the top of include/linux/modversions.h

#include <linux/rhconfig.h>            /* This was missing */
#include <linux/modsetver.h>
#include <linux/modules/53c700.ver>


Carlo Wood

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.See description

Additional info:

Comment 1 Arjan van de Ven 2003-05-25 13:28:11 UTC
I assume your steps are
1) make mrproper
2) copy configs/>whatever> .config
3) make oldconfig / make menuconfig / make xconfig
4) make bzImage
5) make modules 

Comment 2 Carlo Wood 2003-05-25 22:22:01 UTC
No, I did a 'make dep' and not the 'make mrproper'.
I just tried:

rpm -i kernel-source-2.4.20-8.i386.rpm
cd /usr/src/linux-2.4.20-8
make mrproper
cp ../linux-2.4.20-tcore-akpm-preempt/.config .
make oldconfig
(default (N) to all NEW questions)
make dep
make bzImage
make modules

and that doesn't reproduce the problem.

Next I did:

cd /usr/src
mv linux-2.4.20-8 linux-2.4.20-8-mrproper
rpm -e kernel-source
rpm -i kernel-source-2.4.20-8.i386.rpm
cd linux-2.4.20-8
cp ../linux-2.4.20-tcore-akpm-preempt/.config .
make oldconfig
make dep
make clean
make bzImage
make modules

and this reproduces the problem:

make[2]: Entering directory `/usr/src/linux-2.4.20-8/drivers/block'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-8/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
-mpreferred-stack-boundary=2 -march=i686 -falign-functions=4  -DMODULE
-DMODVERSIONS -include /usr/src/linux-2.4.20-8/include/linux/modversions.h 
-nostdinc -iwithprefix include -DKBUILD_BASENAME=loop  -DEXPORT_SYMTAB -c loop.c
In file included from /usr/src/linux-2.4.20-8/include/linux/prefetch.h:13,
                 from /usr/src/linux-2.4.20-8/include/linux/list.h:6,
                 from /usr/src/linux-2.4.20-8/include/linux/module.h:12,
                 from loop.c:62:
/usr/src/linux-2.4.20-8/include/asm/processor.h:60: warning: parameter names
(without types) in function declaration
/usr/src/linux-2.4.20-8/include/asm/processor.h:60: field
`loops_per_jiffy_R_ver_str' declared as a function

I assumed that with a fresh rpm install
a 'make mrproper' wasn't needed.

I'd still call this a bug, you might want to 
find out why it happens before you simply decide
that a 'make mrproper' is needed :)

Comment 3 Alan Cox 2003-06-05 15:36:32 UTC
The tree is set up for building 3rd party modules rather than for rebuilding
without cleaning up. Some of this is a kernel build system weakness but thats
fixed in 2.5 and backporting is infeasible

Note You need to log in before you can comment on or make changes to this bug.