public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* relocating gcc 3.2.1: inconsistent search path for header files?
@ 2002-12-30  7:05 Harald Dunkel
  2002-12-30  7:56 ` Daniel Jacobowitz
  2002-12-30 10:20 ` Harald Dunkel
  0 siblings, 2 replies; 4+ messages in thread
From: Harald Dunkel @ 2002-12-30  7:05 UTC (permalink / raw)
  To: gcc

Hi folks,

I have installed gcc 3.2.1 in a private directory of a pseudo user.
When I compile a program using 'g++ -v', then g++ lists the following
directories searched for header files:


#include <...> search starts here:
  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1
  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/i686-pc-linux-gnu
  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/backward
  /usr/local/include
  /u/ccmaster/Linux/stow/gcc-3.2.1/include
  /u/ccmaster/Linux/stow/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include
  /usr/include
End of search list.



After relocating the gcc-3.2.1 directory to my own $HOME, 'g++ -v'
reports:

#include <...> search starts here:
  /u/dunkel/Linux/stow/gcc-3.2.1/include/c++/3.2.1
  /u/dunkel/Linux/stow/gcc-3.2.1/include/c++/3.2.1/i686-pc-linux-gnu
  /u/dunkel/Linux/stow/gcc-3.2.1/include/c++/3.2.1/backward
  /u/dunkel/Linux/stow/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include
  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1
  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/i686-pc-linux-gnu
  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/backward
  /usr/local/include
  /u/ccmaster/Linux/stow/gcc-3.2.1/include
  /u/ccmaster/Linux/stow/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include
  /usr/include
End of search list.



As you can see, the directory /somepath/gcc-3.2.1/lib/gcc-lib/\
i686-pc-linux-gnu/3.2.1/include has got a higher priority than
/usr/local/include now. This is surely inconsistent. But shouldn't
/usr/local/include get a much lower priority in the first case?



Regards

Harri

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: relocating gcc 3.2.1: inconsistent search path for header files?
  2002-12-30  7:05 relocating gcc 3.2.1: inconsistent search path for header files? Harald Dunkel
@ 2002-12-30  7:56 ` Daniel Jacobowitz
  2002-12-30 11:07   ` Neil Booth
  2002-12-30 10:20 ` Harald Dunkel
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-12-30  7:56 UTC (permalink / raw)
  To: gcc; +Cc: Neil Booth

On Mon, Dec 30, 2002 at 10:08:06AM +0100, Harald Dunkel wrote:
> Hi folks,
> 
> I have installed gcc 3.2.1 in a private directory of a pseudo user.
> When I compile a program using 'g++ -v', then g++ lists the following
> directories searched for header files:
> 
> 
> #include <...> search starts here:
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/i686-pc-linux-gnu
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/backward
>  /usr/local/include
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include
>  /u/ccmaster/Linux/stow/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include
>  /usr/include
> End of search list.
> 
> 
> 
> After relocating the gcc-3.2.1 directory to my own $HOME, 'g++ -v'
> reports:
> 
> #include <...> search starts here:
>  /u/dunkel/Linux/stow/gcc-3.2.1/include/c++/3.2.1
>  /u/dunkel/Linux/stow/gcc-3.2.1/include/c++/3.2.1/i686-pc-linux-gnu
>  /u/dunkel/Linux/stow/gcc-3.2.1/include/c++/3.2.1/backward
>  /u/dunkel/Linux/stow/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/i686-pc-linux-gnu
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include/c++/3.2.1/backward
>  /usr/local/include
>  /u/ccmaster/Linux/stow/gcc-3.2.1/include
>  /u/ccmaster/Linux/stow/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include
>  /usr/include
> End of search list.
> 
> 
> 
> As you can see, the directory /somepath/gcc-3.2.1/lib/gcc-lib/\
> i686-pc-linux-gnu/3.2.1/include has got a higher priority than
> /usr/local/include now. This is surely inconsistent. But shouldn't

This is a sort-of known problem.  I have a pending patch to fix it for
3.4; Neil, do you think it's worth fixing that part (just the order of
searching relocated directories) for 3.3?

> /usr/local/include get a much lower priority in the first case?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: relocating gcc 3.2.1: inconsistent search path for header files?
  2002-12-30  7:05 relocating gcc 3.2.1: inconsistent search path for header files? Harald Dunkel
  2002-12-30  7:56 ` Daniel Jacobowitz
@ 2002-12-30 10:20 ` Harald Dunkel
  1 sibling, 0 replies; 4+ messages in thread
From: Harald Dunkel @ 2002-12-30 10:20 UTC (permalink / raw)
  To: gcc

Harald Dunkel wrote:
> 
> As you can see, the directory /somepath/gcc-3.2.1/lib/gcc-lib/\
> i686-pc-linux-gnu/3.2.1/include has got a higher priority than
> /usr/local/include now. This is surely inconsistent. But shouldn't
> /usr/local/include get a much lower priority in the first case?
> 

Better: Gcc should ignore /usr/local/include completely, if
the prefix was not set to /usr/local at configuration time.
My gcc (configured using --prefix=/u/ccmaster/Linux/stow/gcc-3.2.1)
seems to ignore the libs in /usr/local/lib without explicit
-L flag, so why should it search in /usr/local/include by default?


Regards

Harri

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: relocating gcc 3.2.1: inconsistent search path for header files?
  2002-12-30  7:56 ` Daniel Jacobowitz
@ 2002-12-30 11:07   ` Neil Booth
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Booth @ 2002-12-30 11:07 UTC (permalink / raw)
  To: gcc

Daniel Jacobowitz wrote:-

> > As you can see, the directory /somepath/gcc-3.2.1/lib/gcc-lib/\
> > i686-pc-linux-gnu/3.2.1/include has got a higher priority than
> > /usr/local/include now. This is surely inconsistent. But shouldn't
> 
> This is a sort-of known problem.  I have a pending patch to fix it for
> 3.4; Neil, do you think it's worth fixing that part (just the order of
> searching relocated directories) for 3.3?

Sure!  If you come up with a patch, I'll be happy to review it.

Neil.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-30 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-30  7:05 relocating gcc 3.2.1: inconsistent search path for header files? Harald Dunkel
2002-12-30  7:56 ` Daniel Jacobowitz
2002-12-30 11:07   ` Neil Booth
2002-12-30 10:20 ` Harald Dunkel

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).