This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC on AIX Problem description
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: "Markus dot Schaeffer at ceay dot org" <Markus dot Schaeffer at ceay dot org>, Paul Pluzhnikov <ppluzhnikov-nsp at charter dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 31 Mar 2004 16:26:03 -0500
- Subject: Re: GCC on AIX Problem description
- References: <OFC1256E68.006A648F-ONC1256E68.006A648F@np-gmbh.com> <406DC0D4.80708@ceay.org> <406DCBF7.5000309@ceay.org>
>>>>> Markus Schaeffer@ceay org writes:
>> [aix3]$ ./superman
>> exec(): 0509-036 Cannot load program ./superman because of the
>> following errors:
>> 0509-130 Symbol resolution failed for ./lib/libxerces-c1_6_0.a
>> because:
>> 0509-136 Symbol
>> _GLOBAL__F__ZNSt12__basic_fileIcEC2EP15pthread_mutex_t (number 151) is
>> not exported from
>> dependent module
>> /pkg/tools/compiler/gcc/lib/libstdc++.a(libstdc++.so.5).
> It sounds like you are using different libstdc++.a at link time
> and at runtime.
This definitely is a problem of linking against a different shared
library multilib than the one used at runtime.
The libxerces-c1_6_0.a library appears to have been built and
linked with -pthread option, but superman may not have been built that
way. -pthread uses .../lib/pthread/libstdc++.a, for wherever GCC was
installed. .../lib/pthread/libstdc++.a has pthread_mutex_t symbols,
.../lib/libstdc++.a does not.
AIX does not have weak bindings of pthread functions for
non-pthread applications. One has to use -pthread consistently.
Either superman was compiled and linked differently, so the
built-in runtime LIBPATH is wrong, or the LIBPATH environment variable
explicitly is set and overriding the application LIBPATH to point to the
default shared library installation directory instead of the one
appropriate for the application.
David