Bug 52412 - module.h bug when compiling soundcore.c
module.h bug when compiling soundcore.c
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-23 12:52 EDT by Need Real Name
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 23:22:00 EST
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 Need Real Name 2001-08-23 12:52:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
Using the kernel source shipped with RH 7.1, I had to add a #include to
include/linux/module.h in order to compile drivers/sound/soundcore.c. 
Dunno if this is the optimal solution.

I'm surprised a file called "rhconfig.h" has to exist -- I would hope that
all distributions would share identical kernel source.

Below are the first few lines of module.h, showing the #include added:

/*
 * Dynamic loading of modules into the kernel.
 *
 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
 */

#ifndef _LINUX_MODULE_H
#define _LINUX_MODULE_H

/* new addition */
#include <linux/rhconfig.h>
/* end new addition */
#include <linux/config.h>
#include <linux/spinlock.h>
#include <linux/list.h>

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


How reproducible:
Always

Steps to Reproduce:
1. in /usr/src/linux, choose sound support as a module
2. run "make clean; make dep; make; make modules"
3. notice that soundcore.c failed to compile
	

Actual Results:  make[2]: Entering directory
`/usr/src/linux-2.4.2/drivers/sound'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused -pipe
-mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include
/usr/src/linux/include/linux/modversions.h   -DEXPORT_SYMTAB -c
sound_core.c
In file included from sound_core.c:38:
/usr/src/linux/include/linux/module.h:173: nondigits in number and not
hexadecimal
/usr/src/linux/include/linux/module.h:173: nondigits in number and not
hexadecimal
/usr/src/linux/include/linux/module.h:173: nondigits in number and not
hexadecimal
/usr/src/linux/include/linux/module.h:173: nondigits in number and not
hexadecimal
/usr/src/linux/include/linux/module.h:173: parse error before `62dada05'
/usr/src/linux/include/linux/module.h:173:
`inter_module_register_R_ver_str' declared as function returning a function

Expected Results:  no error messages

Additional info:

Here's the cpp output showing why rhconfig.h has to be included before line
173 of module.h.  (rhconfig.h does get included on line 256 of module.h, by
way of version.h.)

# 173 "/usr/src/linux/include/linux/module.h"
extern void inter_module_register_R_ver_str(62dada05)(const char *, struct
module *, const void *);
Comment 1 Need Real Name 2001-09-06 19:43:32 EDT
Including "rhconfig.h" into "module.h" may solve only this particular problem. 
But some modules include "modversions.h" and not "module.h" and compiler 
generates simiar error. Better workaround is to place "#include 
<linux/rhconfig.h>" into "modsetver.h".
Other solutions are:
* redesign of "make dep" so, that it will include
  "rhconfig.h" into "modversions.h"
* redesign of "make dep" so, that it will append
  version "number" to exported symbils in another
  way (more straight and clear!).

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