From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20807 invoked by alias); 6 Nov 2002 13:06:09 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20782 invoked by uid 71); 6 Nov 2002 13:06:08 -0000 Resent-Date: 6 Nov 2002 13:06:08 -0000 Resent-Message-ID: <20021106130608.20781.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, ian.grant@cl.cam.ac.uk Received: (qmail 17814 invoked by uid 61); 6 Nov 2002 12:58:30 -0000 Message-Id: <20021106125829.17812.qmail@sources.redhat.com> Date: Wed, 06 Nov 2002 05:06:00 -0000 From: ian.grant@cl.cam.ac.uk Reply-To: ian.grant@cl.cam.ac.uk To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8477: autoconf script chooses wrong value for gcc_gxx_include_path X-SW-Source: 2002-11/txt/msg00283.txt.bz2 List-Id: >Number: 8477 >Category: c++ >Synopsis: autoconf script chooses wrong value for gcc_gxx_include_path >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Nov 06 05:06:04 PST 2002 >Closed-Date: >Last-Modified: >Originator: ian.grant@cl.cam.ac.uk >Release: gcc-3.1 >Organization: >Environment: >Description: When determining the default g++ include directory gcc/configure.in assumes that libdir=$(exec_prefix)/lib which is not always the case. in gcc/configure.in we have: if test x${gcc_gxx_include_dir} = x; then if test x${enable_version_specific_runtime_libs} = xyes; then gcc_gxx_include_dir='${libsubdir}/include/g++' else topsrcdir=${srcdir}/.. . ${srcdir}/../config.if changequote(<<, >>)dnl gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} changequote([, ])dnl fi fi in libstdc++-v3/aclocal.m4 (in the definition of GLIBCPP_EXPORT_INSTALL_INFO used in libstdc++-v3/configure.in) we have # Default case for install directory for include files. if test $version_specific_libs = no && test $gxx_include_dir = no; then gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface} fi So in the case where libdir=/usr/lib/gnu/gcc and prefix=/usr we get /usr/lib/gnu/gcc/gcc-lib/sparc-sun-solaris2.8/3.1/../../../../include/g++-v3 for the search path and /usr/include/g++-v3 for the install path. This is wrong. Workaround: Configure with --with-gxx-include-dir=/usr/include/g++-v3 >How-To-Repeat: ../gcc-3.1/configure --prefix=/usr \ --libdir=/usr/lib/gnu/gcc \ --enable-languages=c,c++ make bootstrap make install The resulting g++ will not find the c++ include files installed under /usr/include/g++-v3 >Fix: Use the same logic to determine both the installation and the search paths? :-) >Release-Note: >Audit-Trail: >Unformatted: