This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc includes wrong header
- From: John Ellson <ellson at research dot att dot com>
- To: bug-gcc at gnu dot org
- Date: Wed, 18 Dec 2002 15:52:29 -0500
- Subject: Re: gcc includes wrong header
- References: <3E000469.3000509@research.att.com>
gcc is somehow treating /home/ellson/FIX/SunOS/include as special because
gcc was built and installed with prefix=/home/ellson/FIX/SunOS
If I add a softlink
/home/ellson/FIX/SunOS/include->/home/ellson/FIX/SunOS/include_ln
then -I/home/ellson/FIX/SunOS/include_ln
the problem goes away.
Could somebody just drop me a one liner that this bug report has been
received?
John Ellson
John Ellson wrote:
I have two version of tcl installed on a Solaris-8 box, one in /usr/local
and the other under my $HOME which I want to use instead of the public
install.
gcc is picking up the one in /usr/local, even without a -I/usr/local
Sun's cc picks up the other one.
==============================================
$ which gcc
/home/ellson/FIX/SunOS/bin/gcc
$ gcc --version
gcc (GCC) 3.2.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ ls -l /usr/local/include/tcl.h
-r--r--r-- 1 root other 22198 Jun 27 1995
/usr/local/include/tcl.h
$ ls -l /home/ellson/FIX/SunOS/include/tcl.h
-rw-r--r-- 1 ellson ellson 57866 Dec 17 16:56
/home/ellson/FIX/SunOS/include/tcl.h
$ cat test.c
#include "tcl.h"
$ gcc -I/home/ellson/FIX/SunOS/include test.c -E | head
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"
# 1 "/usr/local/include/tcl.h" 1 3
# 34 "/usr/local/include/tcl.h" 3
# 1
"/home/ellson/FIX/SunOS/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include/stdio.h"
1 3 4
# 14
"/home/ellson/FIX/SunOS/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include/stdio.h"
3 4
# 1
"/home/ellson/FIX/SunOS/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include/stdarg.h"
1 3 4
# 43
"/home/ellson/FIX/SunOS/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include/stdarg.h"
3 4
$
=========================================
John Ellson