public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Nick Stokes <randomaccessiterator@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: g++ cross distro compilation problem
Date: Wed, 19 Jan 2011 01:17:00 -0000	[thread overview]
Message-ID: <AANLkTimBYmGvfLcvfwQkVf8zYhXKQGmO6QL6b8pFGeG_@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin_+kmTJ8_45azsx1KaZEnCXFGf7A4VwCZZW90z@mail.gmail.com>

On 19 January 2011 01:14, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 19 January 2011 00:39, Nick Stokes  wrote:
>>
>> We stage the compilers, install, and test them on the compute nodes.
>> Everything seems ok. But on the login node the C++ compiler spits out
>> the following errors (for a simple hello world program):
>>
>> $ g++ hello.cpp
>> In file included from
>> /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/localefwd.h:42,
>>                 from
>> /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/ios:42,
>>                 from
>> /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/ostream:40,
>>                 from
>> /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/iostream:40,
>>                 from main.cpp:1:
>> /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52:
>> error: 'uselocale' was not declared in this scope
>
> This indicates that the compiler was built on a system which had the
> necessary pieces for the C++ runtime library to be configured with
> --enable-clocale=gnu (it will be used automatically if configure
> detects it is supported)
>
> Apparently on the system where it's installed something is missing.
> Probably something in glibc, as Ian suggests.

I would try to build gcc on both systems, with the same options, and
compare the $TARGET/libstdc++-v3/config.log files to see what choice
of locale model is used.

I expect you'll find a difference.  You could force the basic model to
be used with --enable-clocale=generic, which should work the same
everywhere.  Ideally though you'd want to find out why the gnu model
doesn't work, and fix that.

  reply	other threads:[~2011-01-19  1:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19  0:39 Nick Stokes
2011-01-19  0:57 ` Ian Lance Taylor
2011-01-19  1:14 ` Jonathan Wakely
2011-01-19  1:17   ` Jonathan Wakely [this message]
2011-01-19 23:27     ` Nick Stokes
2011-01-20  0:47       ` Jonathan Wakely
2011-01-20 15:53         ` Nick Stokes
2011-01-20 16:40           ` Jonathan Wakely
2011-01-20 19:29             ` Nick Stokes
2011-01-20 19:58               ` Jonathan Wakely
2011-01-20 20:01                 ` Jonathan Wakely
2011-01-21  0:57                   ` Nick Stokes
2011-01-21  2:03                     ` Nick Stokes
2011-01-21  9:16                       ` Jonathan Wakely
2011-01-21 14:35                         ` Nick Stokes

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=AANLkTimBYmGvfLcvfwQkVf8zYhXKQGmO6QL6b8pFGeG_@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=randomaccessiterator@gmail.com \
    /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).