[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#105238: marked as done (g++-3.0 fails to find system headers when -I/usr/include is used)



Your message dated Sat, 14 Jul 2001 11:43:47 -0700
with message-id <20010714114347.A12395@nevyn.them.org>
and subject line Bug#105238: g++-3.0 fails to find system headers when -I/usr/include is used
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 14 Jul 2001 14:38:13 +0000
>From bviren@minos.phy.bnl.gov Sat Jul 14 09:38:13 2001
Return-path: <bviren@minos.phy.bnl.gov>
Received: from minos.phy.bnl.gov (minos) [::ffff:130.199.36.108] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 15LQYf-0000d7-00; Sat, 14 Jul 2001 09:38:13 -0500
Received: from bviren by minos with local (Exim 3.16 #1 (Debian))
	id 15LPwv-0004Fy-00
	for <bugs@debian.org>; Sat, 14 Jul 2001 09:59:13 -0400
From: Brett Viren <bv@bnl.gov>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[🔎] 15184.20528.944072.940913@minos.phy.bnl.gov>
Date: Sat, 14 Jul 2001 09:59:12 -0400 (EDT)
To: bugs@debian.org
Subject: g++-3.0 fails to find system headers when -I/usr/include is used
X-Mailer: VM 6.75 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid
Reply-To: Brett Viren  <bv@bnl.gov>
Sender: Brett Viren <bviren@minos.phy.bnl.gov>
Delivered-To: submit@bugs.debian.org
Delivered-To: bugs@debian.org

Package: g++-3.0
Version: 3.0-4

Hello,

This bug report may need to be redirected to a different package
(cpp-3.0 or libstdc++3-dev).

Adding "-I/usr/include" to the compile line of g++-3.0 can cause
system headers in /usr/include to *not* be found.  This is due to the
use of #include_next inside /usr/include/g++-v3/bits headers.  This
directive causes the CPP to check for the file in any directories
after the current one in the list.  Explicitly adding -I/usr/include
evidently removes it from the list of internal directories to check.

The following code will trigger this problem:

bviren@minos:bviren> cat blah.cc
#include <iosfwd>
int main (int argc, char *argv[])
{
    return 0;
} // end of main()

In the next 4 commands, the first 3 succeed, the last fails:

bviren@minos:bviren> g++-2.95 blah.cc
bviren@minos:bviren> g++-2.95 -I/usr/include blah.cc
bviren@minos:bviren> g++-3.0  blah.cc
bviren@minos:bviren> g++-3.0 -I/usr/include blah.cc
In file included from /usr/include/g++-v3/bits/fpos.h:40,
                 from /usr/include/g++-v3/bits/std_iosfwd.h:41,
                 from /usr/include/g++-v3/iosfwd:31,
                 from blah.cc:1:
/usr/include/g++-v3/bits/std_cwchar.h:42:24: wchar.h: No such file or directory
In file included from /usr/include/g++-v3/bits/fpos.h:40,
                 from /usr/include/g++-v3/bits/std_iosfwd.h:41,
                 from /usr/include/g++-v3/iosfwd:31,
                 from blah.cc:1:
/usr/include/g++-v3/bits/std_cwchar.h:59: `mbstate_t' not declared
/usr/include/g++-v3/bits/std_cwchar.h:125: `btowc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:126: `fgetwc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:127: `fgetws' not declared
/usr/include/g++-v3/bits/std_cwchar.h:128: `fputwc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:129: `fputws' not declared
/usr/include/g++-v3/bits/std_cwchar.h:130: `fwide' not declared
/usr/include/g++-v3/bits/std_cwchar.h:131: `fwprintf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:132: `fwscanf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:133: `getwc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:134: `getwchar' not declared
/usr/include/g++-v3/bits/std_cwchar.h:135: `mbrlen' not declared
/usr/include/g++-v3/bits/std_cwchar.h:136: `mbrtowc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:137: `mbsinit' not declared
/usr/include/g++-v3/bits/std_cwchar.h:138: `mbsrtowcs' not declared
/usr/include/g++-v3/bits/std_cwchar.h:139: `putwc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:140: `putwchar' not declared
/usr/include/g++-v3/bits/std_cwchar.h:141: `swprintf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:142: `swscanf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:143: `ungetwc' not declared
/usr/include/g++-v3/bits/std_cwchar.h:144: `vfwprintf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:145: `vfwscanf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:146: `vswprintf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:147: `vswscanf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:148: `vwprintf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:149: `vwscanf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:150: `wcrtomb' not declared
/usr/include/g++-v3/bits/std_cwchar.h:151: `wcscat' not declared
/usr/include/g++-v3/bits/std_cwchar.h:152: `wcscmp' not declared
/usr/include/g++-v3/bits/std_cwchar.h:153: `wcscoll' not declared
/usr/include/g++-v3/bits/std_cwchar.h:154: `wcscpy' not declared
/usr/include/g++-v3/bits/std_cwchar.h:155: `wcscspn' not declared
/usr/include/g++-v3/bits/std_cwchar.h:156: `wcsftime' not declared
/usr/include/g++-v3/bits/std_cwchar.h:157: `wcslen' not declared
/usr/include/g++-v3/bits/std_cwchar.h:158: `wcsncat' not declared
/usr/include/g++-v3/bits/std_cwchar.h:159: `wcsncmp' not declared
/usr/include/g++-v3/bits/std_cwchar.h:160: `wcsncpy' not declared
/usr/include/g++-v3/bits/std_cwchar.h:161: `wcsrtombs' not declared
/usr/include/g++-v3/bits/std_cwchar.h:162: `wcsspn' not declared
/usr/include/g++-v3/bits/std_cwchar.h:163: `wcstod' not declared
/usr/include/g++-v3/bits/std_cwchar.h:164: `wcstof' not declared
/usr/include/g++-v3/bits/std_cwchar.h:165: `wcstok' not declared
/usr/include/g++-v3/bits/std_cwchar.h:166: `wcstol' not declared
/usr/include/g++-v3/bits/std_cwchar.h:167: `wcstoul' not declared
/usr/include/g++-v3/bits/std_cwchar.h:168: `wcsxfrm' not declared
/usr/include/g++-v3/bits/std_cwchar.h:169: `wctob' not declared
/usr/include/g++-v3/bits/std_cwchar.h:170: `wmemcmp' not declared
/usr/include/g++-v3/bits/std_cwchar.h:171: `wmemcpy' not declared
/usr/include/g++-v3/bits/std_cwchar.h:172: `wmemmove' not declared
/usr/include/g++-v3/bits/std_cwchar.h:173: `wmemset' not declared
/usr/include/g++-v3/bits/std_cwchar.h:174: `wprintf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:175: `wscanf' not declared
/usr/include/g++-v3/bits/std_cwchar.h:177: `wcschr' not declared
/usr/include/g++-v3/bits/std_cwchar.h: In function `wchar_t* 
   std::wcschr(wchar_t*, wchar_t)':
/usr/include/g++-v3/bits/std_cwchar.h:181: cannot convert `const wchar_t*' to 
   `wchar_t*' for argument `1' to `wchar_t* std::wcschr(wchar_t*, wchar_t)'
/usr/include/g++-v3/bits/std_cwchar.h: At global scope:
/usr/include/g++-v3/bits/std_cwchar.h:183: `wcspbrk' not declared
/usr/include/g++-v3/bits/std_cwchar.h: In function `wchar_t* 
   std::wcspbrk(wchar_t*, wchar_t*)':
/usr/include/g++-v3/bits/std_cwchar.h:187: cannot convert `const wchar_t*' to 
   `wchar_t*' for argument `1' to `wchar_t* std::wcspbrk(wchar_t*, wchar_t*)'
/usr/include/g++-v3/bits/std_cwchar.h: At global scope:
/usr/include/g++-v3/bits/std_cwchar.h:189: `wcsrchr' not declared
/usr/include/g++-v3/bits/std_cwchar.h: In function `wchar_t* 
   std::wcsrchr(wchar_t*, wchar_t)':
/usr/include/g++-v3/bits/std_cwchar.h:193: cannot convert `const wchar_t*' to 
   `wchar_t*' for argument `1' to `wchar_t* std::wcsrchr(wchar_t*, wchar_t)'
/usr/include/g++-v3/bits/std_cwchar.h: At global scope:
/usr/include/g++-v3/bits/std_cwchar.h:195: `wcsstr' not declared
/usr/include/g++-v3/bits/std_cwchar.h: In function `wchar_t* 
   std::wcsstr(wchar_t*, wchar_t*)':
/usr/include/g++-v3/bits/std_cwchar.h:199: cannot convert `const wchar_t*' to 
   `wchar_t*' for argument `1' to `wchar_t* std::wcsstr(wchar_t*, wchar_t*)'
/usr/include/g++-v3/bits/std_cwchar.h: At global scope:
/usr/include/g++-v3/bits/std_cwchar.h:201: `wmemchr' not declared
/usr/include/g++-v3/bits/std_cwchar.h: In function `wchar_t* 
   std::wmemchr(wchar_t*, wchar_t, unsigned int)':
/usr/include/g++-v3/bits/std_cwchar.h:205: cannot convert `const wchar_t*' to 
   `wchar_t*' for argument `1' to `wchar_t* std::wmemchr(wchar_t*, wchar_t, 
   unsigned int)'
/usr/include/g++-v3/bits/std_cwchar.h: At global scope:
/usr/include/g++-v3/bits/std_cwchar.h:216: `wcstold' not declared
/usr/include/g++-v3/bits/std_cwchar.h:217: `wcstoll' not declared
/usr/include/g++-v3/bits/std_cwchar.h:218: `wcstoull' not declared
/usr/include/g++-v3/bits/std_cwchar.h:223: `wcstold' not declared
/usr/include/g++-v3/bits/std_cwchar.h:224: `wcstoll' not declared
/usr/include/g++-v3/bits/std_cwchar.h:225: `wcstoull' not declared
In file included from /usr/include/g++-v3/bits/std_iosfwd.h:41,
                 from /usr/include/g++-v3/iosfwd:31,
                 from blah.cc:1:
/usr/include/g++-v3/bits/fpos.h:112: `mbstate_t' was not declared in this scope
/usr/include/g++-v3/bits/fpos.h:112: template argument 1 is invalid
/usr/include/g++-v3/bits/fpos.h:114: `mbstate_t' was not declared in this scope
/usr/include/g++-v3/bits/fpos.h:114: template argument 1 is invalid

bviren@minos:bviren> dpkg -l libgcc1 libc6 gcc-3.0 libstdc++3-dev
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  libgcc1        3.0-4          GCC support library.
ii  libc6          2.2.3-1        GNU C Library: Shared libraries and Timezone
ii  gcc-3.0        3.0-4          The GNU C compiler.
ii  libstdc++3-dev 3.0-4          The GNU stdc++ library version 3 (developmen

bviren@minos:bviren> uname -a
Linux minos 2.4.2 #4 SMP Tue Mar 20 10:49:23 EST 2001 i686 unknown

-Brett.


-Brett

---------------------------------------
Received: (at 105238-done) by bugs.debian.org; 14 Jul 2001 18:43:53 +0000
>From drow@crack.them.org Sat Jul 14 13:43:53 2001
Return-path: <drow@crack.them.org>
Received: from gateway-1237.mvista.com (nevyn.them.org) [::ffff:12.44.186.158] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 15LUOP-0001aM-00; Sat, 14 Jul 2001 13:43:53 -0500
Received: from drow by nevyn.them.org with local (Exim 3.22 #1 (Debian))
	id 15LUOJ-0003F0-00; Sat, 14 Jul 2001 11:43:47 -0700
Date: Sat, 14 Jul 2001 11:43:47 -0700
From: Daniel Jacobowitz <dan@debian.org>
To: Brett Viren <bv@bnl.gov>, 105238-done@bugs.debian.org
Subject: Re: Bug#105238: g++-3.0 fails to find system headers when -I/usr/include is used
Message-ID: <20010714114347.A12395@nevyn.them.org>
References: <[🔎] 15184.20528.944072.940913@minos.phy.bnl.gov>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.16i
In-Reply-To: <[🔎] 15184.20528.944072.940913@minos.phy.bnl.gov>; from bv@bnl.gov on Sat, Jul 14, 2001 at 09:59:12AM -0400
Delivered-To: 105238-done@bugs.debian.org

On Sat, Jul 14, 2001 at 09:59:12AM -0400, Brett Viren wrote:
> Package: g++-3.0
> Version: 3.0-4
> 
> Hello,
> 
> This bug report may need to be redirected to a different package
> (cpp-3.0 or libstdc++3-dev).
> 
> Adding "-I/usr/include" to the compile line of g++-3.0 can cause
> system headers in /usr/include to *not* be found.  This is due to the
> use of #include_next inside /usr/include/g++-v3/bits headers.  This
> directive causes the CPP to check for the file in any directories
> after the current one in the list.  Explicitly adding -I/usr/include
> evidently removes it from the list of internal directories to check.

Yes, that's right.  It's not a bug, however.  That's what -I is
documented to do; it moves a direcvtory to the head of the include
chain if it's already been specified.

Don't do this.  Any script which emits -I/usr/include or makefile that
assumes it is broken.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



Reply to: