From: "I. Lange" <i.lange@tu-bs.de>
Subject: gcc 2.95.3, problem with ld on alphaev6-dec-osf5.1
Date: Tue, 09 Dec 2003 17:23:18 +0100 [thread overview]
Message-ID: <br4svs$kls$1@rzcomm2.rz.tu-bs.de> (raw)
Dear GNU g++ folks,
I need to use the old gcc 2.95.3 on
"alphaev6-dec-osf5.1" to build some TAU components
and have installed it into gcc-2.95.3.targ, apart from
/usr/local/bin where gcc 3.0.4 is located.
Could anyone tell me how to configure it
with the system linker ld ?
(gnu ld must not be used)
I get serious errors when I try to build
a simple c++ example program, which
includes <string> and <iostream>:
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
string s(10, 'A'); // Create a string of ten A's.
cout << s << endl; // Print it.
return 0;
}
The error message is
/bin/ld:
Unresolved:
cout
...
when I call g++ with no options, and
/bin/ld:
Object file format error in: ../gcc-2.95.3.targ/lib: read_cur_obj_info: File is not a regular file
collect2: ld returned 1 exit status
when I specify -L /.../gcc-2.95.3.targ/lib.
When I use gcc 3.0.4 (with PATH=...:/usr/local/bin:...),
everything works fine
Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4/specs
Configured with: ../gcc-3.0.4/configure
Thread model: single
gcc version 3.0.4
/usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem=unix -Asystem=xpg4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu=alpha -Amachine=alpha -D__alpha -D__alpha__ -D__alpha_ev4__ -Acpu=ev4 -D__X_FLOAT a.cpp -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase a.cpp -version -o /tmp/ccV4rS24.s
GNU CPP version 3.0.4 (cpplib)
GNU C++ version 3.0.4 (alpha-dec-osf5.1)
compiled by GNU C version 3.0.4.
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/alpha-dec-osf5.1/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++-v3
/usr/local/include/g++-v3/alpha-dec-osf5.1
/usr/local/include/g++-v3/backward
/usr/local/include
/usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4/include
/usr/include
End of search list.
as -g -oldas -c -nocpp -O0 -o /tmp/ccgD8PNJ.o /tmp/ccV4rS24.s
/usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4/mips-tfile -v -o /tmp/ccgD8PNJ.o /tmp/ccV4rS24.s
mips-tfile version 3.0.4
/usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4/collect2 -G 8 -O1 -call_shared -o a3 /usr/lib/cmplrs/cc/crt0.o -L/usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4 -L/usr/lib/cmplrs/cc -L/usr/local/lib/gcc-lib/alpha-dec-osf5.1/3.0.4/../../.. /tmp/ccgD8PNJ.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
The complete output from 2.95.3 is
> g++ -v a.cpp
Reading specs from /home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/specs
gcc version 2.95.3 20010315 (release)
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -D__EXCEPTIONS -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev6__ -Acpu(ev6) -D__alpha_bwx__ -Acpu(bwx) -D__alpha_max__ -Acpu(max) -D__alpha_fix__ -Acpu(fix) a.cpp /tmp/ccILSBOS.ii
GNU CPP version 2.95.3 20010315 (release)
#include "..." search starts here:
#include <...> search starts here:
/home/ilange/app/local/tau/gcc-2.95.3.targ/usr/local/include/g++
/home/ilange/app/local/tau/gcc-2.95.3.targ/usr/local/include
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/../../../../alphaev6-dec-osf5.1/include
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/cc1plus /tmp/ccILSBOS.ii -quiet -dumpbase a.cc -version -o /tmp/cchBJi3M.s
GNU C++ version 2.95.3 20010315 (release) (alphaev6-dec-osf5.1) compiled by GNU C version 2.95.3 20010315 (release).
/home/ilange/app/local/tau/gcc-2.95.3.targ/as -g -nocpp -O0 -o /tmp/ccUcbX0d.o /tmp/cchBJi3M.s
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/mips-tfile -v -o /tmp/ccUcbX0d.o /tmp/cchBJi3M.s
mips-tfile version 2.95.3 20010315 (release)
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/collect2 -G 8 -O1 -call_shared -o a2 /usr/lib/cmplrs/cc/crt0.o -L/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3 -L/usr/lib/cmplrs/cc -L/home/ilange/app/local/tau/gcc-2.95.3.targ/lib /tmp/ccUcbX0d.o -lstdc++ -lm -lgcc -lc -lgcc
/bin/ld:
Unresolved:
cout
endl(ostream &)
ostream::operator<<(ostream &(*)(ostream &))
__malloc_alloc_template<0>::__malloc_alloc_oom_handler
cerr
ostream::operator<<(char const *)
__default_alloc_template<false, 0>::_S_end_free
__default_alloc_template<false, 0>::_S_start_free
__default_alloc_template<false, 0>::_S_heap_size
__default_alloc_template<false, 0>::_S_free_list
__out_of_range(char const *)
__length_error(char const *)
ostream::write(char const *, long)
basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> >::nilRep
string_char_traits<char>::copy(char *, char const *, unsigned long)
string_char_traits<char>::set(char *, char const &, unsigned long)
string_char_traits<char>::move(char *, char const *, unsigned long)
collect2: ld returned 1 exit status
or
> g++ -v -L /.../gcc-2.95.3.targ/lib
Reading specs from /home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/specs
gcc version 2.95.3 20010315 (release)
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -D__EXCEPTIONS -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev6__ -Acpu(ev6) -D__alpha_bwx__ -Acpu(bwx) -D__alpha_max__ -Acpu(max) -D__alpha_fix__ -Acpu(fix) a.cpp /tmp/ccDBpOaZ.ii
GNU CPP version 2.95.3 20010315 (release)
#include "..." search starts here:
#include <...> search starts here:
/home/ilange/app/local/tau/gcc-2.95.3.targ/usr/local/include/g++
/home/ilange/app/local/tau/gcc-2.95.3.targ/usr/local/include
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/../../../../alphaev6-dec-osf5.1/include
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/cc1plus /tmp/ccDBpOaZ.ii -quiet -dumpbase a.cc -version -o /tmp/ccBpHIGc.s
GNU C++ version 2.95.3 20010315 (release) (alphaev6-dec-osf5.1) compiled by GNU C version 2.95.3 20010315 (release).
/home/ilange/app/local/tau/gcc-2.95.3.targ/as -g -nocpp -O0 -o /tmp/ccBXXJNc.o /tmp/ccBpHIGc.s
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/mips-tfile -v -o /tmp/ccBXXJNc.o /tmp/ccBpHIGc.s
mips-tfile version 2.95.3 20010315 (release)
/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/collect2 -G 8 -O1 -call_shared -o a2_lib /usr/lib/cmplrs/cc/crt0.o -L ../gcc-2.95.3.targ/lib -L/home/ilange/app/local/tau/gcc-2.95.3.targ/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3 -L/usr/lib/cmplrs/cc -L/home/ilange/app/local/tau/gcc-2.95.3.targ/lib /tmp/ccBXXJNc.o -lstdc++ -lm -lgcc -lc -lgcc
/bin/ld:
Object file format error in: ../gcc-2.95.3.targ/lib: read_cur_obj_info: File is not a regular file
collect2: ld returned 1 exit status
Any ideas, especially why 3.0.4 links with
-lgcc_s -lgcc -lc -lgcc_s -lgcc ... ?
Ingolf Lange
--
User Support * Computing Center of TU Braunschweig
Hans-Sommer-Str. 65 * 38106 Braunschweig * Germany
Phone (+(+49)531) 391-5560 * Secretariat -5510
next reply other threads:[~2003-12-09 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 16:23 I. Lange [this message]
2003-12-11 10:04 ` attempt to link manually by invoking collect2; __ldr_data and __Argv unresolved I. Lange
2003-12-11 15:34 ` Paul Pluzhnikov
2003-12-16 13:59 ` Who uses gcc 2.95.3 on alpha*-dec-osf* and is willed to supply the link line (g++ -v) ?? I. Lange
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox