Because /usr/local/include is in the default include path, the include path and the library path are not consistent. The consequence is that (unless the user has modified the search paths with environment variables or switches) when some version of a library is installed in /usr (e.g., provided by the system) and another version of the library is installed in /usr/local (e.g., installed by the admin with configure, make, make install), the header file will be taken from /usr/local/include and the library will be taken from /usr/lib, but they do not correspond to the same version.
For instance, this problem can be seen when GMP 4.1.4 is installed in /usr (as in Debian/stable) and the user installs GMP 4.2.1 (the latest version) in /usr/local (with configure, make, make install), as the gmp.h from GMP 4.2.1 is not compatible with the GMP library version 4.1.4. In short, gcc should make sure that include and library search paths are consistent *by default*. If the user wants a different search path, he can still modifie C_INCLUDE_PATH, LIBRARY_PATH and LD_LIBRARY_PATH (for instance) altogether. -- Summary: /usr/local/include should not be in the default include path Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vincent at vinc17 dot org GCC host triplet: i686-pc-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29588