Re: More buildfarm stuff

From: Palle Girgensohn <girgen(at)FreeBSD(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Larry Rosenman <ler(at)lerctr(dot)org>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, 'Andrew Dunstan' <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: More buildfarm stuff
Date: 2005-07-26 20:17:05
Message-ID: 5CD3A406714C65692FEB5689@palle.girgensohn.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On tisdag, juli 26, 2005 15.17.57 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Larry Rosenman <ler(at)lerctr(dot)org> writes:
>> On Jul 26 2005, Jim C. Nasby wrote:
>>> So the question now is: how do we fix the issue with threaded python?
>
>> how do we get libc_r into the mix on FreeBSD 4.11?
>
> A possible compromise is to add -lc_r to LIBS if (a) --enable-python
> and (b) platform is one of those known to need it.
>
> regards, tom lane

I think most people use the ports when using postgresql with FreeBSD.

There are a bunch of ports, one for the server, another for plpython, yet
another for plperl. Hence, if the ports are used, the server will be
configured separately from the plpython.so, and the above suggestion will
not do. OTH, the port for the server has a bunch of options (opted using
dialog(1)), where one is:

"Link w/ libc_r, used by plpython"

It defaults to off, but it is pretty obvious that if you need plpython, you
should check that option.

If it is on, following happens:

--
.if ${OSVERSION} < 500016
PTHREAD_CFLAGS?= -D_THREAD_SAFE
PTHREAD_LIBS?= -pthread
.elif ${OSVERSION} < 502102
PTHREAD_CFLAGS?= -D_THREAD_SAFE
PTHREAD_LIBS?= -lc_r
.else
PTHREAD_CFLAGS?=
PTHREAD_LIBS?= -pthread
.endif
--

and then PTHREAD_X are added to X. The pthread switch actually adds -lc_r
to the linking chain:

--
gcc(1) man page excerpt:
FreeBSD SPECIFIC OPTIONS
-pthread
Link a user-threaded process against libc_r instead of libc.
Ob-
jects linked into user-threaded processes should be
compiled
with -D_THREAD_SAFE.
--

See
<http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/postgresql80-server/Makefile>
for the port's sources.

BTW, I do have 4.11 boxes running SMP, shall I run another test, on SMP?
Tip-of-trunk with --enable-python?

/Palle

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-07-26 20:17:17 Re: For review: Server instrumentation patch
Previous Message Jeff Davis 2005-07-26 20:09:11 Re: [HACKERS] Enticing interns to PostgreSQL