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)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  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:
Last Closed: 2000-09-19 19:58:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 /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

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.