This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ cross distro compilation problem


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]