public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g++ cross distro compilation problem
@ 2011-01-19  0:39 Nick Stokes
  2011-01-19  0:57 ` Ian Lance Taylor
  2011-01-19  1:14 ` Jonathan Wakely
  0 siblings, 2 replies; 15+ messages in thread
From: Nick Stokes @ 2011-01-19  0:39 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-01-21 14:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-19  0:39 g++ cross distro compilation problem Nick Stokes
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

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).