This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: GCC on AIX Problem description


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


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