This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 97366 - user code is trying to access kernel header files
user code is trying to access kernel header files
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-13 14:23 EDT by Nitin Gupta
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-17 12:03:49 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 Nitin Gupta 2003-06-13 14:23:55 EDT
Description of problem:
I noticed while building some code on RH7.3 linux pc that my build fails (it
passes on RH7.2 and RH9.0), with some user level code trying to access some
kernel header files. 

Version-Release number of selected component (if applicable):
wyvern [/h/users/gupta] % uname -a
Linux wyvern.sea.equator.com 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown

wyvern [/h/users/gupta] % gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)

How reproducible:
wyvern [/h/users/gupta] % cat signal.c
#include <signal.h>

wyvern [/h/users/gupta] % gcc -c signal.c
In file included from /usr/include/signal.h:307,
                 from signal.c:1:
/usr/include/bits/sigcontext.h:28:29: asm/sigcontext.h: No such file or directory


Steps to Reproduce:
1. Go to RH7.3 PC
2. Create a c file that include signal.h
3. compile it
    
Actual results:
wyvern [/h/users/gupta] % gcc -c -v signal.c
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c -v -D__GNUC__=2
-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__
-D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__NO_INLINE__
-Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ signal.c
/tmp/ccQIL91P.i
GNU CPP version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include
 /usr/include
End of search list.
In file included from /usr/include/signal.h:307,
                 from signal.c:1:
/usr/include/bits/sigcontext.h:28:29: asm/sigcontext.h: No such file or directory


Expected results:
signal.o

Additional info:
I don't see the same behavior on RH 7.2 and RH9.0 pcs
Comment 1 Jakub Jelinek 2003-06-17 12:03:49 EDT
This looks like your local installation problem. Either you don't have glibc-kernheaders
package installed, or something removed its headers.
Comment 2 Nitin Gupta 2003-06-17 16:53:00 EDT
Could you please add the output for your "uname -a" and "gcc -c -v signal.c"
Thanks.
Comment 3 Jakub Jelinek 2003-06-17 17:01:03 EDT
uname -a is totally uninteresting.
gcc -c -v signal.c
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__NO_INLINE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ signal.c /tmp/cc9p9W8s.i
GNU CPP version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1 /tmp/cc9p9W8s.i -quiet -dumpbase signal.c -version -o /tmp/ccIqdDic.s
GNU C version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) (i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.3 2.96-113).
 as -V -Qy -o signal.o /tmp/ccIqdDic.s
GNU assembler version 2.11.93.0.2 (i386-redhat-linux) using BFD version 2.11.93.0.2 20020207

What's interesting is if you have /usr/include/asm/sigcontext.h file installed or not, ie.:

rpm -qf /usr/include/asm/sigcontext.h
glibc-kernheaders-2.4-7.16

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