pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to make Fedora4 build threadsafe?
4+ messages / 2 participants
[nested] [flat]

* How to make Fedora4 build threadsafe?
@ 2006-03-01 05:34 Matt England <mengland@mengland.net>
  2006-03-01 05:57 ` Re: How to make Fedora4 build threadsafe? Matt England <mengland@mengland.net>
  2006-03-01 15:34 ` Re: How to make Fedora4 build threadsafe? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Matt England @ 2006-03-01 05:34 UTC (permalink / raw)
  To: pgsql-ports; +Cc: mengland@mengland.net

I experienced this error while running this ./configure:

./configure --enable-thread-safety --prefix=/cgrid/local/postgresql

on FedoraCore4:

checking thread safety of required library functions... no
configure: error:
*** Thread test program failed.  Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled.  However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.

[mengland@localhost postgresql-8.1.3]$


Is there anything I can do to fix this?  Install some extra/different 
libraries?  (I'm trying a ./configure run after installing 
"linuxthreads-devel" right now.)

I didn't have this problem building 8.1.0/8.1.1 with the same procedure on 
Centos4.1 and Debian3.1 (sarge) systems, for whatever that's worth.

-Matt




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How to make Fedora4 build threadsafe?
  2006-03-01 05:34 How to make Fedora4 build threadsafe? Matt England <mengland@mengland.net>
@ 2006-03-01 05:57 ` Matt England <mengland@mengland.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Matt England @ 2006-03-01 05:57 UTC (permalink / raw)
  To: pgsql-ports; +Cc: mengland@mengland.net

At 2/28/2006 11:34 PM, Matt England wrote:
>checking thread safety of required library functions... no
>configure: error:
>*** Thread test program failed.  Your platform is not thread-safe.
>*** Check the file 'config.log'for the exact reason.

For what it's worth, this seems to be pertinent part of config.log:

[...]
configure:16424: checking for the pthreads library -lpthreads
configure:16462: gcc -o conftest -O2 -Wall -Wmissing-prototypes 
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels 
-fno-strict-aliasing   -D_GNU_SOURCE    conftest.c -lpthreads  -lz 
-lreadline -ltermcap -lcrypt -lresolv -lnsl -ldl -lm -lbsd  >&5
conftest.c: In function 'main':
conftest.c:125: warning: 'th' is used uninitialized in this function
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
configure:16468: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "PostgreSQL"
[...]


...although the thing is so long that it's hard to tell.

I couldn't find a pthreads library/package/thing anywhere, or at least not 
yet.  My system *does* have a /usr/lib/libpthread.so (singular), but no 
libpthreads (plural).  Installing linuxpthreads-devel didn't solve anything.

Any thoughts?

-Matt 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How to make Fedora4 build threadsafe?
  2006-03-01 05:34 How to make Fedora4 build threadsafe? Matt England <mengland@mengland.net>
@ 2006-03-01 15:34 ` Tom Lane <tgl@sss.pgh.pa.us>
  2006-03-05 22:08   ` Re: How to make Fedora4 build threadsafe? Matt England <mengland@mengland.net>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2006-03-01 15:34 UTC (permalink / raw)
  To: Matthew England <mengland@mengland.net>; +Cc: pgsql-ports

Matt England <mengland@mengland.net> writes:
> I experienced this error while running this ./configure:
> ./configure --enable-thread-safety --prefix=/cgrid/local/postgresql
> on FedoraCore4:
> checking thread safety of required library functions... no

Hmm, it works fine for me on FC4.  I wonder if you are missing the
glibc-devel RPM?

The part of config.log that matters is the part after "checking thread
safety of required library functions", not the part that is checking
to see which thread library you've got.  FWIW, the thread library
check goes like this for me:

checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How to make Fedora4 build threadsafe?
  2006-03-01 05:34 How to make Fedora4 build threadsafe? Matt England <mengland@mengland.net>
  2006-03-01 15:34 ` Re: How to make Fedora4 build threadsafe? Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-03-05 22:08   ` Matt England <mengland@mengland.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Matt England @ 2006-03-05 22:08 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Matthew England <mengland@mengland.net>; pgsql-ports


At 3/1/2006 09:34 AM, Tom Lane wrote:
>Matt England <mengland@mengland.net> writes:
> > I experienced this error while running this ./configure:
> > ./configure --enable-thread-safety --prefix=/cgrid/local/postgresql
> > on FedoraCore4:
> > checking thread safety of required library functions... no
>
>Hmm, it works fine for me on FC4.  I wonder if you are missing the
>glibc-devel RPM?

I checked, and said rpm was already on my system.

However, I did build successfully.  Here's how:

As per:

http://www.redhat.com/archives/rhl-list/2006-March/msg00023.html

I built from the source rpm at:

http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/postgresql-8.1.3-1.src.rpm

...and everything built ok with

./configure --enable-thread-safety
make

-Matt 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-03-05 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-01 05:34 How to make Fedora4 build threadsafe? Matt England <mengland@mengland.net>
2006-03-01 05:57 ` Matt England <mengland@mengland.net>
2006-03-01 15:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-03-05 22:08   ` Matt England <mengland@mengland.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox