Re: V8.0rc1 On AIX.

From: Travis P <twp(at)castle(dot)fastmail(dot)fm>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: V8.0rc1 On AIX.
Date: 2004-12-14 23:08:05
Message-ID: 0311AB9C-4E25-11D9-8DF3-003065F9DAF8@castle.fastmail.fm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Dec 14, 2004, at 12:51 PM, Bruce Momjian wrote:

> Peter Eisentraut wrote:
>> Bruce Momjian wrote:
>>> Huh, isn't this port testing? Do we not want to fix port bugs at
>>> this stage?
>>
>> We are not really fixing anything, because it was never expected to
>> work
>> before. We are adding new functionality. It is, of course, a
>> borderline case. But for example, do we have any information about
>> whether what is being implemented actually works? I don't want to
>> find
>> out in two weeks, that yes, we managed to compile with thread support,
>> but no, threaded applications still have issues on that platform.
>
> I assume threads are supposed to work on all platforms that support it.
> We have new threading detection code in 8.0 so I expected some
> adjustments. Also, someone pointed out that the problem was reported
> during beta but I missed it.
>
> As far as testing we have to have the users do any testing. The thread
> testing script already tests threading but the actual compile success
> is
> what we are adjusting now.

And that failure was, as I understand it, to accommodate using
/usr/bin/cc because as I mentioned in my port report on an AIX 5.1
system, /usr/bin/cc_r already works as-is.

I believe that cc_r just adds -DTHREAD_SAFETY, adds -lpthead, sets a
LIBPATH such that /usr/lib/threads preceeds /usr/lib/ so you pick up a
thread-safe libc.a (which you don't even necessarily need unless you
are assuming some libc functions are thread-safe -- if you are doing
higher-level sync yourself, then that might not even be necessary), and
cc_r does whatever other default defines, etc are best for a safe
multithreaded compilation. As I recall, it used to just be a
shell-script wrapper in AIX 4 days.

Now, on my AIX 5.1 system, /usr/bin/ cc and cc_r are both just symlinks
back to /usr/vac/bin/xlc. The different program names just invoke the
different settings. Brad: can you make such a symlink and compile
with that?, for example:
/home/u/brad/cc_r -> /usr/bin/xlc
./configure CC=/home/u/brad/cc_r ....

Certainly, pthreads do generally work on AIX. I've been using them for
years. However, I always use cc_r (or xlC_r) for multithreaded apps.
Peter has a point that the patch makes it compile, but does it make all
necessary adjustments such that everything will always work? I can't
answer that.

-Travis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-12-14 23:35:00 Re: V8.0rc1 On AIX.
Previous Message Tom Lane 2004-12-14 22:50:45 Re: dropdb/contrib-regression