public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Denis Onischenko <denis.onischenko@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: relative include search path
Date: Mon, 25 May 2009 16:40:00 -0000	[thread overview]
Message-ID: <4A1A8BD7.8010305@gmail.com> (raw)
In-Reply-To: <c80516030905250413s63557d13t57913107fa017051@mail.gmail.com>

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

      reply	other threads:[~2009-05-25 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 16:39 Denis Onischenko
2009-05-25 16:40 ` Dave Korn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1A8BD7.8010305@gmail.com \
    --to=dave.korn.cygwin@googlemail.com \
    --cc=denis.onischenko@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).