From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 528E51F5AE for ; Tue, 18 May 2021 13:59:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245494AbhEROAY (ORCPT ); Tue, 18 May 2021 10:00:24 -0400 Received: from cloud.peff.net ([104.130.231.41]:57930 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbhEROAX (ORCPT ); Tue, 18 May 2021 10:00:23 -0400 Received: (qmail 15459 invoked by uid 109); 18 May 2021 13:59:05 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 18 May 2021 13:59:05 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 8300 invoked by uid 111); 18 May 2021 13:59:05 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Tue, 18 May 2021 09:59:05 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 18 May 2021 09:59:04 -0400 From: Jeff King To: "Randall S. Becker" Cc: git@jeffhostetler.com, git@vger.kernel.org, 'SZEDER =?utf-8?Q?G=C3=A1bor'?= , 'Johannes Schindelin via GitGitGadget' , jeffhost@microsoft.com Subject: Re: [BUG] Unix Builds Requires Pthread Support (was [PATCH v4 00/12] Simple IPC Mechanism) Message-ID: References: <009d01d74b44$9efe8a60$dcfb9f20$@nexbridge.com> <00f301d74bea$fb39d220$f1ad7660$@nexbridge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <00f301d74bea$fb39d220$f1ad7660$@nexbridge.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, May 18, 2021 at 09:37:38AM -0400, Randall S. Becker wrote: > >+# All simple-ipc requires threads, and then individual # mechanisms > >+have their own requirements. > >+ifndef NO_PTHREADS > >+ BASIC_CFLAGS += -DSUPPORTS_SIMPLE_IPC > > LIB_OBJS += compat/simple-ipc/ipc-shared.o > >+ifndef NO_UNIX_SOCKETS > > LIB_OBJS += compat/simple-ipc/ipc-unix-socket.o > > endif > >- > > ifdef USE_WIN32_IPC > >- LIB_OBJS += compat/simple-ipc/ipc-shared.o > > LIB_OBJS += compat/simple-ipc/ipc-win32.o endif > >+endif > > > > ifdef NO_ICONV > > BASIC_CFLAGS += -DNO_ICONV > >diff --git a/simple-ipc.h b/simple-ipc.h index dc3606e30b..0f58be7945 100644 > >--- a/simple-ipc.h > >+++ b/simple-ipc.h > >@@ -4,11 +4,6 @@ > > /* > > * See Documentation/technical/api-simple-ipc.txt > > */ > >- > >-#if defined(GIT_WINDOWS_NATIVE) || !defined(NO_UNIX_SOCKETS) -#define SUPPORTS_SIMPLE_IPC -#endif > >- > > #ifdef SUPPORTS_SIMPLE_IPC > > #include "pkt-line.h" > > I'm not sure this is going to work. The platform *does* support UNIX > sockets (and not disabled) and pthreads, but we have disabled pthreads > in our build. So in the above, ipc-unix-socket.o will be included at > the ifndef NO_UNIX_SOCKETS. If NO_PTHREADS, not being pedantic, there > should be no pthread references, regardless of other considerations. > Although, at some point, I hope to resolve why pthreads (PUT) is > having issues in git on the platform but not at this point. Unless I screwed something up, it shouldn't be. There's an outer ifndef for NO_PTHREADS. Double negation aside, that means that we don't even hit the ifndef NO_UNIX_SOCKETS inside it unless we now pthreads are supported. And so we do not include ipc-unix-socket.o. For the SUPPORTS_SIMPLE_IPC flag, I just moved the logic into the Makefile. It could continue to live in simple-ipc.h, too (but then that is basically a repetition of the Makefile logic; it would have to learn the same "only if pthreads are available" conditional, too). -Peff