From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Cygwin port of Guile 2.2 Date: Fri, 14 Apr 2017 10:35:34 +0200 Message-ID: <87lgr38jzd.fsf@pobox.com> References: <874ly49l54.fsf@joshua.spikycactus.dnsalias.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1492159212 8076 195.159.176.226 (14 Apr 2017 08:40:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2017 08:40:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: guile-devel@gnu.org To: "Mike Gran" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 14 10:40:08 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cywlz-0001v7-9y for guile-devel@m.gmane.org; Fri, 14 Apr 2017 10:40:07 +0200 Original-Received: from localhost ([::1]:52318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cywm1-00005c-D4 for guile-devel@m.gmane.org; Fri, 14 Apr 2017 04:40:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cywhr-0005MS-Kj for guile-devel@gnu.org; Fri, 14 Apr 2017 04:35:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cywhm-0007OA-Lx for guile-devel@gnu.org; Fri, 14 Apr 2017 04:35:51 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:61618 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cywhm-0007Ls-B5 for guile-devel@gnu.org; Fri, 14 Apr 2017 04:35:46 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 2A13A6F555; Fri, 14 Apr 2017 04:35:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=CpK2casKdTzLZfGjdwCO0z0HjSQ=; b=dm6fDI 4THwLEsL3gUeE9dDqGdo/STme3SyM9cQm8wUMocsnG4v0Xh82XSOZZ3ioK71T1xO ap848Ii/U8gxHc3A8dZOu07wjY0yzs92Yu6Q39S8rPe3h0BP84KKin4Hjrkvbt8s U4l13r+sxadQIZ9mY3sr+5nwxuVSGavFlHtUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=wsAv6Q85A4zGLaJhAP83PX6QvKD04rBw EQH0oRb1zUkBGJy0piaCkhZ8KW3W1b4Ze2AlXuHPiqvEPC3dou46uX36GzZTuSy4 sLXI0Z8o9vFppJVP75wfZipRrWwdl5FikQD+0tSgTPWkG18rJ7hmBKDD58Xe251B ibC2Qx2Cyn8= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 16C5A6F554; Fri, 14 Apr 2017 04:35:43 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id F05F56F553; Fri, 14 Apr 2017 04:35:41 -0400 (EDT) In-Reply-To: <874ly49l54.fsf@joshua.spikycactus.dnsalias.com> (Mike Gran's message of "Tue, 04 Apr 2017 09:45:43 -0700") X-Pobox-Relay-ID: 58838DC2-20ED-11E7-B531-07D2064AB293-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19101 Archived-At: On Tue 04 Apr 2017 18:45, "Mike Gran" writes: > I push a branch that mostly makes Guile 2.2 work on Cygwin. Neat. LGTM with some nits, with the exception of the "(throw 'unresolved)" patch -- the corresponding catch is in test-suite/test-suite/lib.scm:344. > Cygwin's uselocale is broken and can segrault. I fell back > to the standard nl-langinfo. I understand the issue and may > push a patch upstream to Cygwin sometime. That would be great. Can you add a comment to this effect to the line where you force the nl_langinfo path? It would be nice to be able to remove this in the future. > Also Cygwin's langinfo is incomplete with regards to LC > MONETARY. This also is fixable upstream in Cygwin. I didn't recall seeing a patch here but if there was, please note this situation there. > Cygwin requires stability on both ends of a pipe being used > for inter-thread communication. If one tries to read from a > pipe that is closing on the other end, Cygwin may fault. I > worked around this by replacing pipes with a > producer/consumer pattern of semaphores and mutex-protected > variables. A dirty workaround. This was the part I liked least, as you can imagine :) Oh well though. I think it is fine as it is, if you add a comment as to why it's there. Of course if you can find a solution that works with pipes, that would be ideal! > Lastly, Cygwin's fork just doesn't play well with Guile's > new GC and threading model. Despite a copy of days in the > guts of it all, I don't understand the specifics of the > issue. So, in the branch, I disabled forking altogether, > and by extension, popen and friends. I guess the new thing being the finalizer thread? In theory before the fork, Guile will stop the finalizer thread. If that's not working, that could be it. Another option would be to disable fork() but only if Guile is built with threads. Actually this is probably better -- I bet there are Guile people that expect to be able to fork on Cygwin and would be OK if their Guile had no threads. Please feel free to push to master once there are adequate comments. Someone will come later and want to enable fork() on Cygwin with threads and will need to know why it's disabled and what they could do to fix it :) Thanks! Andy