FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 07-29-2008, 01:55 AM
Marc Lehmann
 
Default Bug#492817: g++-4.3: can't include cstddef - wrong include file order

Package: g++-4.3
Version: 4.3.1-8
Severity: important


when trying to compile the following file:

#include <cstddef>

with g++-4.3 (4.2 works fine), I get:

In file included from x.C:1:
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory
In file included from x.C:1:
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:55: error: ':trdiff_t' has not been declared
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:56: error: '::size_t' has not been declared

the reason is that the incldue file order is broken in g++-4.3, the c includes come first:

/localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/include
/localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/include-fixed
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/x86_64-linux-gnu
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/backward
/usr/local/include
/usr/include

since cstddef is in c++/4.3, g++ is unable to find stddef.h which comes
earlier. Here is the full output from g++-4.3 -v;

nobody@cerebro:/tmp$ g++ -v -v x.C
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-8' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-8)
COLLECT_GCC_OPTIONS='-v' '-v' '-shared-libgcc' '-mtune=generic'
/localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/cc1plus -quiet -v -v -iprefix /localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/ -D_GNU_SOURCE x.C -quiet -dumpbase x.C -mtune=generic -auxbase x -version -o /tmp/ccc8Sygh.s
ignoring nonexistent directory "/localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring duplicate directory "/localvol/usr/bin/../lib/gcc/../../lib/gcc/x86_64-linux-gnu/4.3.1/include"
ignoring duplicate directory "/localvol/usr/bin/../lib/gcc/../../lib/gcc/x86_64-linux-gnu/4.3.1/include-fixed"
ignoring nonexistent directory "/localvol/usr/bin/../lib/gcc/../../lib/gcc/x86_64-linux-gnu/4.3.1/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/include
/localvol/usr/bin/../lib/gcc/x86_64-linux-gnu/4.3.1/include-fixed
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/x86_64-linux-gnu
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/backward
/usr/local/include
/usr/include
End of search list.
GNU C++ (Debian 4.3.1-8) version 4.3.1 (x86_64-linux-gnu)
compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.1.
warning: GMP header version 4.2.2 differs from library version 4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: a897844f780308304eadf13c49bc7733
In file included from x.C:1:
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory
In file included from x.C:1:
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:55: error: ':trdiff_t' has not been declared
/localvol/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:56: error: '::size_t' has not been declared

My quick guess is that g++-4.3 gets confused because /usr is a symlink to
/localvol/usr, but I can't pinpoint where exactly the problem is. g++-4.2
has no such issues on the same system. Or maybe it's the duplicate path -
I have no clue, but the issue persist for some months now, I only got to
report it now, intiially believeing it was my fault somwehere.

-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages g++-4.3 depends on:
ii gcc-4.3 4.3.1-8 The GNU C compiler
ii gcc-4.3-base 4.3.1-8 The GNU Compiler Collection (base
hi libc6 2.7-12 GNU C Library: Shared libraries
ii libgmp3c2 4.2.dfsg-1 Multiprecision arithmetic library
ii libmpfr1ldbl 2.3.1.dfsg.1-2 multiple precision floating-point
ii libstdc++6-4.3-dev 4.3.1-8 The GNU Standard C++ Library v3 (d

g++-4.3 recommends no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-29-2008, 08:49 PM
Bastian Blank
 
Default Bug#492817: g++-4.3: can't include cstddef - wrong include file order

On Tue, Jul 29, 2008 at 03:55:16AM +0200, Marc Lehmann wrote:
> when trying to compile the following file:
> #include <cstddef>

| $ cat test.cpp
| #include <cstddef>
| $ g++-4.3 -o test.o -c test.cpp -Wall -W
| $

Please provide a complete example.

Bastian

--
You! What PLANET is this!
-- McCoy, "The City on the Edge of Forever", stardate 3134.0



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-29-2008, 10:13 PM
Bastian Blank
 
Default Bug#492817: g++-4.3: can't include cstddef - wrong include file order

On Tue, Jul 29, 2008 at 11:44:55PM +0200, Marc Lehmann wrote:
> On Tue, Jul 29, 2008 at 10:49:58PM +0200, Bastian Blank <waldi@debian.org> wrote:
> > > when trying to compile the following file:
> > > #include <cstddef>
> >
> > | $ cat test.cpp
> > | #include <cstddef>
> > | $ g++-4.3 -o test.o -c test.cpp -Wall -W
> > | $
> >
> > Please provide a complete example.
> What is missing?

Instructions how to reproduce the problem. I showed you my working
version.

Bastian

--
Our way is peace.
-- Septimus, the Son Worshiper, "Bread and Circuses",
stardate 4040.7.



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 04:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org