This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: relocating gcc 3.2.1: inconsistent search path for header files?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]