Re: IBM AIX: ERROR: Undefined symbol basic_ostream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Andrew Haley <aph@xxxxxxxxxx> wrote:

> I'm asking you poltely: please don't top-post!!!
> 
> Kaushik Chakraborty writes:
>  > No I did not install it myself, it was already
>  > installed.
>  > 
>  > GCC, we most probably would have got it from gnu
>  > website. 
>  > 
>  > No particular reason for using 4.0.0
>  > this is what it shows! when I say,
>  > 
>  > $>gcc -v
>  > Using built-in specs.
>  > Target: powerpc-ibm-aix5.3.0.0
>  > Configured with: ../configure
> --with-as=/usr/bin/as
>  > --with-ld=/usr/bin/ld --disable-nls --enable-lan
>  > guages=c,c++ --prefix=/opt/freeware
> --enable-threads
>  > --enable-version-specific-runtime-libs --host=p
>  > owerpc-ibm-aix5.3.0.0
>  > Thread model: aix
>  > gcc version 4.0.0
> 
> If I were you, at this point I'd re-install. 
> Something is very wrong
> with the installation.  I'd find a more recent
> version, too.
> 
> Andrew.
> 
>  > --- Andrew Haley <aph@xxxxxxxxxx> wrote:
>  > 
>  > > Please don't top-post.
>  > > 
>  > > Kaushik Chakraborty writes:
>  > >  > Andrew wrote:
>  > >  > > Your gcc isn't properly installed.  You
> need to
>  > > make
>  > >  > > sure you have g++
>  > >  > > and libstdc++ from the same release.
>  > >  > 
>  > >  > When you say your gcc isn't properly
> installed,
>  > > if could you please
>  > >  > clarify on that. As already mentioned I am
> using
>  > > gcc (version
>  > >  > 4.0.0).
>  > >  > 
>  > >  > I believe, both g++ and libstdc++ are
> installed
>  > > from the same
>  > >  > release, if there is any way to verify the
> same.
>  > > 
>  > > Not really, no.  It depends on where you got
> them
>  > > from.  Find that
>  > > out and we can proceed.  Did you install it
>  > > yourself?
>  > > 
>  > > I'm guessing that either there is an
> incompatibility
>  > > with the
>  > > versions, or that the compiler and libs were
> built
>  > > with a different OS
>  > > release.
>  > > 
>  > > Out of interest, why are you using 4.0.0?
>  > > 
>  > > Andrew.
>  > > 
>  > > 
>  > >  > --- Andrew Haley <aph@xxxxxxxxxx> wrote:
>  > >  > 
>  > >  > > Kaushik Chakraborty writes:
>  > >  > >  > I can compile a hello world program. 
>  > >  > >  > $> cat hello.cc 
>  > >  > >  > #include <iostream> 
>  > >  > >  > 
>  > >  > >  > int main(int argc, char *argv[]) 
>  > >  > >  > { 
>  > >  > >  >   printf("Hello, world!\n"); 
>  > >  > >  >   std::cout << "Hello, world!\n"; 
>  > >  > >  > } 
>  > >  > >  > 
>  > >  > >  > $> g++ -c hello.cc 
>  > >  > >  > 
>  > >  > >  > $> ls -l hello.o 
>  > >  > >  > -rw-r--r-- 1 xxxxxxxx xxxxxxx 2528 11
> Dec
>  > > 12:23
>  > >  > >  > hello.o 
>  > >  > >  > 
>  > >  > >  > I can't link the hello world program. 
>  > >  > >  > 
>  > >  > >  > $> g++ -o hello hello.o 
>  > >  > >  > 
>  > >  > >  > throws me this error, 
>  > >  > >  > 
>  > >  > >  > ld: 0711-317 ERROR: Undefined symbol:
>  > >  > >  > .std::basic_ostream<char,
>  > > std::char_traits<char>
>  > >  > > >&
>  > >  > >  > std::opera 
>  > >  > >  > tor<< <std::char_traits<char>
>  > >  > >  > >(std::basic_ostream<char,
>  > > std::char_traits<char>
>  > >  > > >&,
>  > >  > >  > char const*) 
>  > >  > >  > ld: 0711-345 Use the -bloadmap or
> -bnoquiet
>  > >  > > option to
>  > >  > >  > obtain more information. 
>  > >  > >  > collect2: ld returned 8 exit status 
>  > >  > >  > 
>  > >  > >  > I am using following gcc version, 
>  > >  > >  > 
>  > >  > >  > gcc version 4.0.0 
>  > >  > >  > 
>  > >  > >  > I am on AIX5.3 box and "ld" version is
> LD
>  > > 1.64
>  > >  > >  > (08/19/2003)
>  > >  > >  > 
>  > >  > >  > I do have libstdc++.a present in my
> system
>  > > and I
>  > >  > > even
>  > >  > >  > tried building linking the library as, 
>  > >  > >  > 
>  > >  > >  > $> g++ -o hello hello.o -L/usr/lib
> -lstdc++ 
>  > >  > >  > 
>  > >  > >  > but eventually it gives me the same
> error. 
>  > >  > >  > 
>  > >  > >  > Help from anyone would be appreciated.
>  > >  > > 
>  > >  > > Your gcc isn't properly installed.  You
> need to
>  > > make
>  > >  > > sure you have g++
>  > >  > > and libstdc++ from the same release.
>  > >  > > 
>  > >  > > Andrew.
>  > >  > > 
>  > >  > 
>  > >  > 
>  > >  >
>  > >

Andrew thanks for your suggestions ... Got GCC 4.1.1
installed on the AIX box and the linking problem seems
to have gone.

The other thing being I getting these new errors, if
you could please suggest anything on these,

ld: 0711-224 WARNING: Duplicate symbol: .global
destructors keyed to thread_creds_t
ld: 0711-224 WARNING: Duplicate symbol: .global
constructors keyed to thread_creds_t
ld: 0711-224 WARNING: Duplicate symbol: thread_creds_t
ld: 0711-224 WARNING: Duplicate symbol: global
constructors keyed to thread_creds_t
ld: 0711-224 WARNING: Duplicate symbol: global
destructors keyed to thread_creds_t
ld: 0711-345 Use the -bloadmap or -bnoquiet option to
obtain more information.

Kaushik

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux