From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11850 invoked by alias); 23 Sep 2003 18:34:02 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 11782 invoked from network); 23 Sep 2003 18:33:58 -0000 Received: from unknown (HELO boal.inviosoftware.com) (65.193.229.109) by sources.redhat.com with SMTP; 23 Sep 2003 18:33:58 -0000 Received: from inviosoftware.com (IDENT:pruvolo@localhost [127.0.0.1]) by boal.inviosoftware.com (8.11.6/8.11.6) with ESMTP id h8NIXsE11845 for ; Tue, 23 Sep 2003 11:33:54 -0700 Message-ID: <3F709212.4060803@inviosoftware.com> Date: Tue, 23 Sep 2003 18:34:00 -0000 From: Paul Ruvolo User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: AIX 4.3.3 - Undefined Symbols while building STLPort - GCC 3.2.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-09/txt/msg00273.txt.bz2 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::_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::_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