Bug 25974

Summary: kernel compile fails at "make modules"
Product: [Retired] Red Hat Linux Reporter: Dan Scholnik <scholnik>
Component: kernelAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: linux
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-06 10:20:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Scholnik 2001-02-04 14:15:08 UTC
When compiling a custom kernel, "make bzImage" works fine, but a subsequent
"make modules" results in errors.  Here is a partial dump of the output
from make:

In file included from rd.c:47:
/usr/src/linux-2.4/include/linux/sched.h:6: nondigits in number and not
hexadecimal
/usr/src/linux-2.4/include/linux/sched.h:6: nondigits in number and not
hexadecimal
/usr/src/linux-2.4/include/linux/sched.h:6: parse error before `7b16c344'
/usr/src/linux-2.4/include/linux/sched.h:6: warning: function declaration
isn't a prototype
In file included from /usr/src/linux-2.4/include/linux/wait.h:14,
                 from /usr/src/linux-2.4/include/linux/fs.h:13,
                 from /usr/src/linux-2.4/include/linux/capability.h:18,
                 from /usr/src/linux-2.4/include/linux/binfmts.h:6,
                 from /usr/src/linux-2.4/include/linux/sched.h:10,
                 from rd.c:47:
/usr/src/linux-2.4/include/linux/kernel.h:51: nondigits in number and not
hexadecimal
/usr/src/linux-2.4/include/linux/kernel.h:51: nondigits in number and not
hexadecimal
/usr/src/linux-2.4/include/linux/kernel.h:51: parse error before `01075bf0'
/usr/src/linux-2.4/include/linux/kernel.h:52: `panic_R_ver_str' declared as
function returning a function
/usr/src/linux-2.4/include/linux/kernel.h:52: warning: function declaration
isn't a prototype
/usr/src/linux-2.4/include/linux/kernel.h:57: parse error before `20000329'
/usr/src/linux-2.4/include/linux/kernel.h:57: `simple_strtoul_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4/include/linux/kernel.h:57: warning: function declaration
isn't a prototype
/usr/src/linux-2.4/include/linux/kernel.h:58: nondigits in number and not
hexadecimal
/usr/src/linux-2.4/include/linux/kernel.h:58: nondigits in number and not
hexadecimal

Comment 1 Sammy 2001-02-04 16:22:12 UTC
Save your .config file elsewhere, do "make mrproper", then make xconfig
and load the configuration file you saved and exit xconfig. It seems like
without make mrproper some residues are left from previous compilation that
cause this problem.

Comment 2 Daniel Hammer 2001-02-06 10:20:45 UTC
I had the same problem. It can be avoided if you unset CONFIG_MODVERSIONS - it
is normally set to CONFIG_MODVERSIONS=y. Then it will compile and install.

Comment 3 Michael K. Johnson 2001-02-08 22:38:25 UTC
Using
make mrproper
is important before building -- there are many potential kernel configs.

Comment 4 Patrick Harris 2001-02-13 19:37:08 UTC
If one copys one of the *.config files from  /usr/src/linux-2.4.0/configs/  
to  /usr/src/linux-2.4.0/.config. Then I believe that the following sequence 
should work. Since it does not, of what use is /usr/src/linux-2.4.0/configs/* 
and why is this not a bug? 

make dep
Make clean
Make bxImage
Make modules


Comment 5 Michael K. Johnson 2001-02-14 01:03:51 UTC
make mrproper
cp configs/something .config
make oldconfig
...

Comment 6 Anthony Rumble 2001-05-14 00:07:45 UTC
Perhaps you should change your kernel building .SPEC file to include an mrproper
before it bundles up the kernel-source RPM

Save a lot of people some grief.

Comment 7 Arjan van de Ven 2001-05-14 08:45:09 UTC
The reason we don't do that (and it is also the reason why you need make
mrproper) is that the sources as they are currently installed, allow you to
compile external modules (think Alsa but also VMware, NVidia) for any kernel
we provide. The problem arrises when you compile your own kernel, in that case
you need your own symbolversioning data, not the one we provide. "make mrproper"
removes these.

Comment 8 Frode Tennebø 2001-05-16 14:46:00 UTC
Obviously, something is missing from the package if you HAVE to do a 'make
mrproper'. The real problem here arises when there is a bug in one of the
modules acompanying the installation (in this case pcnet32). Ideally I should be
able to patch the driver and build the module.

However, this is not possible for reasons explained in this thread. The problem
is that if I DO a 'make mrproper', and only replaces that module I will get
unresolved symbols.