public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernd Jendrissek <bernd.jendrissek@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: g++ not finding <stddef.h> via <cstddef>
Date: Sat, 09 Aug 2008 02:25:00 -0000	[thread overview]
Message-ID: <20080809010823.GA24637@prism.co.za> (raw)

I was chasing down why gettext wouldn't build and found CXX= : in one of
its generated Makefiles, and it turns out g++ can't see <cstddef> whilst
it *can* see <stddef.h>.  gcc can also see <stddef.h>

Can anyone tell me in what way exactly my system is misconfigured, and
what I can do to make #include <cstddef> work?

[On my system, /usr/local is a symlink to /home/newdisk/usr-local, hence
the funny paths being visible.]

berndj@localhost:/tmp$ cat /tmp/foo.cpp
#include <stddef.h>

int main()
{
}
berndj@localhost:/tmp$ g++ -v /tmp/foo.cpp -o /tmp/a.out
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3.1/configure --enable-__cxa_atexit --enable-shared --disable-static --with-gxx-include-dir=/usr/local/include/c++/4.3.1 --enable-languages=c,c++,fortran,objc,treelang
Thread model: posix
gcc version 4.3.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-o' '/tmp/a.out' '-shared-libgcc' '-mtune=generic'
 /home/newdisk/usr-local/bin/../libexec/gcc/i686-pc-linux-gnu/4.3.1/cc1plus -quiet -v -iprefix /home/newdisk/usr-local/bin/../lib/gcc/i686-pc-linux-gnu/4.3.1/ -D_GNU_SOURCE /tmp/foo.cpp -quiet -dumpbase foo.cpp -mtune=generic -auxbase foo -version -o /tmp/ccpO11fe.s
ignoring nonexistent directory "/home/newdisk/usr-local/bin/../lib/gcc/i686-pc-linux-gnu/4.3.1/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "/home/newdisk/usr-local/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.3.1/include"
ignoring duplicate directory "/home/newdisk/usr-local/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.3.1/include-fixed"
ignoring nonexistent directory "/home/newdisk/usr-local/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.3.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/newdisk/usr-local/bin/../lib/gcc/i686-pc-linux-gnu/4.3.1/include
 /home/newdisk/usr-local/bin/../lib/gcc/i686-pc-linux-gnu/4.3.1/include-fixed
 /home/newdisk/usr-local/bin/../lib/gcc/../../include/c++/4.3.1
 /home/newdisk/usr-local/bin/../lib/gcc/../../include/c++/4.3.1/i686-pc-linux-gnu
 /home/newdisk/usr-local/bin/../lib/gcc/../../include/c++/4.3.1/backward
 /usr/local/include
 /usr/include
End of search list.
GNU C++ (GCC) version 4.3.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.1, GMP version 4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113195
Compiler executable checksum: 43dc44fca57738655f9116114f886dc1
In file included from /tmp/foo.cpp:1:
/home/newdisk/usr-local/bin/../lib/gcc/../../include/c++/4.3.1/cstddef:48:25: error: stddef.h: No such file or directory
In file included from /tmp/foo.cpp:1:
/home/newdisk/usr-local/bin/../lib/gcc/../../include/c++/4.3.1/cstddef:55: error: '::ptrdiff_t' has not been declared
/home/newdisk/usr-local/bin/../lib/gcc/../../include/c++/4.3.1/cstddef:56: error: '::size_t' has not been declared

The only [excluding those in directories for other versions & targets of
GCC] <stddef.h> on my system are:

/usr/include/linux/stddef.h
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.1/include/stddef.h

TIA

             reply	other threads:[~2008-08-09  1:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09  2:25 Bernd Jendrissek [this message]
2008-08-11 18:30 ` Bernd Jendrissek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080809010823.GA24637@prism.co.za \
    --to=bernd.jendrissek@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).