Denis Onischenko wrote: > I have a problem with gcc not finding location for stddef.h include > file when it is invoked from directory other than > <install_prefix>/bin.
Questions about the usage of GCC should go to the gcc-help mailing list, rather than this one which is about the development of the internals of GCC. What you have discovered here may appear to be a bug, but in fact it is by design, so please send any follow-ups to the gcc-help list, thank you. > Output from gcc invocation with -v option contains the following: > > ignoring nonexistent directory "../lib/gcc..." > > i.e. gcc is trying to find include files in directory with relative path. > So it is works only when working directory is /usr/bin, where gcc is > installed. > > Why gcc looks for headers in directories with relative paths ? So that you can move the entire installation somewhere else and it will all work because it will all be in the same relative locations compared to the new $prefix as it was when installed in the original $prefix. What you have done is move a single part of the installation to a new location and leave the rest behind. That is not supported, and there's no simple and direct way in which it could be. cheers, DaveK