David, any ideas about this one? On 26 October 2012 14:01, Rick Springob <rspringob@xxxxxxxxx> wrote: > On Thu, Oct 18, 2012 at 4:08 PM, Rick Springob <rspringob@xxxxxxxxx> wrote: >> I need to use an older version of gcc in order to help debug an old, >> released build. We will also run new builds with gcc-4.3.5 for >> compatibility reasons. The original build machine is toast. I am >> working in a newly provisioned machine running AIX 6.1. The gcc-4.3.5 >> that is available via rpm uses the aix thread model and I need to >> build with pthreads. I have built pre-req's bintuils-2.22, >> mpfr-3.1.1-1, gmp-5.0.5. >> >> I am currently trying to bootstrap using gcc-4.3.5-1. I have tried the >> native compiler, xlc, but had other errors and am back to using gcc. >> (Not to mention that the documentation told me that using gcc was an >> better path to follow.) >> >> Question #1) --enable-threads=posix does not seem to work. Is this >> flag supported or perhaps I am using it incorrectly? >> >> Here is my configure statement: >> >> /opt/gcc_work/gcc-4.3.5-src/ >> configure --disable-shared --enable-static --enable-threads=posix >> --prefix=/opt/freeware/gcc_4_3_5 --exec-prefix=/opt/freeware/gcc_4_3_5 >> -enable-languages=c,c++ --srcdir=/opt/gcc_work/gcc-4.3.5-src >> --includedir=/opt/gcc_work/gcc-4.3.5-src/include "CFLAGS=-pthread" >> "CXXFLAGS=-pthread" >> >> In <build dir>/config.log I see: >> >> " >> Configured with: ../gcc-4.3.5/configure --with-as=/usr/bin/as >> --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix= >> /opt/freeware --enable-threads --enable-version-specific-runtime-libs >> --disable-nls --enable-decimal-float=dpd --host=powerpc- >> ibm-aix6.1.0.0 >> Thread model: aix >> " >> >> The thread model might have been an omen that leads to my second question. >> >> Question #2) How can I propagate the use of pthreads into the build? >> >> The build is currently dying in the intl directory. Here is the >> trouble area from <build dir>/intl/config.log: >> >> " >> configure:2092: /data/gcc_work/gcc-4.3.5-build/./prev-gcc/xgcc >> -B/data/gcc_work/gcc-4.3.5-build/./prev-gcc/ -B/opt/freeware/g >> cc_4_3_5/powerpc-ibm-aix6.1.0.0/bin/ -V </dev/null >&5 >> xgcc: '-V' must come at the start of the command line >> configure:2095: $? = 1 >> configure:2118: checking for C compiler default output file name >> configure:2121: /data/gcc_work/gcc-4.3.5-build/./prev-gcc/xgcc >> -B/data/gcc_work/gcc-4.3.5-build/./prev-gcc/ >> -B/opt/freeware/gcc_4_3_5/powerpc-ibm-aix6.1.0.0/bin/ -g -O2 >> -Wl,-bbigtoc conftest.c >&5 >> ld: 0711-317 ERROR: Undefined symbol: .pthread_cond_wait >> ld: 0711-317 ERROR: Undefined symbol: .pthread_cond_broadcast >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutexattr_init >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutexattr_settype >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutexattr_destroy >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_trylock >> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock >> ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific >> ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific >> ld: 0711-317 ERROR: Undefined symbol: .pthread_key_delete >> ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create >> ld: 0711-317 ERROR: Undefined symbol: .pthread_once >> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. >> collect2: ld returned 8 exit status >> configure:2124: $? = 1 >> " >> >> If I add "-lpthread" to the command that configure ran and run it >> myself, it works: >> >> " >> bash-3.2# /data/gcc_work/gcc-4.3.5-build/./prev-gcc/xgcc >> -B/data/gcc_work/gcc-4.3.5-build/./prev-gcc/ >> -B/opt/freeware/gcc_4_3_5/powerpc-ibm-aix6.1.0.0/bin/ -g -O2 >> -Wl,-bbigtoc -lpthread /tmp/conftest.c >> bash-3.2# echo $? >> 0 >> " >> >> Thanks, >> -Rick > > No takers??? > > I tried using 4.3.5 to bootstrap gcc 4.7.2 and had new problems. (And, > 4.7.2 is not the version that I really need.) I tried invoking xlc in > a number of ways to bootstrao, c99_r7, xlc_r7, etc. Each invocation > fails differently. I might as well keep trying to solve the original > problem. > > So, how do I get pthread support in gcc 4.3.5? If it is a simple > configuration item that I missed, I'll take the well-deserved flames > along with a pointer in the right direction. > > Thanks in advance, > -Rick