public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nick Stokes <randomaccessiterator@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: g++ cross distro compilation problem
Date: Wed, 19 Jan 2011 00:39:00 -0000	[thread overview]
Message-ID: <AANLkTi=Et26_0c0sU4S+6b-cA_=YXA2_Mt0tiN3VUTsd@mail.gmail.com> (raw)

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  the 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/../../../../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
/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: invalid type in declaration before ';' token
/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:
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/../../../../include/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/../../../../include/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=/opt/gcc/4.4.3/
--with-mpfr=/opt/mpfr/2.4.2/gcc --with-gmp=/opt/gmp/4.3.2/gcc
--with-ppl=/opt/ppl/0.10.2/gcc --with-cloog=/opt/cloog/0.15.7/gcc
--disable-multilib --enable-languages=c,c++,fortran --disable-nls
Thread model: posix
gcc version 4.4.3 (GCC)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic'
 /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=generic
-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/../../../../x86_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/../../../../include/c++/4.4.3
 /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
 /opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/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=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d9a923d3ec89f59cc1ff5d5c3485c6c4
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
/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: invalid type in declaration before ';' token
/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:
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/../../../../include/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/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:97:
error: '__gnu_cxx::__uselocale' cannot be used as a function

             reply	other threads:[~2011-01-19  0:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19  0:39 Nick Stokes [this message]
2011-01-19  0:57 ` Ian Lance Taylor
2011-01-19  1:14 ` Jonathan Wakely
2011-01-19  1:17   ` Jonathan Wakely
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='AANLkTi=Et26_0c0sU4S+6b-cA_=YXA2_Mt0tiN3VUTsd@mail.gmail.com' \
    --to=randomaccessiterator@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /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).