X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 005ED5E3F15 for ; Fri, 13 Aug 2004 06:50:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02319-07 for ; Fri, 13 Aug 2004 09:50:50 +0000 (GMT) Received: from mail2.trustcenter.de (mail2.trustcenter.de [193.194.157.2]) by svr1.postgresql.org (Postfix) with ESMTP id C66305E3639 for ; Fri, 13 Aug 2004 06:50:46 -0300 (ADT) Received: from hermes.trustcenter.de (hermes.trustcenter.de [192.168.202.5]) by mail2.trustcenter.de (8.12.11/8.12.11) with ESMTP id i7D9oU2H000030; Fri, 13 Aug 2004 11:50:30 +0200 (CEST) Received: from [192.168.201.14] (titan.trustcenter.de [192.168.200.244]) by hermes.trustcenter.de (8.12.10/8.12.10/Debian-5) with ESMTP id i7D9oOmX019802; Fri, 13 Aug 2004 11:50:24 +0200 Message-ID: <411C8EE0.50507@betrusted.com> Date: Fri, 13 Aug 2004 11:50:24 +0200 From: =?ISO-8859-1?Q?Martin_M=FCnstermann?= User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en, de-de, it MIME-Version: 1.0 To: Bruce Momjian Cc: Robert Treat , PostgreSQL-patches Subject: Re: [BUGS] 8.0.0beta1: -lpthread missing References: <200408121647.i7CGlEB23426@candle.pha.pa.us> In-Reply-To: <200408121647.i7CGlEB23426@candle.pha.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/274 X-Sequence-Number: 12563 > 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_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