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: AIX 4.3.3 - Undefined Symbols while building STLPort - GCC 3.2.2


Disregard this. This has been traced back to a problem with STL port, not GCC.

Paul Ruvolo wrote:

I am trying to build STLPort on AIX 4.3.3. I have successfully built this package on AIX 5.1 (using GCC 3.2.2 as well).

On both machines I am using the native linker

Aix 4.3.3 -
./gcc -v
Configured with: ../gcc-3.2.2/configure --prefix=/usr/local/fbe/2.0 --with-stabs --enable-shared --enable-threads=posix --without-gnu-as --with-as=/usr/bin/as
Thread mode: aix
gcc version 3.2.2


Aix 5.1 -
./gcc -v
Same as above

When I try to compile STLPort there is a crucial difference between what happens on AIX 5.1 and 4.3.3

4.3.3 -
/usr/local/fbe/2.0/bin/g++ -pthread -fexceptions -I../stlport -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32 -D_REENTRANT -D__EXTENSIONS__ -O -fPIC dll_main.cpp -c -o ../lib/obj/GCC-AIX/ReleaseD/dll_main.o


Note: note warning are generated by above step
Alos, I am pretty sure that D_REENTRANT isn't required on AIX, but it is there nevertheless.


5.1 -
/usr/local/fbe/2.0/bin/g++ -fexceptions -I../stlport -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32 -D_REENTRANT -D__EXTENSIONS__ -O -fPIC dll_main.cpp -c -o ../lib/obj/GCC-AIX/ReleaseD/dll_main.o
../stlport/stl/_threads.c: In instantiation of `_STL::_STLP_mutex_base _STL::_Swap_lock_struct<0>::_S_swap_lock':
../stlport/stl/_threads.h:459: instantiated from here
../stlport/stl/_threads.c:48: warning: aggregate has a partly bracketed
initializer
../stlport/stl/_alloc.c: In instantiation of `_STL::_STLP_mutex_base _STL::_Node_Alloc_Lock<false, 0>::_S_lock':
../stlport/stl/_alloc.c:131: instantiated from `_STL::_Node_Alloc_Lock<__threads, __inst>::_Node_Alloc_Lock() [with bool __threads = false, int __inst = 0]'
../stlport/stl/_alloc.c:156: instantiated from `static void* _STL::__node_alloc<__threads, __inst>::_M_allocate(long unsigned int) [with bool __threads = false, int __inst = 0]'
dll_main.cpp:150: instantiated from here
../stlport/stl/_alloc.c:298: warning: aggregate has a partly bracketed
initializer
../stlport/stl/_alloc.c: In instantiation of `_STL::_STLP_mutex_base _STL::_Node_Alloc_Lock<true, 0>::_S_lock':
../stlport/stl/_alloc.c:131: instantiated from `_STL::_Node_Alloc_Lock<__threads, __inst>::_Node_Alloc_Lock() [with bool __threads = true, int __inst = 0]'
../stlport/stl/_alloc.c:156: instantiated from `static void* _STL::__node_alloc<__threads, __inst>::_M_allocate(long unsigned int) [with bool __threads = true, int __inst = 0]'
dll_main.cpp:151: instantiated from here
../stlport/stl/_alloc.c:298: warning: aggregate has a partly bracketed
initializer


Notice all the warning generated. This turns out to be a good thing because I believe this is what is allowing AIX 5.1 to define the following symbol, while 4.3.3 fails to do some.

nm -C dll_main.o | grep Node_Alloc
_ZN4_STL16_Node_Alloc_LockILb1ELi0EE7_S_lockE   U   -
_ZN4_STL16_Node_Alloc_LockILb1ELi0EE7_S_lockE   d   83260      4

AIX 5.1 - nm -C dll_main.o | grep Node_Alloc
_ZN4_STL16_Node_Alloc_LockILb1Eli0EE7_S_lockE    D   72980
_ZN4_STL16_Node_Alloc_LockILb1Eli0EE7_S_LockE    U   -
_ZN4_STL16_Node_Alloc_LockILb1Eli0EE7_S_LockE    d   83984


When I try to link a helloWorld program on Aix 4.3.3 it fails with the following message


ERROR: Undefined symbol: _STL::_Node_Alloc_Lock<(bool)1, (int)0>::_S_lock

A side note is that I installed GNUPro 2.95 to get more information. When I compile dll_main.cpp with GNUPro the Node_Alloc symbol is defined as expected. I have other reasons for not wanting to using GNUPro as my final choice for compiler, so I need to get GCC 3.2.2 working.

FYI, I applied *APAR* IY26685 to my AIX 4.3.3 system.

I can't seem to nail this down.

Thanks,
Paul




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