From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18480 invoked by alias); 19 Jan 2011 00:39:37 -0000 Received: (qmail 18469 invoked by uid 22791); 19 Jan 2011 00:39:35 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL 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; Wed, 19 Jan 2011 00:39:29 +0000 Received: by iwn8 with SMTP id 8so253820iwn.20 for ; Tue, 18 Jan 2011 16:39:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.10.200 with SMTP id q8mr6407ibq.122.1295397567642; Tue, 18 Jan 2011 16:39:27 -0800 (PST) Received: by 10.231.152.143 with HTTP; Tue, 18 Jan 2011 16:39:27 -0800 (PST) Date: Wed, 19 Jan 2011 00:39:00 -0000 Message-ID: Subject: g++ cross distro compilation problem From: Nick Stokes To: 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/msg00267.txt.bz2 Dear all: I have very specific trouble with building GCC for our compute clusters. Our setup is a fairly common compute cluster environment, where users login to a front-end and compile their codes. Then they submit to a batch queue to run them on =A0the compute nodes. This is not exactly a cross compilation problem as the hardware on the compute nodes and the login node are fairly similar (both x86_64). The particular GNU/Linux distro on them, however, don't match (a fact we unfortunately can do nothing about). The login node runs OpenSUSE 11.3, and the compute nodes are CentOS 5.5. (and these are upgraded time and again) The current distro versions of GCC (4.5.0 for login, and 4.1.2 for computes) are incompatible and insufficient anyway since we need to maintain multiple versions of GCC to address user needs. The idea was to install all of 4.3, 4.4 and 4.5 versions on different prefixes (/opt/gcc/4.3, /opt/gcc/4.4 and /opt/gcc/4.5, respectively) and NFS mount these on the login node for users. 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/../../../../in= clude/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/../../../../in= clude/c++/4.4.3/ios:42, from /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/ostream:40, from /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/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/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52: error: 'uselocale' was not declared in this scope /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52: error: invalid type in declaration before ';' token /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h: In function 'int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)': /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:72: error: '__gnu_cxx::__uselocale' cannot be used as a function /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:97: error: '__gnu_cxx::__uselocale' cannot be used as a function I'd be very grateful for any help on identifying/fixing this problem. More details follow. Thanks a million!! - Nick * C and Fortran compilers seem to work fine. * The error is similar (identical except the version numbers) with 4.5.2 . I haven't tested other versions yet. * The above failing compilation with the -v flag shows: Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=3D/opt/gcc/4.4.3/ --with-mpfr=3D/opt/mpfr/2.4.2/gcc --with-gmp=3D/opt/gmp/4.3.2/gcc --with-ppl=3D/opt/ppl/0.10.2/gcc --with-cloog=3D/opt/cloog/0.15.7/gcc --disable-multilib --enable-languages=3Dc,c++,fortran --disable-nls Thread model: posix gcc version 4.4.3 (GCC) COLLECT_GCC_OPTIONS=3D'-v' '-shared-libgcc' '-mtune=3Dgeneric' /opt/gcc/4.4.3/libexec/gcc/x86_64-unknown-linux-gnu/4.4.3/cc1plus -quiet -v -iprefix /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/ -D_GNU_SOURCE main.cpp -quiet -dumpbase main.cpp -mtune=3Dgeneric -auxbase main -version -o /tmp/ccsQ5LGF.s ignoring nonexistent directory "/opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../x= 86_64-unknown-linux-gnu/include" ignoring duplicate directory "/opt/gcc/4.4.3/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.3= /../../../../include/c++/4.4.3" ignoring duplicate directory "/opt/gcc/4.4.3/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.3= /../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu" ignoring duplicate directory "/opt/gcc/4.4.3/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.3= /../../../../include/c++/4.4.3/backward" ignoring duplicate directory "/opt/gcc/4.4.3/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.3= /include" ignoring duplicate directory "/opt/gcc/4.4.3/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.3= /include-fixed" ignoring nonexistent directory "/opt/gcc/4.4.3/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.3= /../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../i= nclude/c++/4.4.3 /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../i= nclude/c++/4.4.3/x86_64-unknown-linux-gnu /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../i= nclude/c++/4.4.3/backward /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/include /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/include-fixed /usr/local/include /opt/gcc/4.4.3/bin/../lib/gcc/../../include /usr/include End of search list. GNU C++ (GCC) version 4.4.3 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version 2.4.2. GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 Compiler executable checksum: d9a923d3ec89f59cc1ff5d5c3485c6c4 In file included from /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/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/../../../../in= clude/c++/4.4.3/ios:42, from /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/ostream:40, from /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/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/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52: error: 'uselocale' was not declared in this scope /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52: error: invalid type in declaration before ';' token /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h: In function 'int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)': /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:72: error: '__gnu_cxx::__uselocale' cannot be used as a function /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../in= clude/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:97: error: '__gnu_cxx::__uselocale' cannot be used as a function