Re: V8 Beta 5 on AIX

From: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: V8 Beta 5 on AIX
Date: 2004-12-06 21:14:59
Message-ID: 41B4CBD3.7010409@ca.afilias.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>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.
>
>
>
I've attached the Makefile.global from the system, in case it's of use.

>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.
>
>
>
I believe that this will result in Slony not working 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.
>
>
>
Not an option, we don't have cc_r on the server.

>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?
>
>
>
5.1

Brad.

Attachment Content-Type Size
Makefile.global text/plain 14.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-12-06 21:28:15 Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Previous Message Andrew Sullivan 2004-12-06 21:05:58 Re: WIN1252 encoding - backend or not?