public inbox for [email protected]  
help / color / mirror / Atom feed
From: Martin Münstermann <[email protected]>
To: Bruce Momjian <[email protected]>
Cc: Robert Treat <[email protected]>
Cc: PostgreSQL-patches <[email protected]>
Subject: Re: [BUGS] 8.0.0beta1: -lpthread missing
Date: Fri, 13 Aug 2004 11:50:24 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> OK, we now have thread compile failure reports on Debian and Slackware.
> 
> The config/acx_pthread.m4 script basically tests these:
> 
> 	acx_pthread_flags=3D"pthreads none -Kthread -kthread lthread -pthread
> 		-pthreads -mthreads pthread --thread-safe -mt pthread-config"
> =09
> in that order and exits once it finds the first one that can
> compile/link this:
> 
>         AC_TRY_LINK([#include <pthread.h>],
>                     [pthread_t th; pthread_join(th, 0);
>                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
>                      pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
>                     [acx_pthread_ok=3Dyes])
> 
> Now, the big question is why -pthread can compile/link this successfully
> but -pthread isn't enough to build a library that uses threads.

I suspect that on Solaris, without "-lpthread" the pthread-stubs in 
/usr/lib/libc.so might be called at runtime instead of the functional 
ones in libpthread.so.

Could this easily be checked?

Martin



view thread (20+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [BUGS] 8.0.0beta1: -lpthread missing
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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