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).
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
See also bug #16811 (same bug).
*** This bug has been marked as a duplicate of 16811 ***