This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ cross distro compilation problem
On 19 January 2011 23:27, Nick Stokes wrote:
>
> Ian, ?you are right on. The versions are different:
> compute node (where gcc is built): ?/lib64/libc-2.5.so
> login node (where gcc is used): ?/lib64/libc-2.11.2.so
>
> Jonathan, I looked at the config.logs (attached). Both seem to use gnu.
Yes, both your distros have a new enough glibc, so the problem might be simpler:
does it make any difference if you define _GNU_SOURCE when compiling?
That should ensure uselocale is defined by <locale.h>
> When I configure with --enable-clocale=generic it indeed remedies the
> issue and g++ works without errors. Are the any serious implications
> of not using gnu model? (any performance issues, or anything like that
> sort?)
The GNU model, which requires glibc 2.3 or later, supports a
per-thread locale (via the uselocale function) so that the locale can
be changed temporarily by the C++ runtime library without affecting
the global process-wide locale. I believe this avoids possible race
conditions in multithreaded programs which make use of locales.