Bug 17717 - gcc can't find <linux/limits.h>
gcc can't find <linux/limits.h>
Status: CLOSED DUPLICATE of bug 16811
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-19 13:45 EDT by jgflemin
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-09-19 19:58:01 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 jgflemin 2000-09-19 13:45:29 EDT
I recently upgraded my kernel and glibc according to
the Red Hat security advisories. I am now trying to compile
a file that compiled just fine before the upgrade. It seems
that gcc can't find <linux/limits.h>. Here is the error verbatim
(I hope you can read this):

[jason@humpback post]$ gcc -o post -O2 -Wall post.c -lhdf5 -lz -lm
-L/opt/lib -I../source -I/opt/include
In file included from /usr/include/bits/posix1_lim.h:126,
                 from /usr/include/limits.h:30,
                 from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/limits.h:117,
                 from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/syslimits.h:7,
                 from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/limits.h:11,
                 from /opt/include/H5public.h:68,
                 from /opt/include/hdf5.h:21,
                 from post.c:49:
/usr/include/bits/local_lim.h:27: linux/limits.h: No such file or directory

So then I wondered where it was:

[jason@humpback post]$ find /usr -name limits.h -print
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/limits.h
/usr/lib/gcc-lib/i386-glibc20-linux/egcs-2.90.29/include/limits.h
/usr/lib/bcc/include/asm/limits.h
/usr/lib/bcc/include/limits.h
/usr/include/limits.h
/usr/src/linux-2.2.14/include/asm-arm/limits.h
/usr/src/redhat/SOURCES/tcl8.0.5/compat/limits.h
/usr/src/redhat/SOURCES/tk8.0.5/compat/limits.h
/usr/src/linux-2.2.16/include/linux/limits.h
/usr/i386-glibc20-linux/include/limits.h
/usr/i386-glibc20-linux/include/linux/limits.h

And who knows which one it was looking for. For lack
of a better idea, I made a symbolic link in /usr/include:
[root@humpback include]# ln -s /usr/src/linux-2.2.16/include/linux ./linux

And the compiler stopped complaining about this particular
thing (i.e., it found the file, but whether it was the right
one I can't say).
Comment 1 Olivier Baudron 2000-09-19 18:51:10 EDT
kernel-headers-2.2.16-3.i386.rpm is probably missing 2 symlinks:

/usr/include/asm -> ../src/linux/include/asm
/usr/include/linux -> ../src/linux/include/linux
Comment 2 Olivier Baudron 2000-09-19 19:57:59 EDT
See also bug #16811 (same bug).
Comment 3 Jakub Jelinek 2000-09-23 00:31:41 EDT

*** This bug has been marked as a duplicate of 16811 ***

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