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

Bug#492817: marked as done (g++-4.3: can't include cstddef - wrong include file order)



Your message dated Tue, 2 Dec 2008 00:30:58 +0100
with message-id <18740.29618.782161.689332@gargle.gargle.HOWL>
and subject line Re: Bug#492817: g++-4.3: can't include cstddef - wrong include file order
has caused the Debian Bug report #492817,
regarding g++-4.3: can't include cstddef - wrong include file order
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
492817: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492817
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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: '::ptrdiff_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: '::ptrdiff_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



--- End Message ---
--- Begin Message ---
Bastian Blank writes:
> 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.

[...]

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

no feedback, not reproducible, closing the report.


--- End Message ---

Reply to: