From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13833 invoked by alias); 20 Jan 2011 00:47:36 -0000 Received: (qmail 13824 invoked by uid 22791); 20 Jan 2011 00:47:35 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Jan 2011 00:47:31 +0000 Received: by iwn8 with SMTP id 8so40821iwn.20 for ; Wed, 19 Jan 2011 16:47:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.167.9 with SMTP id q9mr1800629icy.1.1295484448550; Wed, 19 Jan 2011 16:47:28 -0800 (PST) Received: by 10.42.230.66 with HTTP; Wed, 19 Jan 2011 16:47:28 -0800 (PST) In-Reply-To: References: Date: Thu, 20 Jan 2011 00:47:00 -0000 Message-ID: Subject: Re: g++ cross distro compilation problem From: Jonathan Wakely To: Nick Stokes Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg00302.txt.bz2 On 19 January 2011 23:27, Nick Stokes wrote: > > Ian, =A0you are right on. The versions are different: > compute node (where gcc is built): =A0/lib64/libc-2.5.so > login node (where gcc is used): =A0/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 sim= pler: does it make any difference if you define _GNU_SOURCE when compiling? That should ensure uselocale is defined by > When I configure with --enable-clocale=3Dgeneric 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.