Bug 17717 - gcc can't find <linux/limits.h>
Summary: gcc can't find <linux/limits.h>
Keywords:
Status: CLOSED DUPLICATE of bug 16811
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-19 17:45 UTC by jgflemin
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-09-19 23:58:01 UTC
Embargoed:


Attachments (Terms of Use)

Description jgflemin 2000-09-19 17:45:29 UTC
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 22:51:10 UTC
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 23:57:59 UTC
See also bug #16811 (same bug).

Comment 3 Jakub Jelinek 2000-09-23 04:31:41 UTC

*** 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.