This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems with building GCC-3.0 on AIX-4.3


hi all,

I am having problems with installing gcc-3.0 on AIX-4.3

I read that gmake was required to bootstrap gcc-3.0, so I tried
building that using xlcv4 but it failed. The error was something about
not being able to convert between int and char*. Since I did not have 
any GNU product installed, I did a binary installation of egcs-1.1.1.1
(This was the only one that I could find). I built gmake 3.79 and binutils
2.11.2 using this compiler. While building ld it gave a warning saying that 
GNU ld does not support shared libraries correctly on AIX and so libtool was
turning 
this feature off. 

I built gcc-3.0 using the same egcs compiler. The options given to configure
were
--enable-shared --enable-multilib --enable-threads=posix
--with-fast-fixincludes --enable-languages=c++ --disable-aix64

The compilation went off smoothly but while doing a make install. it aborted
saying it could not find
libgcc_s_ppc64.a and libgcc_s_pthread_ppc64.a . I circumvented this by
creating blank files by those names
to complete the install. This time the installation finished smoothly but
when I try to compile a simple hello world 
program 
#include <iostream>

using namespace std;

int main () {
   cout << "Hello, World";
   return 0;
   }

using gcc sam.cpp it gives the following linker errors

/tmp/cclGP9wM.o(.pr+0xf6):sam.cpp: undefined reference to `std::cout'
/tmp/cclGP9wM.o(.pr+0x2a4):sam.cpp: undefined reference to
`__cxa_begin_catch'
/tmp/cclGP9wM.o(.pr+0x328):sam.cpp: undefined reference to `__cxa_rethrow'
/tmp/cclGP9wM.o(.pr+0x338):sam.cpp: undefined reference to `__cxa_end_catch'
/tmp/cclGP9wM.o(.pr+0x348):sam.cpp: undefined reference to `__cxa_end_catch'
/tmp/cclGP9wM.o(.pr+0x564):sam.cpp: undefined reference to
`std::uncaught_exception()'
/tmp/cclGP9wM.o(.pr+0x1104):sam.cpp: undefined reference to
`std::ios_base::xalloc()'
/tmp/cclGP9wM.o(.pr+0x1150):sam.cpp: undefined reference to `operator
new(unsigned long)'
/tmp/cclGP9wM.o(.pr+0x1168):sam.cpp: undefined reference to
`std::_Format_cache<char>::_Format_cache()'
/tmp/cclGP9wM.o(.pr+0x11a8):sam.cpp: undefined reference to `operator
delete(void*)'
/tmp/cclGP9wM.o(.pr+0x11d4):sam.cpp: undefined reference to `operator
delete(void*)'
/tmp/cclGP9wM.o(.pr+0x11ec):sam.cpp: undefined reference to
`std::ios_base::register_callback(void (*)(std::ios_base::event, std::
ios_base&, int), int)'
/tmp/cclGP9wM.o(.pr+0x1494):sam.cpp: undefined reference to
`std::__throw_ios_failure(char const*)'
/tmp/cclGP9wM.o(.pr+0x15b4):sam.cpp: undefined reference to `operator
delete(void*)'
/tmp/cclGP9wM.o(.pr+0x16bc):sam.cpp: undefined reference to `operator
delete(void*)'
/tmp/cclGP9wM.o(.pr+0x16e0):sam.cpp: undefined reference to `operator
new(unsigned long)'
/tmp/cclGP9wM.o(.pr+0x16f8):sam.cpp: undefined reference to
`std::_Format_cache<char>::_Format_cache()'
/tmp/cclGP9wM.o(.pr+0x1734):sam.cpp: undefined reference to `operator
delete(void*)'
/tmp/cclGP9wM.o(.pr+0x1758):sam.cpp: undefined reference to `operator
delete(void*)'
/tmp/cclGP9wM.o(.pr+0x176c):sam.cpp: undefined reference to
`__cxa_begin_catch'
/tmp/cclGP9wM.o(.pr+0x1774):sam.cpp: undefined reference to
`__cxa_end_catch'
/tmp/cclGP9wM.o(.pr+0x17b8):sam.cpp: undefined reference to
`__cxa_call_unexpected'
/tmp/cclGP9wM.o(.pr+0x1aa0):sam.cpp: undefined reference to
`std::locale::~locale()'
/tmp/cclGP9wM.o(.pr+0x1abc):sam.cpp: undefined reference to
`std::locale::~locale()'
/tmp/cclGP9wM.o(.pr+0x1ba0):sam.cpp: undefined reference to
`__cxa_call_unexpected'
/tmp/cclGP9wM.o(.pr+0x1c70):sam.cpp: undefined reference to
`std::__throw_bad_cast()'
/tmp/cclGP9wM.o(.pr+0x2a9c):sam.cpp: undefined reference to
`__cxa_call_unexpected'
/tmp/cclGP9wM.o(.pr+0x2d88):sam.cpp: undefined reference to
`__cxa_call_unexpected'
/tmp/cclGP9wM.o(.pr+0x2e78):sam.cpp: undefined reference to
`__cxa_begin_catch'
/tmp/cclGP9wM.o(.pr+0x2e90):sam.cpp: undefined reference to `__cxa_rethrow'
/tmp/cclGP9wM.o(.pr+0x2ea0):sam.cpp: undefined reference to
`__cxa_end_catch'
/tmp/cclGP9wM.o(.pr+0x3016):sam.cpp: undefined reference to
`std::string::_Rep::_S_max_size'
/tmp/cclGP9wM.o(.pr+0x302c):sam.cpp: undefined reference to
`std::__throw_length_error(char const*)'
/tmp/cclGP9wM.o(.pr+0x317a):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/tmp/cclGP9wM.o(.pr+0x343e):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_node_allocator_lock'
/tmp/cclGP9wM.o(.pr+0x34c2):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_node_allocator_lock'
/tmp/cclGP9wM.o(.pr+0x358e):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/tmp/cclGP9wM.o(.pr+0x3826):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/tmp/cclGP9wM.o(.pr+0x3932):sam.cpp: undefined reference to
`std::__malloc_alloc_template<0>::__malloc_alloc_oom_handler'
/tmp/cclGP9wM.o(.pr+0x3948):sam.cpp: undefined reference to
`std::__throw_bad_alloc()'
/tmp/cclGP9wM.o(.pr+0x3a2e):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_end_free'
/tmp/cclGP9wM.o(.pr+0x3a32):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3a56):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3a62):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3a66):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3abe):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3aca):sam.cpp: more undefined references to
`std::__default_alloc_template<true, 0>::_S_start_free' follow
/tmp/cclGP9wM.o(.pr+0x3af2):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_heap_size'
/tmp/cclGP9wM.o(.pr+0x3b36):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/tmp/cclGP9wM.o(.pr+0x3b42):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3b56):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3b66):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3b7e):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3bba):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/tmp/cclGP9wM.o(.pr+0x3bee):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3bfa):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_end_free'
/tmp/cclGP9wM.o(.pr+0x3bfe):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3c36):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_end_free'
/tmp/cclGP9wM.o(.pr+0x3c42):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3c56):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_heap_size'
/tmp/cclGP9wM.o(.pr+0x3c5a):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_heap_size'
/tmp/cclGP9wM.o(.pr+0x3c6e):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_end_free'
/tmp/cclGP9wM.o(.pr+0x3c72):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.pr+0x3d44):sam.cpp: undefined reference to
`std::ios_base::Init::Init()'
/tmp/cclGP9wM.o(.pr+0x3de4):sam.cpp: undefined reference to
`std::ios_base::Init::~Init()'
/tmp/cclGP9wM.o(.pr+0x4548):sam.cpp: undefined reference to
`std::locale::locale(std::locale const&)'
/tmp/cclGP9wM.o(.pr+0x45fc):sam.cpp: undefined reference to
`std::ios_base::_M_grow_words(int)'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to `std::cout'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::string::_Rep::_S_max_size'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_node_allocator_lock'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::__malloc_alloc_template<0>::__malloc_alloc_oom_handler'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_end_free'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_start_free'
/tmp/cclGP9wM.o(.tc+0x0):sam.cpp: undefined reference to
`std::__default_alloc_template<true, 0>::_S_heap_size'
/tmp/cclGP9wM.o(.rw+0x19e):sam.cpp: undefined reference to
`__gxx_personality_v0'
/tmp/cclGP9wM.o(.rw+0x0):sam.cpp: undefined reference to `vtable for
__cxxabiv1::__class_type_info'
collect2: ld returned 1 exit status

If however I compile the same program using g++ it creates an executable
which gives a segmentation fault and dumps core when executed.

Any ideas where I went wrong??

Arun Saini


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]