From owner-freebsd-ports@FreeBSD.ORG Sat Oct 25 22:17:11 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F19F6CA3 for ; Sat, 25 Oct 2014 22:17:11 +0000 (UTC) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [IPv6:2607:f8b0:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0D74125 for ; Sat, 25 Oct 2014 22:17:11 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id lf12so1337644vcb.31 for ; Sat, 25 Oct 2014 15:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=abf1Ml0DOokMdVtvB+SMdnuyGWqYIXnX8HX9WiiFBiA=; b=NX0z6WlugaFxZwaORgaM2Q42q8CjAUPYaKIe+hjR2jdFxSt1tnbYXr+GQEsrgC9z3D vO/pWBTEUjKpqAE6dS75oQ0E5LEhuFtojO8KKpP+0Yf7qBp1aXGJUhP+dfW+Y64yo8+d ZbTontXd1qMN90CGR0m653rppTEwABP2xfpz9IdyYXE/17kDhbkQmXO2+adftk89Uktp 3JXWSxA9GVY0wmLkH2xEJi+sA22J5RELzAqGXiT769qlWY4YbS4k5f80ca3oUAmfc2Nz HpgMSYoGf+6SU91cDtbkNcFzq1wGwSQkIxNcokJBhTfx2QjCWDCKCItoIbCXTwT1iFwD vDQQ== X-Received: by 10.220.112.7 with SMTP id u7mr9265522vcp.22.1414275430749; Sat, 25 Oct 2014 15:17:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.136.76 with HTTP; Sat, 25 Oct 2014 15:16:30 -0700 (PDT) In-Reply-To: <544BEE0A.2070402@m5p.com> References: <544BEE0A.2070402@m5p.com> From: Henry Hu Date: Sat, 25 Oct 2014 18:16:30 -0400 Message-ID: Subject: Re: Python 2.7 and semaphores To: George Mitchell Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2014 22:17:12 -0000 On Sat, Oct 25, 2014 at 2:38 PM, George Mitchell wrote: > In the process of building and trying textproc/meld, I discovered that > the lang/python27 configure process concludes, erroneously, that FreeBSD > does not support working Posix semaphores. In particular, this program > from the configure script was alleged to fail, according to config.log: > > #include > #include > #include > #include > #include > > int main(void) { > sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); > if (a == SEM_FAILED) { > perror("sem_open"); > return 1; > } > sem_close(a); > sem_unlink("/autoconf"); > return 0; > } > > But when I compiled and ran the program by hand, it worked perfectly. > > Then, poking around in lang/python27/Makefile, I found these two lines: > > SEM_CONFIGURE_ENV= ac_cv_posix_semaphores_enabled=yes > SEM_CONFIGURE_ENV_OFF= ac_cv_posix_semaphores_enabled=no > > I could not explain why these settings should have any effect on the > configure and build process, but muttering my most superstitious > imprecations under my breath I changed "...=no" to "...=yes" in the > second line and re-installed Python. Lo and behold, configure now > admitted that Posix semaphores worked, and I could run meld. (Why > meld needs working semaphores is beyond me, but I'll worry about that > another day.) > > Can anyone explain to me how those lines affect the configure process? > And does either line belong in the Makefile at this point? -- George > There is a config option called "SEM" which enables Posix sem support. By default it is enabled. > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > -- Cheers, Henry