Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90754 - limits.h problem preventing programs from being compiled correctly
Summary: limits.h problem preventing programs from being compiled correctly
Status: RESOLVED DUPLICATE of bug 87560
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-28 12:33 UTC by Avinash Meetoo
Modified: 2005-07-17 13:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Avinash Meetoo 2005-04-28 12:33:03 UTC
swig-1.3.21 was already correctly built on my Gentoo box but without the +tcltk flag.

During a re-emerge with the new flag, the build failed with a "#include nested too deep" error message.

In fact, /usr/include/limits.h includes /usr/include/gentoo-multilib/amd64/limits.h and vice-versa hence the infinite recursion.

From /usr/include/limits.h, we have :

#ifdef __x86_64__
#include "gentoo-multilib/amd64/limits.h"
#endif /* __x86_64__ */

and practically nothing else.

From /usr/include/gentoo-multilib/amd64/limits.h, we have:

#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines.  */
# include_next <limits.h>
... some other lines ...
#endif

It seems that /usr/include/limits.h is just here for compatibility reasons and that all the important definitions are in /usr/include/gentoo-multilib/amd64/limits.h. Unfortunately, the latter does not seem to be aware of that... and tries to include /usr/include/limits.h which is clearly unnecessary.

The solution I've used is to comment the #include_next <limits.h> from /usr/include/gentoo-multilib/amd64/limits.h and everything works well.

Reproducible: Always
Steps to Reproduce:
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-04-28 12:45:55 UTC
Emerge sync, re-emerge glibc and try again.

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