Bug 91597 - kernel-source does not compile when using module versioning
kernel-source does not compile when using module versioning
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-25 09:09 EDT by Carlo Wood
Modified: 2007-04-18 12:54 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Carlo Wood 2003-05-25 09:09:58 EDT
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

CONFIG_MODVERSIONS=y

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

loops_per_jiffy_R_ver_str(ba497f13)

in the preprocessed source,
instead of the intended

loops_per_jiffy_Rba497f13

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

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

Regards,

Carlo Wood



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

How reproducible:
Always

Steps to Reproduce:
1.See description
2.
3.
    

Additional info:
Comment 1 Arjan van de Ven 2003-05-25 09:28:11 EDT
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 18:22:01 EDT
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 11:36:32 EDT
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.