public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rick Springob <rspringob@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: problems building gcc-4.3.5-1 on AIX 6.1 with pthreads
Date: Fri, 26 Oct 2012 15:21:00 -0000	[thread overview]
Message-ID: <CA+MyzUXWaGAKuedPV=0TbFEX_xJ90nEPRqaz1MyyLZkeQQ7ugw@mail.gmail.com> (raw)
In-Reply-To: <CA+MyzUURYGS6ko2Jq8sxw2OecPKaT87NnxWgTZR6mmtykh_kfg@mail.gmail.com>

On Thu, Oct 18, 2012 at 4:08 PM, Rick Springob <rspringob@gmail.com> 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

  reply	other threads:[~2012-10-26 13:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  1:44 Rick Springob
2012-10-26 15:21 ` Rick Springob [this message]
2012-10-26 21:44   ` Jonathan Wakely
2012-10-26 22:09     ` David Edelsohn
2012-10-26 22:26       ` Rick Springob
2012-10-26 23:28         ` David Edelsohn
2012-10-27 15:27           ` Jędrzej Dudkiewicz
2012-10-27 19:05             ` David Edelsohn
2012-10-28 15:38               ` Jędrzej Dudkiewicz
2012-10-30  8:36           ` Rick Springob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+MyzUXWaGAKuedPV=0TbFEX_xJ90nEPRqaz1MyyLZkeQQ7ugw@mail.gmail.com' \
    --to=rspringob@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).