Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brqrR-0003GQ-82 for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Oct 2016 18:24:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1brqrQ-000467-QY for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Oct 2016 18:24:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1brqq2-0002ZQ-Rh for pgsql-hackers@postgreSQL.org; Wed, 05 Oct 2016 18:22:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1brqq0-0004T3-3g for pgsql-hackers@postgreSQL.org; Wed, 05 Oct 2016 18:22:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u95IMbCH022592; Wed, 5 Oct 2016 14:22:37 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgreSQL.org Subject: Re: Our "fallback" atomics implementation doesn't actually work In-reply-to: <20161005181328.x463t4wwg2tdep7p@alap3.anarazel.de> References: <14947.1475690465@sss.pgh.pa.us> <20161005181328.x463t4wwg2tdep7p@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 05 Oct 2016 11:13:29 -0700" Date: Wed, 05 Oct 2016 14:22:37 -0400 Message-ID: <22591.1475691757@sss.pgh.pa.us> X-Pg-Spam-Score: -4.5 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2016-10-05 14:01:05 -0400, Tom Lane wrote: >> configure USE_UNNAMED_POSIX_SEMAPHORES=1 --disable-cassert --disable-spinlocks --disable-atomics > Pretty independent from the complaint at hand, but if I just do that I get > undefined reference to symbol 'sem_post@@GLIBC_2.2.5' > I needed to add -pthread -lrt to LDFLAGS to make it work. Yeah, on my machine man sem_init specifies "Link with -lrt or -pthread". But I see -lrt getting added into the backend link anyway, presumably as a result of one of these configure calls: AC_SEARCH_LIBS(shm_open, rt) AC_SEARCH_LIBS(shm_unlink, rt) AC_SEARCH_LIBS(sched_yield, rt) If we were to try to support USE_UNNAMED_POSIX_SEMAPHORES as default (which is where I'm thinking about going) we'd have to tweak configure to check sem_init similarly. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers