This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8477: autoconf script chooses wrong value for gcc_gxx_include_path
- From: John Tang Boyland <boyland at cs dot uwm dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 13 Jan 2003 03:26:02 -0000
- Subject: Re: c++/8477: autoconf script chooses wrong value for gcc_gxx_include_path
- Reply-to: John Tang Boyland <boyland at cs dot uwm dot edu>
The following reply was made to PR c++/8477; it has been noted by GNATS.
>From boyland@cs.uwm.edu Mon Jan 13 01:09:12 2003
From: John Tang Boyland <boyland@cs.uwm.edu>
To: ian.grant@cl.cam.ac.uk, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/8477: autoconf script chooses wrong value for
gcc_gxx_include_path
Date: Sun, 12 Jan 2003 21:24:41 -0600
I have a similar problem (except not with autoconf, since
I just use the release 3.2.1 source.) 'make install' installs
g++ header files in $(profix)/common/c++/3.2.1/ but then g++
looks for the files not using prefix. It seems to do something
strange related to where the executable is. I show two runs of g++:
one from a symbolic link in /usr/new/bin (and /usr/new/lib/lib-gcc
points
to $(exec-prefix)/lib/gcc-lib) and one directly using the full path
without any symbolic links. In both cases the files aren't found:
Run #1: (with symbolic links)
% /usr/new/bin/g++ --verbose hello.cc
Reading specs from
/usr/new/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs
Configured with: ../src/configure
--prefix=/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/common
--exec-prefix=/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58
--enable-languages=c,c++ --disable-nls
Thread model: posix
gcc version 3.2.1
/usr/new/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/cc1plus -v
-iprefix /usr/new/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/
-D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1
-D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4
-D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__
-D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix
-Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1
-D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
-D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int
-D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__
-Acpu=sparc -Amachine=sparc hello.cc -D__GNUG__=3 -D__DEPRECATED
-D__EXCEPTIONS -quiet -dumpbase hello.cc -version -o
/var/tmp//ccSYZafr.s
GNU CPP version 3.2.1 (cpplib) (sparc ELF)
GNU C++ version 3.2.1 (sparc-sun-solaris2.8)
compiled by GNU C version 3.2.1.
ignoring nonexistent directory
"/usr/new/lib/gcc-lib/../../../../../../../../include/c++/3.2.1"
ignoring nonexistent directory
"/usr/new/lib/gcc-lib/../../../../../../../../include/c++/3.2.1/sparc-sun-solaris2.8"
ignoring nonexistent directory
"/usr/new/lib/gcc-lib/../../../../../../../../include/c++/3.2.1/backward"
ignoring nonexistent directory
"/usr/new/lib/gcc-lib/../../../../../../../sparc-sun-solaris2.8/include"
ignoring nonexistent directory "/include/c++/3.2.1"
ignoring nonexistent directory "/include/c++/3.2.1/sparc-sun-solaris2.8"
ignoring nonexistent directory "/include/c++/3.2.1/backward"
ignoring nonexistent directory "/afs/sparc-sun-solaris2.8/include"
ignoring duplicate directory
"/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/new/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include
/usr/local/include
/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/common/include
/usr/include
End of search list.
hello.cc:1:20: iostream: No such file or directory
hello.cc: In function `int main()':
hello.cc:5: `cout' undeclared in namespace `std'
hello.cc:5: `endl' undeclared in namespace `std'
(2) run without symbolic links:
% /afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58/bin/g++ --verbose
hello.cc
Reading specs from
/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs
Configured with: ../src/configure
--prefix=/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/common
--exec-prefix=/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58
--enable-languages=c,c++ --disable-nls
Thread model: posix
gcc version 3.2.1
/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/cc1plus
-v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1
-D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4
-D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__
-D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix
-Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1
-D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
-D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int
-D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__
-Acpu=sparc -Amachine=sparc hello.cc -D__GNUG__=3 -D__DEPRECATED
-D__EXCEPTIONS -quiet -dumpbase hello.cc -version -o
/var/tmp//ccHTgJY7.s
GNU CPP version 3.2.1 (cpplib) (sparc ELF)
GNU C++ version 3.2.1 (sparc-sun-solaris2.8)
compiled by GNU C version 3.2.1.
ignoring nonexistent directory "/include/c++/3.2.1"
ignoring nonexistent directory "/include/c++/3.2.1/sparc-sun-solaris2.8"
ignoring nonexistent directory "/include/c++/3.2.1/backward"
ignoring nonexistent directory "/afs/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/common/include
/afs/cs.uwm.edu/package/gcc/gcc-3.2.1/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include
/usr/include
End of search list.
hello.cc:1:20: iostream: No such file or directory
hello.cc: In function `int main()':
hello.cc:5: `cout' undeclared in namespace `std'
hello.cc:5: `endl' undeclared in namespace `std'
My current "fix" is to edit the binaries in emacs to put in the correct
paths.
But I wonder why g++ tries to do tricky things with ../../ working
backwards from
gcc-lib rather than just use the same place that things were installed.
John
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8477