From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: V8 Beta 5 on AIX |
Date: | 2004-12-06 17:53:52 |
Message-ID: | 200412061753.iB6HrqU20797@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Brad Nicholson wrote:
> >OK, I assume you used --enable-thread-safety in configure.
> >
> Correct.
>
> >This should
> >have added some PTHREAD link flags to your libpq build, and those
> >settings should have followed the libpq library into your pg_ctl link
> >line.
> >
> >Would you look in your Makefile.global for PTHREAD_* settings and report
> >those. The second question is why saying those libraries are needed by
> >libpq is not passing down to uses of libpq, like in pg_ctl.
> >
> >
>
> PTHREAD_CFLAGS = -pthread -D_REENTRANT -D_THREAD_SAFE
> -D_POSIX_PTHREAD_SEMANTICS
> PTHREAD_LIBS = -lpthread -lpthreads
OK, great. Can I see the link line that creates libpq? It should contain
the PTHREAD_LIBS flags.
If it does, the next question is why AIX doesn't pass those flags.
Oh, I think I see the cause. I now remember from
config/acx_pthread.m4:
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
Seems AIX wants a special _compiler_ to be used whenever threading is
involved, even by a linked-in library. I didn't implement using
PTHREAD_CC because there was just too much code disruption for threading
on one platform. I wonder if we should just disable threading on AIX.
Let me ask --- if you change the CC line in Makefile.global to cc_r,
does everything build OK? That might be a clean solution because the
change could be made in one place. Of course this would mean the
backend would also be compiled using cc_r and I have no idea of the
effect.
Of course, the idea that any use of libpq has to use cc_r is going to
make building things complex without some adjustments.
Also, what version of AIX are you using? Are other AIX folks having
thread build problems?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Kenneth Marshall | 2004-12-06 18:03:49 | Re: V8 Beta 5 on AIX |
Previous Message | Josh Berkus | 2004-12-06 17:43:16 | Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2 |