* relative include search path
@ 2009-05-25 16:39 Denis Onischenko
2009-05-25 16:40 ` Dave Korn
0 siblings, 1 reply; 2+ messages in thread
From: Denis Onischenko @ 2009-05-25 16:39 UTC (permalink / raw)
To: gcc
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.
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 ?
I configured gcc with --prefix=/usr. The gcc was built with cross-compiler.
Thanks in advance.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: relative include search path
2009-05-25 16:39 relative include search path Denis Onischenko
@ 2009-05-25 16:40 ` Dave Korn
0 siblings, 0 replies; 2+ messages in thread
From: Dave Korn @ 2009-05-25 16:40 UTC (permalink / raw)
To: Denis Onischenko; +Cc: gcc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-25 12:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-25 16:39 relative include search path Denis Onischenko
2009-05-25 16:40 ` Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).