Bug 63620 - error in kernel headers (or in gcc compiler)
error in kernel headers (or in gcc compiler)
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc-kernheaders (Show other bugs)
7.3
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-16 09:41 EDT by greg hosler
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-03 10:27:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description greg hosler 2002-04-16 09:41:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020401

Description of problem:
error when including /usr/include/linux/module.h


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


How reproducible:
Always

Steps to Reproduce:
1.create file foo.c as follows (1 line)

      #include <linux/module.h>

2. compile as follows:

      gcc -o foo foo.c

3. experiance errors as follows:
In file included from foo.c:1:
/usr/include/linux/module.h:60: parse error before `atomic_t'
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:62: parse error before `}'
/usr/include/linux/module.h:62: warning: data definition has no type or storage
class
/usr/include/linux/module.h:91: parse error before `}'

	

Actual Results:  error messages above

Expected Results:  no error messages

Additional info:
Comment 1 Arjan van de Ven 2002-04-16 09:44:59 EDT
Ehm why are you including linux/module.h in a userspace program ?
Comment 2 greg hosler 2002-04-16 09:58:06 EDT
Erm, does it really matter ?

For the record, I was compiling valgrind, a memory debugger. it needs
sizeof(struct module) which is defined in module.h

It's a perfectly legitimate request, and it _used_ to compile fine.
Comment 3 Arjan van de Ven 2002-04-16 10:02:14 EDT
typo found and fixed
Comment 4 greg hosler 2002-05-03 09:43:48 EDT
RH 7.3, shipped w/ glibc-kernheaders-2.4-7.14

This problem is *not* corrected in the shipped glibc-kernheaders-2.4-7.14

Comment 5 Arjan van de Ven 2002-05-03 09:52:16 EDT
Yes it is. the missing "/*" is fixed and present in 2.4-7.14
Comment 6 greg hosler 2002-05-03 10:19:46 EDT
I'm kinda curious how that can be, when viewed in the following context:

rpm -qilvp /mnt/cdrom/RedHat/RPMS/glibc-kernheaders-2.4-7.14.i386.rpm | grep
module.h
-rw-r--r--    1 root    root              132 Oct 24  2001 /usr/include/asm/module.h
-rw-r--r--    1 root    root            11752 Jan  4 17:36
/usr/include/linux/module.h


I'm not trying to be a smartass, but glibc-kernheaders-2.4-7.14.i386.rpm
includes /usr/include/linux/module.h dated "Jan  4 17:36" - you're fix,
mentioned above, occured on 2002-04-16 10:02:14, which was *after* what
is in the rpm.

I assure you, the original problem report is a valid problem report against RH
7.3. I am sitting here infrom of a brand spanking new, fresh, virgin
installation of rh7.3, a.k.a. Vahalla

            /home/hosler# cat /etc/redhat-release 
            Red Hat Linux release 7.3 (Valhalla)

If I might make a suggestion, my suggestion would be that you take a fresh
RH 7.3 installation, and I do mean fresh, and compile the original 1 line
test program as spelled out in the original problem report.

You *WILL* get the original error as reported:

/home/hosler# cc -o foo foo.c 
In file included from foo.c:1:
/usr/include/linux/module.h:60: parse error before `atomic_t'
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:62: parse error before `}'
/usr/include/linux/module.h:62: warning: data definition has no type or storage
class
/usr/include/linux/module.h:91: parse error before `}'


Comment 7 Arjan van de Ven 2002-05-03 10:27:35 EDT
Ah the bug in asm/atomic.h  got fixed....
well you need to include asm/atomic.h before one can include linux/module.h
Comment 8 greg hosler 2002-05-03 17:16:54 EDT
Ah. yes indeed.

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